SLIDE 14 14
Booth´ s Modified Algorithm
Code the binary number
{0,1} { 2, 1,0,1,2}
i i
x y ∈ ∈ − −
To a five digit number
{ , , , , }
i
y
By using 3 binary bits
Booth´ s Modified Algorithm
1 1 2
2 2 0 1 Example 6
k i k i i i k
X x x x { , } k
− − = −
= − × + × ∈ =
∑
5 4 3 2 1 5 4 3 3 2 1 1 1 1 1
Example 6 32 16 8 4 2 16 2 4 2 2 2
i i i i
X x x x x x x X ( x x x ) ( x x x ) ( x x ) If y x x x x
+
= = − + + + + + = − + + + − + + + − + + = − + +
1 1 4 2 2 2 2
2 16 4 2 1 0 1 2 2 n, i even 4
i i i i- i i i i i k i k i
If y x x x X Y y y y y {- ,- , , , } Y y Y y
+ × = − =
+ + = = + + ∈ = × ⇒ =
∑
1 −
∑
Booth´ s Modified Algorithm
Examples:
i i 1 i i-1
y 2x x x
+
= − + +
Examples:
xi+1 xi xi-1 yi 1 1 1 1 1 1 2
X 01 11 01 10 (0) Y 02 01 02 02 X 00 10 01 11 (0) Y 01 02 02 01 = ⇒ = = ⇒ =
1
1 1
1 1
1 1 1
X 10 11 10 10 (0) Y 01 00 01 02 = ⇒ =
There will always be at least one “0” in each pair
Booth´ s Modified Algorithm
0 1 0 1 5 0 1 0 1 5 x 0 1 1 1 7 x 2 1 7 x 0 1 1 1 7 x 2
7 0 1 0 1 1 x 5 1 1 1 1 1 0 1 1
0 1 0 1 2 x 5 + 0 1 0 1 2 x 4 x 5 0 1 0 1 4 x 5 0 0 1 0 0 0 1 1 + 0 0 0 0 0 x 5 0 0 1 0 0 0 1 1
- 1 ⇒ two´ s complement conversion
2 ⇒ shift one step (multiply by two)
- 2 ⇒ two´ s complement conversion + shift