Binary Multiplier
Binary Multiplier
Design steps:
Design of register operations in the datapath
Design of control logic
Diamond boxes determine the conditions for
next state transition
Register transfer operations come from State
and Conditional boxes
Binary
T0
T1
T2
T3
00
01
10
11
Gray code
00
01
11
10
One-Hot
0001
0010
0100
1000
State Table:
Present
state
G1 G0
Inputs
0
0
0
1
1
1
0 X
1 X
X X
X X
X 0
X 1
0
0
1
0
1
1
Next
state
G1 G0
0
0
1
1
1
0
0
1
0
1
0
0
Outputs
T0 T1 T2 T3
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
Input
Inputs
conditions
MUX1
MUX2
w
w
0
w
x
x
1
x
y
yz
yz+yz = y
yz
yz
yz
y
yz
y + yz = y + z yz +yz =y
Design Example:
Count number of 1s in a register
Two registers R1 and R2 and Flip-flop E
System counts number of 1s in R1 and sets R2
to that number.
Done by shifting each bit in R1 one at a time
into E, E checked by control and if 1 R2 is
incremented.
Control uses external input S to start and
uses status input E and Z from datapath.
Z = 1 when R1 = 0
Input
conditions
S
S
Inputs
MUX1
MUX2
0 1
0 1
0
1
0
0
Z
Z
1 0
None
1 1
1 1
1 0
0 1
E
E