8 Alternative: full adder using AND-OR X’Y’C-inXY’C-in’Sum SX’YC-in’XYC-inX’XY’YC-inC-in’XX’YY’C-inC-in’FullAdderXYSC-inC-outXYYC-inC-outXC-inXYC-in
9 Q: Do we need C4 for a 4-bit 2’s complement addition? Ripple adderSpeed limited by carry chain2 per full adder 2n for an n-bit adderApproach: eliminate or reduce carry chainCarry look-ahead: compute Cin directly from external inputsQ: Do we need C4 for a 4-bit 2’s complement addition?
10 Carry look-ahead adder Let Ci+1 = (Xi·Yi)+ (Xi+Yi)· Ci = Gi + Pi · CiFor a 4-bit adder …C1 = G0 + P0·C0C2 = G1 + P1·C1 = G1 + P1·G0 + P1·P0·C0C3 = G2 + P2·G1 + P2·P1·G0 + P2·P1·P0·C0C4 = G3 + P3·G2 + P3·P2·G1 + P3·P2·P1·G0 + P3·P2·P1·P0·C0where Gi = Xi · Yi Pi = Xi + YiThis is a 3 level circuit including generating the Gs and PsRule of thumb: one carry look-ahead circuit every 4-bit
11 Carry look-ahead circuit Gs and Ps are also usefulfor generating the sums
14 SubtractionRecall our discussion on subtraction for 2’s complement …X – Y = X + Y + 1Invert all bits of Y and set Cin to 1Example: 4-bit subtractor using 4-bit adderAdd a control circuit inALU s.t. same circuit canbe used for both additionand subtraction4-bitAdderX3 X2 X1 X0D3 D2 D1 D0C-inC-outC4Y3 Y2 Y1 Y0C0 = 1S3 S2 S1 S0
18 Binary Multiplication An n-bit X n-bit multiplier can be realized in combinational circuitry by using an array of n-1 n-bit adders where is adder is shifted by one position.For each adder one input is the multiplied by 0 or 1 (using AND gates) depending on the multiplier bit, the other input is n partial product bits.X3 X2 X1 X0x Y3 Y2 Y1 Y0__________________________X3.Y0 X2.Y0 X1.Y0 X0.Y0X3.Y1 X2.Y1 X1.Y1 X0.Y1X3.Y2 X2.Y2 X1.Y2 X0.Y2X3.Y3 X2.Y3 X1.Y3 X0.Y3_______________________________________________________________________________________________________________________________________________P P P P P P P P0
Your consent to our cookies if you continue to use this website.