| ALU: 1-bit | ||||||||||||||
| We now have the ingredients for a simple 1-bit arithmetic-logic unit (ALU) | ||||||||||||||
| Operations: | ADD | a + b + cin |
|
|||||||||||
| AND | a AND b | |||||||||||||
| OR | a OR b | |||||||||||||
| Inputs: | data: | a, b, cin | ||||||||||||
| control: | con1, con2 | |||||||||||||
| Outputs: | result, cout | |||||||||||||
| Components: | AND gate | |||||||||||||
| OR gate | ||||||||||||||
| Full adder | ||||||||||||||
| 4-1 MUX | ||||||||||||||
| 1-bit ALU (Fig. 4.14) | ||||||||||||||
| (Operation is 2-bit control con1, con2) | ||||||||||||||
| Can construct k-bit ALU by combining k 1-bit ALUs | ||||||||||||||
| What other operations could we have? | ||||||||||||||