COA-II Unit
COA-II Unit
TECHNOLOGY , Ghaziabad
Computer Organization And Architecture
BCS-302
Unit: II
COA
Sequential circuits are those which are dependent on clock cycles and depends
on present as well as past inputs to generate any output.
Adder
Adder :- A combinational circuit that performs the addition of bits is called an
Adder. Each computer has an adder located in its CPU(ALU) that is responsible
for the process of addition ,calculation of memory address and many other work.
There are two types of Adder..
Half Adder
Full Adder
Half Adder:-A combinational circuit that performs the addition of two bits is
called a Half Adder. It receives two inputs and produces two outputs Sum and
Carry. The block diagram for a half adder is as follows.
Adder
Adder
Full Adder:- A combinational circuit that performs the addition of three bits is
called a Full Adder. It receives three inputs and produces two outputs Sum and
Carry. The Block diagram for the Full Adder is shown below.
Adder
Adder
Full Adder Using 2 half Adder
Adder
Disadvantage of Full Adder:
In parallel adders, carry output of each full adder is given as a carry input to the next
higher-order state. Hence, these adders it is not possible to produce carry and sum outputs
of any state unless a carry input is available for that state.
So, for computation to occur, the circuit has to wait until the carry bit propagated to all
states. This induces carry propagation delay in the circuit.
Consider the 4-bit ripple carry adder circuit above. Here the sum S3 can be produced as soon as
the inputs A3 and B3 are given. But carry C3 cannot be computed until the carry bit C2 is
applied whereas C2 depends on C1. Therefore to produce final steady-state results, carry must
propagate through all the states. This increases the carry propagation delay of the circuit.
The propagation delay of the adder is calculated as “the propagation delay of each gate times
the number of stages in the circuit”. For the computation of a large number of bits, more
stages have to be added, which makes the delay much worse. Hence, to solve this situation,
Carry Look-ahead Adder was introduced.
Carry Look-ahead Adder
Carry Look-ahead Adder :- is the faster adder circuit. It reduces the propagation delay,
which occurs during addition, by using more complex hardware circuitry. It is designed by
transforming the ripple-carry Adder circuit such that the carry logic of the adder is changed
into two-level logic. (Predict the Carry)
Carry Look-ahead Adder
Carry Generate Gi =1. It depends on Ai and Bi inputs. Gi is 1 when both Ai and Bi are
1. Hence, Gi is calculated as Gi = Ai. Bi.
Carry propagated Pi is associated with the propagation of carry from Ci to Ci+1. It is
calculated as Pi = Ai Bi
Using the Gi and Pi terms the Sum Si and Carry Ci+1 are given as below –
Si = Pi Gi.
Ci+1 = Ci.Pi +Gi.
Therefore, the carry bits C1, C2, C3, and C4 can be calculated as
C1 = C0.P0+G0.
C2 = C1.P1+G1 = ( C0.P0+G0).P1+G1.
C3 = C2.P2+G2 = (C1.P1+G1).P2+G2.
C4 = C3.P3+G3 = C0.P0.P1.P2.P3 + P3.P2.P1.G0 + P3.P2.G1 + G2.P3 + G3.
Carry Look-ahead Adder
C1 = C0P0 + G0
C2 = C0P0P1 + G0P1 + G1
Carry Look-ahead Adder
C2 = C1.P1+G1 = ( C0.P0+G0).P1+G1.
C3 = C2.P2+G2 = (C1.P1+G1).P2+G2.
C4 = C3.P3+G3 = C0.P0.P1.P2.P3 +
P3.P2.P1.G0 + P3.P2.G1 + G2.P3 +
G3
Carry Look-ahead Adder
C1 = C0P0 + G0
C2 = C1.P1+G1 = ( C0.P0+G0).P1+G1.
C3 = C2.P2+G2 = (C1.P1+G1).P2+G2.
C4 = C3.P3+G3 = C0.P0.P1.P2.P3 +
P3.P2.P1.G0 + P3.P2.G1 + G2.P3 +
G3
Carry Look-ahead Adder
Carry Look-ahead Adder
Disadvantages –
•The Carry Look-ahead adder circuit gets complicated as the
number of variables increase.
•The circuit is costlier as it involves more number of hardware.
https://www.youtube.com/watch?v=6Z1WikEWxH0
MULTIPLICATION OF TWO NUMBERS
Multiplication of two fixed point binary number in signed magnitude representation is
done with process of successive shift and add operation.
In the multiplication process we are considering successive bits of the multiplier, least
significant bit first.
If the multiplier bit is 1, the multiplicand is copied down else 0’s are copied down.
The numbers copied down in successive lines are shifted one position to the left from
the previous number.
Finally numbers are added and their sum form the product.
The sign of the product is determined from the sign of the multiplicand and multiplier.
If they are alike, sign of the product is positive else negative.
MULTIPLICATION OF TWO NUMBERS
Hardware Implementation for Multiplying Binary Numbers
Hardware Implementation
https://www.youtube.com/watch?v=meSn0UXmgac
MULTIPLICATION OF TWO NUMBERS
BOOTH.S MULTIPLICATION ALGORITHM
MULTIPLICATION OF TWO NUMBERS
MULTIPLICATION OF TWO NUMBERS
MULTIPLICATION OF TWO NUMBERS
MULTIPLICATION OF TWO NUMBERS
MULTIPLICATION OF TWO NUMBERS
MULTIPLICATION OF TWO NUMBERS
MULTIPLICATION OF TWO NUMBERS
MULTIPLICATION OF TWO NUMBERS
MULTIPLICATION OF TWO NUMBERS
Array Multiplier
• The multiplication of two binary numbers can be done with one micro
operation by means of a combinational circuit (called Array Multiplier) that
forms the product bits all at once.
• This is a fast way of multiplying two numbers since all it takes is the time for
the signals to propagate through the gates that form the multiplication array.
• However, an array multiplier requires a large number of gates, and for this
reason it was not economic.
• For Multiplier j bits
Multiplicand k bits
j x k AND gates are required
(j - 1) k-bit adders to produce a product of j + k bits.
Array Multiplier
Multiplier j bits
Multiplicand k bits
j x k AND gates
(j - 1) k-bit adders to
produce a product of
j + k bits.
j=2,k=2
AND Gates 2*2=4
1,2 bit adders
2+2 =4 bit product
Array Multiplier
Multiplier j bits
Multiplicand k bits
j x k AND gates
(j - 1) k-bit adders to
produce a product of
j + k bits.
j=3,k=4
AND Gates 3*4=12
2,4bit adders
3+4=7bit product
Array Multiplier
Multiplier j bits
Multiplicand k bits
j x k AND gates
(j - 1) k-bit adders to
produce a product of
j + k bits.
j=3,k=4
AND Gates 3*4=12
2,4bit adders
3+4=7bit product
Division Algorithm
The Division of two fixed-point binary numbers in the signed-magnitude
representation is done by the cycle of successive compare, shift, and subtract
operations.
Division Algorithm
Division Algorithm
Division Algorithm
Division Algorithm
.53735 x 10 3
Consider the addition of two real decimal numbers as fixed point numbers:
1234.00
+ 56.78
1290.78
Now if we try to add the same numbers written in floating point notation, we see that
simply adding the mantissas will not make sense unless the exponents are equal:
0.1234 * 104
+ 0.5678 * 102
Floating Point Arithmetic operation
Thus, the following steps must be carried out before adding / subtracting
two floating point numbers:
1. Make the exponents of the two numbers equal by making the smaller
exponent equal to the larger and dividing the mantissa of the smaller
number by the same factor by which its exponent was increased, in order to
preserve the actual value of the number.
2. Add / subtract the mantissas.
3. If necessary, re-normalize the result (this is called post-normalization).