Professional Documents
Culture Documents
Operation Carry in A B 00 01 Result 10 Adder
Operation Carry in A B 00 01 Result 10 Adder
operation
Carry in
B 00
01 Result
10
Adder
Carry out
= A + 2’s complement of B
= A + 1’s complement of B + 1
operation
Carry in
B 00
01 Result
0 10
Adder
1
11
1-bit adder/subtractor
Assume that it has the instructions add, sub, and, or, slt.
operation
Carry in
B 00
01 Result
0 10
add
1
Less 11
B invert Set
Carry out
B invert C in operation
A0
ALU
B0
Cout
Less
C in
A1
ALU
B1
Cout
0
..
..
A31
ALU
B31 Result 31
Cout
0 Set overflow
Fast Carry Propagation
01111111111111111111 +
00000000000000001
= g1 + p1.(g0 + p0.c0)
= g1 + p1.g0 + p1.p0.c0
P0 = p3.p2.p1.p0
P1 = p7.p6.p5.p4
P2 = p11.p10.p9.p8
P3 = p15.p14.p13.p12
Then
C1 = G0 + P0.c0
C2 = G1 + P1.G0 + P1.P0.c0
0 1 1 1 0 1 0 0 1 0 1 0 0 0 1 1
0 0 1 1 1 0 1 0 0 1 0 0 0 1 1 1
1 0 0 1 (multiplicand)
0 1 0 1 (multiplier)
1 0 0 1
0 0 0 0
1 0 0 1
0 0 0 0
0 1 0 1 1 0 1
point number
Exponent E significand F
+/- x x x x y y y y y y y y y y y y
(The 1 is implied)
s xxxxxxxx yyyyyyyyyyyyyyyyyyyyyyy
Single precision
1 8 23 bits
+127
Largest = 1.111… x 2 ª 2 x 10 +38
–128
Smallest = 1.000 … x 2 ª
1 x 10 -38
S exponent significand
1 11 bits 52 bits
+1023
Largest = 1.111… x 2
–1024
Smallest = 1.000… X 2
Exponent = 00000000 20
bias +127
smallest largest
s (exponent – bias)
So, value = (1) x (1+significand) x 2
Step 3. Normalize
A x B = 1.021 x 10-5
Now try to multiply 0.5 with –0.4375 in binary. Use IEEE 754
format.