You are on page 1of 2

WEEKLY TEST

CAO-27/08/12
(+67 * -48)
+67=0100011 left 0-sign bit
+48=110000
001111 -1s complement
1
010000 -2s complement
-48=11010000 left 11s are sign bit
Booths algorithm:
1 1 0 1 0 0 0 0 0 added zero
Q
0-1 1-1 0 0 0 0 Comparing 2-2 digits from the right side as shown using braces
upto the left most bit & applying the bit pair recoding rule
B

0 1 0 0 0 0 1 1 -multiplicand

0-1 1-1 0 0 0 0
00000000 0 0 0 0 0 0 0 0

8 0s added since the result should contain 16 bits

00000000 0 0 0 0 0 0 0
00000000 0 0 0 0 0 0
00000000 0 0 0 0 0
11111011 1 1 0 1
00001000 0 1 1
11101111 0 1
00000000 0
111110011 0 1 1 1 0 0 0 0

-sum

The leftmost 1 is the carry bit. It can be ignored. So the ans is 1111001101110000 where the 1st 4 1s
are sign bits. 001101110000=-3216

Modified Booths algorithm:


Q
1 1 0 1 0 0 0 0 0 added zero
Comparing 3-3 digits from the right side
as shown using braces upto the left most bit & applying the bit pair recoding rule
-1
B

0 1 0 0 0 0 1 1
-1

00000000 0 0 0 0 0 0 0 0
00000000 0 0 0 0 0 0
00000010 0 0 1 1
11101111 0 1
Sum=

11110011 0 1 1 1 0 0 0 0

The result is the same as said above.


+3216=110010010000
-3216=1001101110000

By
sethu

You might also like