Download presentation
Presentation is loading. Please wait.
Published byColeen Daniel Modified over 8 years ago
1
Binary Multiplication Magnitude Comparison Section 4.5, 4.7 and 4.8
2
Two-Bit Binary Multiplier (multiplicand) (multiplier)
3
000 010 100 111 Use an AND gate to multiply A 0 and B 0
4
Hardware Correlation
5
G0G1 G2G3 W[0] W[1] W[2] W[3]
6
two_bit_multiplier.v
7
two_bit_multiplier_top.v
10
A Four-Bit Adder
11
Four-bit by three-bit Binary Multiplier B3B2B1B0 A2A1A0 0A0B3A0B2A0B1A0B0 A1B3A1B2A1B1A1B0 C14S13S12S11S10 A2B3A2B2A2B1A2B0 C6C5C4C3C2C1C0 S10=A0B1+A1B0 S11=A0B2+A1B1+C11 S12=A0B3+A1B2+C12 S13=0+A1B3+C13 (S1X/C1X, where 1 is the first 4-bit adder)
12
Four-bit by three-bit Binary Multiplier
13
Magnitude Comparison Given A and B where – A=A 3 A 2 A 1 A 0 – B=B 3 B 2 B 1 B 0 Three possibilities: – A=B – A>B – A<B
14
A=B A=B, if all pairs of significant digits are equal – A 3 =B 3 – A 2 =B 2 – A 1 =B 1 – A 0 =B 0 Each pair can be equal if they are either 0s or 1s – X i =A i B i +A’ i B’ i
15
Magnitude Comparator Circuit
16
Equality Check X i =A i B i +A’ i B’ i (Identical?)
17
A>B Start from the most significant bit – A=1*** >B=0*** Work toward less significant bits – A=11**>B=10**
18
Interpretation Comments: If any of the terms gives rise to a 1 A>B. 1 if A 3 =1 and B 3 =0 x 3 can only be a 1 if A 3 =B 3. x 2 can only be a 1 if A 2 =B 2. X 1 can only be a 1 if A 1 =B 1. Interpretation: 1 is only possible if A3=B3 and A2=1 and B2=0.
19
A>B
20
(Does this equation make sense?)
21
Verilog Operator
22
Verilog
23
Greater than
24
Less than
25
Equal
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.