1 / 10

Lecture 2 Adders

Lecture 2 Adders. Half adder. Full Adder. si is the modulo-2 sum of ci, xi, yi. An n-bit Ripple Adder. Yn-1. Xn-1. Y0. X0. ………. Cn. FA. Cn-1. C1. FA. C0. Sn-1. S0. MSB. LSB. y. y. y. Adder/subtractor. n. –. 1. 1. 0. ¤. Add. Sub. control. x. x. x. n. –. 1. 1.

mlongley
Télécharger la présentation

Lecture 2 Adders

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 2 Adders • Half adder

  2. Full Adder si is the modulo-2 sum of ci, xi, yi.

  3. An n-bit Ripple Adder Yn-1 Xn-1 Y0 X0 ……… Cn FA Cn-1 C1 FA C0 Sn-1 S0 MSB LSB

  4. y y y Adder/subtractor n – 1 1 0 ¤ Add Sub control x x x n – 1 1 0 • - = add 2’s complement of the subtrahend • y xor 0 = y; y xor 1 = ~y c c n -bit adder 0 n s s s n – 1 1 0

  5. Overflow v.s. Carry-out • n-bit signed number: -2n-1 to 2n-1 -1 Detect overflow for signed number: Overflow = Cn-1⊕ Cn Overflow = Xn-1 Yn-1 ~Sn-1 (110) + ~Xn-1 ~Yn-1 Sn-1 (001) where X and Y represent the 2’s complement numbers, S = X+Y. (sign bits 0, 0 ≠ 1 ) 0111 0111 1111 Carry-out: for unsigned number

  6. x y x y 1 1 0 0 Propagate and Generateripple carry g p g p 1 1 0 0 c 1 c c • ci+1 = xiyi + (xi+yi)ci= gi + pici • A ripple-carry adder: critical path = 2n + 1 0 2 Stage 1 Stage 0 s s 1 0

  7. Propagate and GenerateCarry-Lookahead ci+1 = xiyi + (xi+yi)ci= gi + pici = gi + pi (gi-1 + pi-1ci-1) = gi + pigi-1 + pipi-1gi-2 + …+ pipi-1 …p2p1g0 + pipi-1…p1p0c0 For instance, c1 = g0 + p0c0 c2 = g1 + p1g0 + p1p0c0

  8. x y x y 1 1 0 0 Propagate and GenerateCarry-Lookahead x y 0 0 g p g p 1 1 0 0 c1 = g0 + p0c0 c2 = g1 + p1g0 + p1p0c0 3 gate delays c 0 c 2 c 1 D1 s s 1 0 D2 D3

  9. A Multiplier Array and adder

  10. Array of Adders for Unsigned Multiplication 4-bit example

More Related