Combinational Logic
Combinational Logic
Adders
Adders are important in computers and also in other
types of digital systems in which numerical data are
processed.
An understanding of the basic adder operation is
fundamental to the study of digital systems.
The most basic operation is no doubt is the addition of
two binary digits.
Half Adder
The combinational circuit that performs the additions
of two bit is called Half adder.
Half Adder
It has two inputs and two outputs.
The input variables designates the augends and
addend bits; the output variables produces the sum
and carry.
It is necessary to specify two output variables because
the result may consist of two binary digits.
A and B are two inputs binary variables while C and S
used for carry and Sum to the outputs.
Half Adder
The half-adder accepts two binary digits on its inputs
and produces two binary digits on its outputs, a sum
bit and a carry bit.
The truth table look like this,
A B Cout S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Half-Adder Logic
Notice that the output Carry (Cout) is a 1 only when
both A and B are 1s; therefore Cout can be expressed
as the AND of the input variables.
Cout = AB
Now observe that the sum output (Σ) is a 1 only if
the input variables. A and B, are not equal.
The sum can therefore be expressed as the
exclusive-OR of the input variables.
Full Adder
The second category of adder is the full-adder.
The full-adder accepts two input bits and an input
carry and generates a sum output and an output
carry.
The basic difference between a full-adder and a half-
adder is that the full-adder accepts an input carry.
yz
x
C= xy + xz + yz
Logic Diagram
Half Subtractor
It subtract two bits and produces their difference.
It also has an output to specify if a 1 has been
borrowed.
x and y are minuend and subtrahend veriable.
For subtraction we check the relative magnitude of
the x and y.
If x>=y then no issue.
If x<y then it is necessary to take a borrow from the
next higher stage.
X Y B D
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
D=x’ y + x y’
B=x’ y