Вы находитесь на странице: 1из 7

# Experiment#3 Binary addition and Subtraction

Experiment # 3
Combinational Circuits (I)

Objectives:
1. To study adder and subtractor circuits using logic gates.
2. To construct and test various adders and subtractor circuits.

3.1 Background:

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 adders

Half adder is a combinational arithmetic circuit that adds two bits 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. The truth table, and the
XOR/AND realization of a half adder are shown in the figure below.

Sum=A'B+AB' =A B
Carry=AB

## Page 1 By Eng. Ruba A. Salamah

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. The Truth
table and logic diagram of a 1 bit Full adder is shown below. A full adder can
be implemented using two half adders as shown in the figure.

Block diagram

Logic expressions:

Sum = A B Cin
Carry = AB + Cin(A B)

## Page 2 By Eng. Ruba A. Salamah

2. 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.

a) 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).

b) 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)

## Page 3 By Eng. Ruba A. Salamah

bits of X and Y are applied simultaneously. The output carry from one full-
adder is connected to the input carry of the next full adder, the carry of the
first stage is often considered as 0. As soon as the carries are generated, the
correct sum bits emerge from the sum outputs of all full adders.

74LS83

## 74LS83 4-Bit Binary adder IC

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 (s). when s=0 the
circuit add binary number A to binary number B each of four bits resulting
in SUM of four bit and output carry C4. When s=1 the circuit adds the 2’s
complement of B to A resulting in difference S3 to S0 and C4 decided
wither to complement the output result or not.
\

## Page 4 By Eng. Ruba A. Salamah

3.2 Prelab
1. Write down the truth table for each part in the labwork below
2. Draw pin connection diagram and function table of the binary adder 74ls83
Ic using data sheet.

Parts list:

## 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, and do any other connections using clips. Record the truth
table of the circuit and compare with that in your prelab.

## 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. and do any other connections using clips Record the
truth table of the circuit and compare with that in your prelab.

## Part III: Subtractors

Construct the circuit of HS and FS using module KL-33004 block a,
connect inputs to data switches and outputs to LEDs, do the necessary
connections. Record the truth tables of the two circuits and compare

## Part IV: 4-bit Parallel Adder using 74LS83

Use module KL-33004 block b to construct a 4-bit parallel adder
Connect inputs X3~X0, and Y3~Y0 to DIP Switches DIP1: 3~0 and
DIP2:3~0 respectively.
Connect Y5(cin) to 0 for the circuit to act as adder.
Connect Σ0, Σ1, Σ2, Σ3 , C4 to LEDs L5~L1. Follow input sequences
in the table below, record C4 and sum in hexadecimal numbers.

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

## Part V: 4-bit Parallel Subtractor using 74LS83

a) Repeat the steps in part 4 but connect Y5 to logic one this time for
the circuit to act as a subtractor.
b) Follow input sequences in the table below, record C4 and
difference in hexadecimal numbers. According to the value of C4
decide if the output difference need to be complemented or not and
explain why.

## Y X difference F1 (carry) Need to

complement
0 6
3 6
5 F
6 1
9 6
F E
9 9
A B
C E
F F

3.4 Exercise

1. Design an 8 bit parallel adder using two ICs 7483. Show schematic
diagram.
2. Design a BCD adder using two ICs 7483. Show in schematic diagram
the circuit connections.