Binary Multipliers - PowerPoint PPT Presentation

About This Presentation
Title:

Binary Multipliers

Description:

... coding) 1. 0. 1. 0. 0. 0. 1. 0. You've got to be kidding... It can't be that easy ... The key trick of multiplication is memorizing a digit-to-digit table... – PowerPoint PPT presentation

Number of Views:192
Avg rating:5.0/5.0
Slides: 12
Provided by: LeonardM9
Learn more at: http://www.cs.unc.edu
Category:

less

Transcript and Presenter's Notes

Title: Binary Multipliers


1
Binary Multipliers
The key trick of multiplication is memorizing a
digit-to-digit table Everything else was just
adding
Youve got to be kidding It cant be that easy
Reading Study Chapter 3 (including Booth coding)
2
Binary Multiplication
Binary multiplication is implemented using the
same basic longhand algorithm that you learned in
grade school.
A0
A1
A2
A3
B0
B1
B2
x
B3
A0B0
A1B0
A2B0
A3B0
AjBi is a partial product
A0B1
A1B1
A2B1
A3B1
A0B2
A1B2
A2B2
A3B2
A0B3

A1B3
A2B3
A3B3
Multiplying N-digit number by M-digit number
gives (NM)-digit result
Easy part forming partial products (just an AND
gate since BI is either 0 or 1) Hard part adding
M, N-bit partial products
3
Multiplication Implementation
S
t
a
r
t
M
u
l
t
i
p
l
i
e
r
0



0
M
u
l
t
i
p
l
i
e
r
0



1
t
N
o



lt

3
2

r
e
p
e
t
i
t
i
o
n
s
3
2
n
d

r
e
p
e
t
i
t
i
o
n
?
Y
e
s



3
2

r
e
p
e
t
i
t
i
o
n
s
4
Second Version
S
t
a
r
t
M
u
l
t
i
p
l
i
c
a
n
d
3
2

b
i
t
s
M
u
l
t
i
p
l
i
e
r
0



0
M
u
l
t
i
p
l
i
e
r
0



1
M
u
l
t
i
p
l
i
e
r
3
2
-
b
i
t

A
L
U
S
h
i
f
t

r
i
g
h
t
3
2

b
i
t
s
S
h
i
f
t

r
i
g
h
t
P
r
o
d
u
c
t
C
o
n
t
r
o
l

t
e
s
t
W
r
i
t
e
6
4

b
i
t
s
i
f
t

t
h
e

M
u
l
t
i
p
l
i
e
r

r
e
g
i
s
t
e
r

r
i
g
h
t

1

b
i
t
N
o



lt

3
2

r
e
p
e
t
i
t
i
o
n
s
3
2
n
d

r
e
p
e
t
i
t
i
o
n
?
Y
e
s



3
2

r
e
p
e
t
i
t
i
o
n
s
5
Example for second version
6
Final Version
S
t
a
r
t
M
u
l
t
i
p
l
i
c
a
n
d
3
2

b
i
t
s
P
r
o
d
u
c
t
0



0
P
r
o
d
u
c
t
0



1
3
2
-
b
i
t

A
L
U
C
o
n
t
r
o
l
S
h
i
f
t

r
i
g
h
t
P
r
o
d
u
c
t
t
e
s
t
W
r
i
t
e
6
4

b
i
t
s
The trick is to use the lower half of the
productto hold the multiplier during the
operation.
N
o



lt

3
2

r
e
p
e
t
i
t
i
o
n
s
e
p
e
t
i
t
i
o
n
?
Y
e
s



3
2

r
e
p
e
t
i
t
i
o
n
s
7
What about the sign?
  • Positive numbers are easy.
  • How about negative numbers?
  • Please read Booth coding in textbook

8
Faster Multiply
A1 B
A0 B
A2 B
A3 B
A31 B
P1
P2
P0
P32-P63
P31
9
Simple Combinational Multiplier
tPD (2(N-1) N) tPD,FA
Components N HA N(N-1) FA
NB this circuit only works for nonnegative
operands
10
Carry-Save Combinational Multiplier
Observation Rather than propagating the sums
across each row, the carries can instead be
forwarded onto the next column of the following
row
tPD 8 tPD,FA
tPD (NN) tPD,FA
Components N HA N2 FA
11
Division
Start
1. Subtract Divisor from the Remainder leave the
result in the Remainder
gt0
lt0
Test Remainder
Restore Remainder by adding DivisorShift
Quotient to the leftset its rightmost bit 0
Shift Quotient to the leftset its rightmost bit
1
Shift Divisor Register right 1 bit
Repeat 33times
Write a Comment
User Comments (0)
About PowerShow.com