250 likes | 369 Views
Binary Multiplication Magnitude Comparison. Section 4.5, 4.7 and 4.8. Two-Bit Binary Multiplier. (multiplicand). (multiplier). Use an AND gate to multiply A 0 and B 0. Hardware Correlation. Hardware Correlation. G1. G0. G3. G2. W[2]. W[0]. W[1]. W[3]. two_bit_multiplier.v.
E N D
Binary MultiplicationMagnitude Comparison Section 4.5, 4.7 and 4.8
Two-Bit Binary Multiplier (multiplicand) (multiplier)
Hardware Correlation G1 G0 G3 G2 W[2] W[0] W[1] W[3]
Four-bit by three-bit Binary Multiplier 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)
Magnitude Comparison • Given A and B where • A=A3A2A1A0 • B=B3B2B1B0 • Three possibilities: • A=B • A>B • A<B
A=B • A=B, if all pairs of significant digits are equal • A3=B3 • A2=B2 • A1=B1 • A0=B0 • Each pair can be equal if they are either 0s or 1s • Xi=AiBi+A’iB’i
Equality Check • Xi=AiBi+A’iB’i (Identical?) ==(+)(+B0)=+++0=+ 0
A>B • Start from the most significant bit • A=1*** >B=0*** • Work toward less significant bits • A=11**>B=10**
Interpretation x3 can only be a 1 if A3=B3. x2 can only be a 1 if A2=B2. X1 can only be a 1 if A1=B1. 1 if A3 =1 and B3=0 Interpretation: 1 is only possible if A3=B3 and A2=1 and B2=0. Comments: If any of the terms gives rise to a 1 A>B.
A>B A>B