Basic Adders and Counters: Lecture Notes on Digital Circuits, Study notes of Electrical and Electronics Engineering

Material Type: Notes; Class: Computer Arithmetic; Subject: Electrical & Computer Enginrg; University: George Mason University; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 02/10/2009

koofers-user-d25
koofers-user-d25 ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 18

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Basic Adders and Counters
Lecture 3
Half-adder
x
y
c
sHA
x +y = ( c s )2
2 1
x y c s
0
0
1
1
0
1
0
1
0
0
0
1
0
1
1
0
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Basic Adders and Counters: Lecture Notes on Digital Circuits and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Basic Adders and Counters

Lecture 3

Half-adder

x y

c s

HA

x + y = ( c s ) 2

2 1

x y c (^) s 0 0 1 1

0 1 0 1

0 0 0 1

0 1 1 0

Half-adder

Alternative implementations (1)

s = xy + xy

b)

a)

s = x โŠ• y

c = xy

c = x + y

c) c = xy

s = xc + yc = xc โ‹… yc

Half-adder

Alternative implementations (2)

Full-adder

Alternative implementations (2)

s = x โŠ• y โŠ• cin = xycin + xycin + xycin + xycin

b) cout = xy + xcin + ycin

Full-adder

Alternative implementations (3)

c)

x y cout s 0 0 1 1

0 1 0 1

0

1

cin cin

cin

cin

cin cin

x y

A A1^ XOR^

D

0 1

Cin

Cout

S p

g

Full-adder

Alternative implementations (4)

Implementation used to generate fast carry logic in Xilinx FPGAs

x y cout 0 0 1 1

0 1 0 1

y

y

cin cin

p = x โŠ• y g = y s= p โŠ• cin = x โŠ• y โŠ• cin

Latency of a k -bit ripple-carry adder

Tripple-add = TFA(x,yโ†’cout) +
+ ( k -2) โ‹… TFA(cinโ†’cout) +
+ TFA(cin โ†’s)

Latency โ‰ˆ k โ‹… TFA

Latency โˆ k

Overflow for signed numbers (1)

Indication of overflow Positive

  • Positive = Negative

Negative

  • Negative = Positive

Formulas

Overflow2โ€™s complement = xk-1 yk-1 sk-1 + xk-1 yk-1 sk-1 =

= ck โŠ• ck-

Bit-serial

adder

ai bi

si

c 0

ci start

clk

Digit-serial

adder

d d

d

ai bi

si

c 0

ci start

clk

Addition of a constant (1)

xk-1 xk-2... x 1 x 0 yk-1 yk-2... y 1 y 0

variable

  • constant

xk-1 xk-2... xh+1 xh xh-1... x 0 yk-1 yk-2... yh+1 1 0... 0

variable

  • constant

xh xh-1... x 0

sk-1 sk-2... s 1 s 0

sk-1 sk-2... sh+

Addition of a constant (2)

HA/^... MHA

HA/ MHA

HA/ MHA

HA/ MHA

xk-1 xk-2... xh+2 xh+1 xh xh-1... x 0

..

sk-1 sk-2... (^) sh+2 sh+1 xh xh-1... x 0

If yi = 0 Half-adder (HA) yi = 1 Modified half-adder (MHA)

ck

Possible solutions to the

carry propagate problem

  1. Detect the end of propagation rather than wait for the worst-case time
  2. Speed-up propagation via
  • look-ahead
  • carry skip
  • carry select, etc
  1. Limit carry propagation to within a small number of bits
  2. Eliminate carry propagation through the redundant number representation
Expected length of the carry chain
that starts at position i (2)

Expected length( i , k ) =

2 2

โˆ’

k i

For i << k

Expected length of the carry propagation is โ‰ˆโ‰ˆโ‰ˆโ‰ˆ 2

Carry completion detection

Two-rail code

bi ci

0 0

0 1

1 0

carry not yet known

carry known to be 1

carry known to be 0

Meaning

Manchester Carry Chains and Adders

Generate signal: gi = xiyi Propagate signal: pi = xi โŠ• yi Anihilate (absorb) signal: ai = xi yi = x + y

Transfer signal: ti = gi + pi = ai = xi + yi cout =1 given cin = 1

ci+1 = gi + cipi = = (gi + cigi) + cipi = = gi + ci (gi + pi) = = gi + ci ti

X + XY = X Absorption law