CA Notes 01
CA Notes 01
This representation has fixed number of bits for integer part and for fractional part. For
example, if given fixed-point representation is XXXX.XXXX, then you can store minimum
value is 0000.0001 and maximum value is 9999.9999. There are three parts of a fixed-point
number representation: the sign field, integer field, and fractional field. Binary or decimal
point is fixed.
Floating point representation
In the fixed point representation binary or decimal point is the same place.
0.23, 5.12 and
10010.11101 and 0.1110.
Exponent
Mantissa
6.0210 X1023
Base or
radix
1.0010, x 21011
Range: Distance between the largest positive and negative number represented by number
system. For given number system range is + 24 to -24.
Overflow: Conditionwhen we try to represent the number which value is out of the range of
given number system. If we try to represent 50 by using above representation it will show the
overflow condition.
Underflow: Condition when we try to represent the number which value is less than the
precision of that number system. For example if try to represent the nunber less than 0.125 it
will be under flow.
.00101 1.01 3
|1.0001 1.0001
10000011.0 1.0000011 7
IEEE Long Real: 64 bits 1 bit for the sign, 11 bits for the exponent, and 52 bits for the
(double precision) mantissa. Also called double precision.
The bits in an IEEE 754 (32 bit) are arranged as follows, with the most significant bit
(MSB)
on the left:
2322
Signt
Exponent Mantissa (23 bit)
(8 bits)
IEEE 754 (32-bit )
N= (-12E-127 (1. M)
provided that 0< E<255
The exponent is the 8-bit excess-127 code, hence the
127. The base of the floating point number is 2. Inactual exponent value is computed as E
actually 1.M, where the 1to the left of the binary pointthisis format
an
the complete mantissa is
implicit or hidden leading bit
that is not stored with the number. It is
representation.
represented in the form of 1.M, it is normalized
M=1110000000......
Sum Si=XY:G+X
YCi + XiYCi +X:YG
Carry Ci+l =XiYi + YCi +XC:
Xi
Yi
Si
Ci
X Yi
Ci+1 FA
C -
-
Ci1
S
Full Adder
Full Adder
(Block Diagram) (Gate level realization )
Figure A.1: Full adder block diagram and gate level realization
TableA.1: Full Adder TruthTable
Xi Yi Ci Si(Sum) Ci+1 (Carry)
0 0 0
0 0
0
1 1
1 1 1
1 0 1 0 1
/
1
1 1 1 1
The design of logical circuit may be time or pace iteration. In time iteration circuit is simple
but ncreased time. However, in space iteration increased hardware with reduced time.
Basic block diagram for time iterative design is given below for 4-bit addition. Two 4-bit data
Xand Yare stored in 4-bit shift registers and 4-bit result S is stored in 4-bit shift register:.
FA
Y Carry
Serial adder
(time iteration implementation)
Cn FA n-1
Cn-1 FA1 FAo
Ca
Co
Sn-t
S1
So
n-bit ripple carry adder
S
So In this
S2
blier are
4-bit ripple carry adder er steps
carryadder ined by
Figure A.4:4-bit ripple here the
een.
Pa-l
&n-2Pn-2 Pi+l
P Po
C, 8o|
Carry Network
Co
C-l
C
S;
Carry Propagation Network
gi =Xi Yi
(carry generate)
Pi= X{ yi (carry
propagate)
Ci+1 = git pi Ct
Carry propagation
length
Bit
12 11 10 9
position 7 6 4 3 2
0 1
Cout 1 0
1 0 1
1 1
C,
Carry Propagation Network of ripple carry
adder
83 P3 81P, 8oPo
82
4-bit Carry lookahead
generator Co
S So
S
mu them operationst8
isusedfor inyolvescanning the algorithmtreats
whichof Booth
mine tinn.The of0's or1'sin
-n atthe
Inthis
are
aple.
32 input OR
Fabrication of 32-bit AND and OR gate is very dificult, therefore CLA is not preferred beyond
4-bit. Cascaded (carry ripple through) design can be used for higher size adder using 4-bit CLA
as a basic element.
Single level design of 16-bit adder using 4-bit CLA is given below.
DelaycaBculation: C
p, 2 gate for carry propagation from
the C:(1gate delay for g and
3 gate delay to generate
to C)
propagate carry from C4 to C&
2gate delay for
Led
from Cg to Ci2
2 gate delay for propagate carry
th
to C16
delay for propagate carry from C12 (KOR) gate
2 gate available after 1gate pot
S;s will be
9 gate delay and sum
Carry C6 is avaiable after khe
delay).
delay (total 10 gate adder built from 4 bit
adder
show the 16-bit
adder: igure given below therefore,
Two level 16-bit g and p, where k is level,
generate the two signals
block. 2nd Jevel carry logic the first
k=1 for second 4-bit block and so on. In
blocks) k=0, and
for first level (first 4-bit
adder block
P3P2P19o
på =P3P2P1Po and go = 93 tP3g2 t PsP291+
P7PePsg4
Pi=PP6PsP4 and gi = g7 t Prg6 t pP6gs +
P11P10 P9I8
p = P11P1o P9P8 and g = g11 + P11g1o + P11P10 99 +
P15P14 P13I12
p= P1sP4P13P12 and g = 915 + P15914 t P1sP14I13 +
8 p
1
Carry look ahead logic
Po
2 level 16-bit CLA
These expressions for C16, C12, Cg, C4 are identical in from of the C4, Cg, Cz, CË of basic carry
lookahead circuit. Therefore, carry look-ahead circuit given in two level logic is same as 4-bit
basic caTy look-ahead generate logic.
1000
Multinlier
Delay calculation
1gate delay to produce g and p signals.
2 gate delay to produce the signals gå and p,.
2 gate delay to produce any carrier cks Cub,Co. C.. Therefore C16 will be available after 5 gate
delay after x, y and Co are applied as input to adder.
C12 is available after 5gate delay which willtake other 2gate delay to propagate up to C1sthe
and other one (XOR) gate delay to produce the Sit, therefor total 8 gate delay to produce
final sum bits.
In two level 16-bit CLA requires 5 and8 gate delay to produce C16 and S15 respectively,
however a 16-bit adder designed by cascading 4-bit adder takes 9 and 10 gate delay to
produce them.
Similarly, higher bit adder like 32-bit and 64-bit adder can be designed by using 16-bit adder
and multi-level or cascaded design.
We can include the logic for overflow, carry, sign and zero status by designing external
circuit.
Signed Addition/Subtraction:
Follow circuit can be used for signed addition/ subtraction. This also includes the overflow,
carry and zero status. These can be used check the status of result and make any correction if
required.
X3 Y3 X2 Y2 X1 Xo Yo
C4 - FA FA FA FA
C3 C C1 Co
V 3+
N S2 S1 So
V= Overflow S3 =Sign
Z= Zero C4 =Carry
Status bits
Study yourself:
Carry skip adder and carry store adder, and compare with carry propagate (ripple) adder.
for first level (first 4-bit
blocks) k = 0, and k =1 for second 4-bit
adder block block and so on. In the first
Po =P3P2P1Po and
g = 93 +P392 +
PsP291 t P3P2P19o
pi=piP6PsP4 and
gi = g7 tp796 t
prP6gs t PP6PsJ4
pi =P11P10PP8 and gi = 911+ P11J10 +
Pi1P10g + P11P10P998
p=P1sPi4P13P12 and
g3 = 915 + P1s914 t
P1sPi4g13 t P1sP14P13912
Po 8,
2 level 16-bit CLA
Carry C1sis formed by the carry
look-ahead circuit.
C16 = 9 t psgt t ppgi +ppipig× +
These expressions for C16, C12, Cg, C4
pap2pipico
are identical in from of the C4, C3,
lookahead circuit. Therefore, carry look-ahead circuit Cz, C of basic
basic carry look-ahead generate logic. given in two level logic is samecarry
as 4-bit