- 2071 Shrawan · 3 marks
Design of a 2-bit ALU
Short answer
Two 1-bit slices each with AND, OR, full adder and 4×1 MUX. S1S0=00 for AND, 01 for OR, 10 for ADD (carry chain). Slice 0 takes Cin=0, output F0 and carry to slice 1. Common S1,S0 select operation for both bits.
Design a 2-bit ALU that can perform addition, AND and OR operations.
A 2-bit ALU is two identical 1-bit slices in cascade. Each slice has a full adder (ADD), an AND gate, an OR gate and a 4×1 multiplexer that selects the result.
| S1 S0 | Operation |
|---|---|
| 0 0 | Fi = Ai AND Bi |
| 0 1 | Fi = Ai OR Bi |
| 1 0 | Fi = Ai + Bi + Ci (add) |
| 1 1 | Not used (spare MUX input) |
Ai Bi
| |
+---+------+--------+
| | | |
+--v-+ +v---+ +v-------v-+
| AND| | OR | |Full adder|<-- Ci
+--+-+ +-+--+ +----+-----+--> Ci+1
|0 |1 |2
+--v-----v---------v--+
| MUX 4x1 (S1 S0) |
+----------+----------+
v
Fi
- Slice 0: inputs A0, B0, C0 (= 0 for add). Output F0, carry C1.
- Slice 1: inputs A1, B1, C1. Output F1, carry C2 (carry-out).
- Full-adder equations: Sum_i = Ai ⊕ Bi ⊕ Ci, Ci+1 = AiBi + Ci(Ai ⊕ Bi).
- S1 and S0 are common to both slices, so one control word selects the same operation for both bits.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- ALU design with 2-bit ALU · Computer Organization and Architecture, chapter 5 · asked 2×
- Signed 1's complement addition of (-65)+(+15) · Digital Logic, chapter 5
- Design 4-bit R-2R DAC; unipolar vs bipolar · Advanced Electronics, chapter 3
- Hazards in asynchronous design; 2-bit comparator · Digital Logic, chapter 4
- Vector class addition by object argument · Object Oriented Programming, chapter 1
All Computer Organization and Architecture chapter 5 questions →