80 likes | 99 Views
Arithmetic Circuits II. Multiplier. Given the multiplicand, B = {B 1 B 0 } and the multiplier A = {A 1 A 0 } Then we multiply by doing single-bit multiplications and shifts. AND computes A 0 B 0. A. 0. B. B. 1. 0. A. 1. B. B. 1. 0.
E N D
Multiplier • Given the multiplicand, B = {B1 B0} and the multiplier A = {A1 A0} • Then we multiply by doing single-bit multiplications and shifts
AND computes A0 B0 A 0 B B 1 0 A 1 B B 1 0 Half adder computes sum. Will need FA for larger multiplier. HA HA C C C C Figure 5-11 3 2 1 0 Combinational Multiplier
Multiplication of Larger Numbers Example: • 4-Bit Multiplicand B = {B3 B2 B1 B0} • 3-Bit Multiplier A = {A2 A1 A0} • Product is a 7-Bit number, C = {C6 C5 C4 C3 C2 C1 C0 }
Computing the Product • Let us work out the multiplication on the board:
Figure 5-11 4-Bit by 3-Bit Binary Multiplier Larger Multiplier
Sign Extension • Changing the number of bits used to store a number is common • Example: • -5 in stored in 4-bits (1011) • to store -5 in 8 bits, extend the “Sign Bit” in the 4 left most bits • 1011 is changed to 1111 1011 • 1011 = -5 • 1111 1011 is also -5
We’ve Covered • Adders • Ripple carry • Carry lookahead • Subtracting unsigned numbers • New design for adder-subtractor • Signed numbers • Signed addition/subtraction • Multiplication – just basic • Modified Circuits