Logic Circuits
Logic Circuits
VUW
VICTORIA UNIVERSITY OF WELLINGTON
Te Whare Wananga o te Upoko o te Ika a Maui
Logic Circuits
Dr Yinhuo Zhang
[email protected]
MATH114 Logic Gates: 2
Logic gates
Boolean algebra is used to model the circuitry of electronic
devices. Each input and each output of such a device can be
thought of as a member of the set {0, 1}. A computer, or other
electronic device, is made up of a number of circuits. Each
circuit can be designed using the rules of Boolean algebra that
correspond to the logic laws. The basic elements of circuits are
called gates. Each type of gates implements a logic operation.
There are three types of gates that can be used to construct any
combinatorial circuit.
Three basic gates
Inverter:
AND gate:
OR gate:
MATH114 Logic Gates: 3
Designing circuits
Example 5.1 A committee of three people decides issues for
an organization. Each person votes either yes or no for each
proposal that arises. A proposal is passed if it receives at least
two yes votes. Design a circuit that determines whether a pro-
posal passes.
Solution. Let A, B and C be the three members of the com-
mittee. Let x, y and z represent their votes respectively. If
A vote yes, then let x = 1. Otherwise, let x = 0. Simi-
larly, y = 1, z = 1if B and C vote yes respectively. Then
a circuit must be designed that produces the output 1 from
the inputs x, y and z when two or more of x, y and z are 1.
x y z P (x, y, z)
1 1 1 1
1 1 0 1
1 0 1 1
1 0 0 0
0 1 1 1
0 1 0 0
0 0 1 0
0 0 0 0
MATH114 Logic Gates: 4
xy + xz + yz
Adders
We will illustrate how logic circuits can be used to carry out
addition of two positive integers from their binary expressions.
we will built up the circuitry to do this addition from some
component circuits.
The half adder
The half adder is designed to add two bits without considering
a carry from a previous addition. The following table shows
the input and output for the half adder.
x y s c
1 1 0 1
1 0 1 0
0 1 1 0
0 0 0 0
MATH114 Logic Gates: 6
From the output table we can easily find the Boolean expres-
sion of s and c:
s = xy + xy, c = xy.
Full adders
Example 3. Adding two three bit integers with full and half
adders.