Professional Documents
Culture Documents
09 Arithmetic Logic Units PDF
09 Arithmetic Logic Units PDF
A B CI S
0 X 0 X (transfer)
0 X 1 X+1 (increment)
–1 X 0 X–1 (decrement)
S2 S1 Yi Ai
0 0 0 0
S2 S1 A 0 0 1 0
0 0 0000 0 1 0 0
0 1 Y 0 1 1 1
1 0 Y’ 1 0 0 1
1 1 1111 1 0 1 0
1 1 0 1
1 1 1 1
July 2, 2003 Arithmetic-logic units 10
Primitive gate implementation
We can find a minimal sum of
products from the truth table.
S1
0 0 1 0
S2 1 0 1 1
Yi
Ai = S2 Yi’ + S1 Yi
S2 S1 S0 G
0 0 0 X
0 0 1 X+1
0 1 0 X+Y
0 1 1 X+Y+1
1 0 0 X + Y’
1 0 1 X + Y’ + 1
1 1 0 X–1
1 1 1 X
1 0 1 1 1 0 1 1 1 0 1 1
AND 1 1 1 0 OR 1 1 1 0 XOR 1 1 1 0
1 0 1 0 1 1 1 1 0 1 0 1
They are not the same as the C operators &&, || and !, which treat each
integer as a single logical value (0 is false, everything else is true).
S1 S0 G
0 0 XY
0 1 X+Y
1 0 X⊕Y
1 1 X’
S1 S0 Gi
0 0 XiYi
0 1 Xi + Yi
1 0 Xi ⊕ Yi
1 1 Xi’
S1 S0 G
0 0 XY
0 1 X+Y
1 0 X⊕Y
1 1 X’
CO should be ignored
when logic operations
are performed (S3=1).
S3 S2 S1 S0 G
0 0 0 0 X
0 0 0 1 X+1
0 0 1 0 X+Y
0 0 1 1 X+Y+1
0 1 0 0 X + Y’
0 1 0 1 X + Y’ + 1
0 1 1 0 X–1
0 1 1 1 X
1 x 0 0 X and Y
1 x 0 1 X or Y
1 x 1 0 X xor Y
1 x 1 1 X’