Binary Multipliers - PowerPoint PPT Presentation

About This Presentation
Title:

Binary Multipliers

Description:

Binary Multipliers The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding 9 8 7 6 5 4 3 2 1 0 1 0 0 0 0 0 – PowerPoint PPT presentation

Number of Views:90
Avg rating:3.0/5.0
Slides: 12
Provided by: Leona113
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
0 1 2 3 4 5 6 7 8 9
0 0 0 0 0 0 0 0 0 0 0
1 0 1 2 3 4 5 6 7 8 9
2 0 2 4 6 8 10 12 14 16 18
3 0 3 6 9 12 15 18 21 24 27
4 0 4 8 12 16 20 24 28 32 36
5 0 5 10 15 20 25 30 35 40 45
6 0 6 12 18 24 30 36 42 48 54
7 0 7 14 21 28 35 42 49 56 63
8 0 8 16 24 32 40 48 56 64 72
9 0 9 18 27 36 45 54 63 72 81
0 1
0 0 0
1 0 1
Youve got to be kidding It cant be that easy
Reading Study Chapter 3.1-3.4 (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