You are on page 1of 66

Binary Arithmetic and

Arithmetic Circuits 8

Digital Logic Design_ 1


Baku - 2016 Yashar Hajiyev
Binary Arithmetic and Arithmetic Circuits
Binary Addition
Binary Arithmetic and Arithmetic Circuits
Binary Addition Half adder circuit
Binary Arithmetic and Arithmetic Circuits
Full adder circuit
Binary Arithmetic and Arithmetic Circuits
Full adder circuit
Binary Arithmetic and Arithmetic Circuits
Full adder circuit
Binary Arithmetic and Arithmetic Circuits
Full adder circuit

Full-Adder:
C = xy + (x'y + xy')z
Realizing that x'y + xy' = x(By and including the expression for output S,
we obtain the two Boolean
expressions for the full-adder:
S=x®y®z
C = xy + (x®y)z
Binary Arithmetic and Arithmetic Circuits
Subtraction
Binary Arithmetic and Arithmetic Circuits
Subtraction
Binary Arithmetic and Arithmetic Circuits
Half-Subtractor
Binary Arithmetic and Arithmetic Circuits
Half Subtraction circuit
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
If several digits ― several borrows are evident in subtraction;
If six binary places ― in subtractor circuits → six borrows to be used.
A halt subtractor may he used tor 1s. place.
Full subtractors to be used for ─2s., 4s., 8s., 16s., and 32s., columns.
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
How to wire two half subtractors (HS) and OR gate together to form full subtractor
(FS) circuit.
Inputs ― A (minuend), B (subtrahend), and Bin (borrow input).
Outputs ― Di (difference) and Bo (borrow output).
Bo and Bin lines ― connected from subtractor to subtractor to track of borrows.
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Truth table  for full subtractor → inputs - minuend ( A ) , subtrahend ( B ),
and borrow in (Bin).
Outputs → customary difference (Di) and borrow out (Bo).
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Binary Arithmetic and Arithmetic Circuits
Adder-Subtraction circuit
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Binary Arithmetic and Arithmetic Circuits
Binary Division

If bit in divisor is greater→ record ‘0’ in quotient column.


If it is smaller →subtract divisor from dividend bits and record a ‘1’ in
quotient column.
If it is greater→ record a ‘0’, and then, as second step, →
→ include next adjacent bit in the dividend bits;
Shift divisor to right by one bit position and again make a similar check
like in first step.
If it is smaller → made subtraction, then →in second step append to
remainder the next MSB of dividend, then shift divisor one bit to right
and again make a similar check.
The process continues until we have exhausted all bits in dividend.
Binary Arithmetic and Arithmetic Circuits
Binary Division

First step → subtract divisor from dividend. The subtraction requires borrow in MSB position, enter a
‘0’ in quotient column; otherwise, enter a ‘1’. Presently there is borrow in first MSB
position and ‘0’ in quotient column. If a borrow → divisor is added to result of subtraction.
Final carry, if any, is ignored. The next MSB is appended to the
result of first subtraction if there is no borrow, or to result of subtraction, restored by adding
the divisor, if there is a borrow.
Next MSB, the remaining bits of dividend are shifted one bit left.
Compared with divisor, and is repeated.
Until all bits of the dividend are exhausted. The final remainder can be further
processed by successively appending 0s and trying subtraction to get fractional part bits of quotient.
The quotient = 011 and remainder = 10.
Binary Arithmetic and Arithmetic Circuits
Binary Division by Shift and Subtract

 
 
Set quotient to 0
Align leftmost digits in dividend and divisor
Repeat
If that portion of the dividend above the divisor is greater than or equal to the divisor
Then subtract divisor from that portion of the dividend and
Concatentate 1 to the right hand end of the quotient
Else concatentate 0 to the right hand end of the quotient
Shift the divisor one place right
Until dividend is less than the divisor
quotient is correct, dividend is remainder
STOP
Binary Arithmetic and Arithmetic Circuits
Binary Division by Shift and Subtract

 
 
Set quotient to 0
Align leftmost digits in dividend and divisor
Repeat
If that portion of the dividend above the divisor is greater than or equal to the divisor
Then subtract divisor from that portion of the dividend and
Concatentate 1 to the right hand end of the quotient
Else concatentate 0 to the right hand end of the quotient
Shift the divisor one place right
Until dividend is less than the divisor
quotient is correct, dividend is remainder
STOP
Binary Arithmetic and Arithmetic Circuits
Binary Division by Shift and Subtract
Binary Arithmetic and Arithmetic Circuits
Binary Division by Shift and Subtract
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Truth table  for full subtractor → inputs - minuend ( A ) , subtrahend ( B ),
and borrow in (Bin).
Outputs → customary difference (Di) and borrow out (Bo).
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Binary Arithmetic and Arithmetic Circuits
Subtraction circuit in complement codes
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Truth table  for full subtractor → inputs - minuend ( A ) , subtrahend ( B ),
and borrow in (Bin).
Outputs → customary difference (Di) and borrow out (Bo).
Binary Arithmetic and Arithmetic Circuits
Hulf Subtraction circuit
Truth table  for full subtractor → inputs - minuend ( A ) , subtrahend ( B ),
and borrow in (Bin).
Outputs → customary difference (Di) and borrow out (Bo).
Binary Arithmetic and Arithmetic Circuits
Hulf Subtraction circuit
Truth table  for full subtractor → inputs - minuend ( A ) , subtrahend ( B ),
and borrow in (Bin).
Outputs → customary difference (Di) and borrow out (Bo).
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit (complement algorithm )
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit (complement algorithm )
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit (complement algorithm )
Binary Arithmetic and Arithmetic Circuits
Full Subtraction and Adder circuit (complement algorithm )
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit (complement algorithm )
Binary Arithmetic and Arithmetic Circuits
Binary Multiplication
Binary Arithmetic and Arithmetic Circuits
Binary Multiplication
Binary Arithmetic and Arithmetic Circuits
Binary Multiplication
Binary Arithmetic and Arithmetic Circuits
Binary Multiplication
Binary Multiplication
Binary multiplication is similar to decimal multiplication.
There four rules of the binary multiplication
Binary Multiplication
Binary multiplication is similar to decimal multiplication.
There four rules of the binary multiplication
Binary Division
Binary Arithmetic and Arithmetic Circuits
Full Subtraction circuit

You might also like