Beruflich Dokumente
Kultur Dokumente
Arithmetic Circuits
Circuits that preform arithmetic operations which are important part of digital design These circuits form the basis for a microprocessor's ALU and commonly used in many other applications Typically operate on binary input vectors, and output a resulting vector
Example: n=32 means 64 inputs and 32 outputs 264 truth table rows-impractical!! Iterative array takes advantage of the regularity to make design feasible
Binary Adders
Binary addition is used frequently Similar to decimal addition but with two possible digits: 0 and 1 Example-8 bit addition 01001101 77 +01010110 +86 10100011 163
Half Adder
A half adder generates the sum of two binary digits: 0 0 1 1 x +0 +1 +0 +1 +Y 00 01 01 10 C.S
0
0 1 X X 0 0 1 0 1 1 1
0
1 0 0 1
0
0 0 0 1
0
1 1 1 0 Y 0 X 0 0 X 0 0 1 1
Y 0
Y 1
S X Y XY
C XY
Implementations: Half-Adder
The logic diagram of the half-adder
S X Y
C X Y
Full Adder
A full adder is similar to half adder, but includes a carry-in-bit, Z, from lower stages
Z X +Y CS Z X +Y CS 0 0 +0 00 1 0 +0 01 0 0 +1 01 1 0 +1 10 0 1 +0 01 1 1 +0 10 0 1 +1 10 1 1 +1 11
11
1 0
10
0 1
Z 1
C:
Z
XY
0
X 11 1 1 0 1 10
00 0 1
01
X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
C 0 0 0 1 0 1 1 1
S 0 1 1 0 1 0 0 1
0 0
Z 1
S X Y Z X Y Z X Y Z X Y Z C X Y X Z Y Z
S (X Y) Z C XY Z ( X Y )
FA
FA
FA
FA
C0
C4
S3
S2
S1
S0
Carry-Lookahead Adders
Define: Carry Generate
Gi Ai Bi
Ci Ai Bi Si C i 1
Carry-Lookahead Adders
Express the sum(S) and carry(C) in terms of generate/propagate:
S i ( Ai Bi ) C i Pi C i C i 1 Ai Bi C i ( Ai Bi ) Gi C i P