Vous êtes sur la page 1sur 9

Digital Design Lab ENG.

GHADIR AL JARO

Objectives:
1. To study adder and subtractor circuits using logic gates.

2. To construct and test various adders and subtractor circuits.

Theory:

Adders:

Adder circuit is a combinational digital circuit that is used for adding two numbers.
A typical adder circuit produces a sum bit (denoted by S) and a carry bit (denoted
by C) as the output. Typically adders are realized for adding binary numbers but

they can be also realized for adding other formats like BCD (binary coded decimal).

Adder circuits are of two types: Half adder ad Full adder.

1. Half Adder:
Half adder is a combinational arithmetic circuit that adds two numbers and
produces a sum bit (S) and carry bit (C) as the output. If A and B are the input
bits, then sum bit (S) is the X-OR of A and B and the carry bit (C) will be the
AND of A and B. From this it is clear that a half adder circuit can be easily
constructed using one X-OR gate and one AND gate. Half adder is the simplest
Digital Design Lab ENG. GHADIR AL JARO

of all adder circuit, but it has a major disadvantage, the half adder can add only
two input bits (A and B) and has nothing to do with the carry if there is any in
the input, So if the input to a half adder have a carry, then it will be neglected it
and adds only the A and B bits. That means the binary addition process is not
complete and that’s why it is called a half adder. The truth table, schematic
representation and XOR/AND realization of a half adder are shown in the figure
below.

2. Full Adder:

Full adder is a logic circuit that adds two input operand bits plus a Carry in bit and
outputs a Carry out bit and a sum bit. The Sum out (Sout) of a full adder is the XOR
of input operand bits A, B and the Carry in (Cin) bit. Truth table and schematic of a

1 bit Full adder is shown below.


Digital Design Lab ENG. GHADIR AL JARO

A Full adder can be made by combining two half adder circuits together (a half

adder is a circuit that adds two input bits and outputs a sum bit and a carry bit).
Digital Design Lab ENG. GHADIR AL JARO

Subtractors:

The subtraction of two binary numbers may be accomplished by taking the


complement of the subtrahend and adding it to the minuend. By this method, the
subtraction operation becomes an addition operation requiring full adders for its
machine implementation. It is possible to implement subtraction with logic circuits in
a direct manner. By this method, each subtrahend bit of the number is subtracted
from its corresponding significant minuend bit to form a different bit. If the minuend
bit is smaller than the subtrahend bit, a 1 is borrowed from the next significant
position. The fact that a 1 has been borrowed must be conveyed to the next higher
pair of bits by means of a binary signal coming out (output) of a given stage and

going into (input) the next higher stage.

1. Half Subtractor:

The half-subtractor is a combinational circuit which is used to perform subtraction of


two bits. It has two inputs, X (minuend) and Y (subtrahend) and two outputs D

(difference) and B (borrow).


Digital Design Lab ENG. GHADIR AL JARO

2. Full Subtractor:

The full-subtractor is a combinational circuit which is used to perform subtraction of


three bits. It has three inputs, X (minuend) and Y (subtrahend) and Z (subtrahend)
and two outputs D (difference) and B (borrow).
Digital Design Lab ENG. GHADIR AL JARO

Parallel Addition:

Multiple full adder circuits can be cascaded in parallel to add an N-bit number. For
an N- bit parallel adder, there must be N numbers of full adder circuits. A ripple
carry adder is a logic circuit in which the carry-out of each full adder is the carry in
of the succeeding next most significant full adder. It is called a ripple carry adder
because each carry bit gets rippled into the next stage. In a ripple carry adder the
sum and carry out bits of any half adder stage is not valid until the carry in of that

stage occurs.

Note that the first (and only the first) full adder may be replaced by a half adder.

Adder-Subtractor:

In digital circuits, an adder–subtractor is a circuit that is capable of adding or


subtracting numbers (in particular, binary). Below is a circuit that does adding or
subtracting depending on a control signal. It is also possible to construct a circuit

that performs both addition and subtraction at the same time.


Digital Design Lab ENG. GHADIR AL JARO

sel: controller, adding when sel=0 and Subtracting when sel=1.

V: overflow flag, denote that an overflow happened when V=1.

Lab Work:

Part 1:

a) Construct the circuit of HA using module KL-33004 block a, connect inputs A and
B to data switches and outputs F1 (carry) and F2 (sum) to LEDs then find the
truth table.
Digital Design Lab ENG. GHADIR AL JARO

b) Construct the circuit of FA using module KL-33004 block a, connect inputs A, B


and C to data switches and outputs F3 (carry) and F5 (sum) to LEDs then find the
truth table.
c) Construct the circuit of HS and FS using module KL-33004 block a.

Part 2:

Use the IC 7483 to add binary numbers A and B.

Connect inputs A1A4, B0B3 to DIP Switches DIP2: O3 and DIP1:03 respectively.
Connect Σ1, Σ2, Σ3, Σ4 , C4 to LEDs L1L5. Follow input sequences in the table

below, record C4 and sum in hexadecimal numbers.


Digital Design Lab ENG. GHADIR AL JARO

Y X Σ F1 (carry)
0 0
0 1
0 6
0 9
0 F
1 3
1 6
1 8
3 6
4 8
4 F
8 7
9 9
A B
C E
F F

Exercises:
a) Implement the 4-bit Borrow Ripple Subtractor using Full Subtractor.
b) Implement the 4-bit Borrow Ripple Subtractor using Full Adder.
c) Connect two 7483 ICs to add two binary numbers each of 8 bit. Show schematic

diagram.

Vous aimerez peut-être aussi