Professional Documents
Culture Documents
a
0
Result
b 0 2
Less 3
a. CarryOut
Binvert Operation
CarryIn
a
0
Result
b 0 2
Less 3
Set
Overflowı
Overflow
detection
b.
Binvert CarryIn Operation
a0 CarryIn
b0 ALU0 Result0
Less
CarryOut
a1 CarryIn
b1 ALU1 Result1
0 Less
CarryOut
a2 CarryIn
b2 ALU2 Result2
0 Less
CarryOut
CarryIn
Bnegate Operation
• Notice control lines:
a0 CarryIn Result0
b0 ALU0
000 = and Less
CarryOut
001 = or
010 = add
a1 CarryIn
110 = subtract b1 ALU1
Result1
0 Less
111 = slt CarryOut Zero
a2 CarryIn Result2
b2 ALU2
0 Less
CarryOut
Result31
a31 CarryIn
b31 ALU31 Set
0 Less Overflow
Can you see the ripple? How could you get rid of it?
c1 = g0 + p0c0
c2 = g1 + p1c1 c2 =
c3 = g2 + p2c2 c3 =
c4 = g3 + p3c3 c4 =
Feasible! Why?
a0ı CarryIn
b0ı Result0--3
a1ı
b1ı ALU0
a2ı pi
b2ı P0
G0 gi
a3ı
b3 Carry-lookahead unit
C1
ci + 1
a4ı CarryIn
b4ı Result4--7
a5ı
b5ı
a6ı
ALU1
P1 pi + 1
• Can’t build a 16 bit adder this way... (too big)
b6ı G1 gi + 1
a7ı
b7
• Could use ripple carry of 4-bit CLA adders
C2
ci + 2
• Better: use the CLA principle again!
a8ı CarryIn
b8ı Result8--11
a9ı
b9ı ALU2
a10ı P2 pi + 2
b10ı G2 gi + 2
a11ı
b11
C3
ci + 3
a12ı CarryIn
b12ı Result12--15
a13ı
b13ı ALU3
a14ı P3 pi + 3
b14ı G3 gi + 3
a15ı C4
b15 ci + 4
CarryOut