Logic Gates Reviewer
Logic Gates Reviewer
Logic Gates Reviewer
Introduction
Computers can only process binary data which consists of 0’s and
1’s. This is due to the fact that the main processing components
(e.g., the CPU) are made of transistors: tiny electronic switches that
can be turned on (1) and off (0). Logic Gates
A collection of individual logic gates connects with each other
Different kinds of Transistors and produce a logic design known as a Logic Circuit.
Transistors as Switches
VBB voltage controls whether the transistor conducts in a common
base configuration. Basic Logic Gates
Three basic gates:
NOT
AND
OR
Each logic gate performs a different logic function. You can
derive logical function or any Boolean or logic expression by combining
these three gates.
AND Gate
OR Gate
The OR gate is another basic logic gate.
Like the AND gate, it can have two or more inputs and a single
output.
The operation of OR gate is such that the output is a binary 1 if any
one or all inputs are binary 1 and the output is binary 0only when all
the inputs are binary 0.
AND
In order for current to flow, both switches must be closed
Logic notation A·B = C
(Sometimes AB = C)
Distributive Law x + yz = (x + y) (x + z) x (y + z) = xy + xz
OR Binary addition
Current flows if either switch is closed. A B S C(arry)
Logic notation A + B = C 0 0 0 0
1 0 1 0
0 1 1 0
1 1 0 1
Boolean Algebra
Our last group of Boolean identities are perhaps the most useful.
If you have studied set theory or formal logic, these laws are also
familiar to you.
Boolean Algebra Examples Identity name AND Form OR Form
The truth table for the Boolean function: Absorption Law x (x + y) = x x + yz = x
F (x, y, z) = xz̄ + y DeMorgan’s Law (x̅ y̅ ) = x̅ + y̅ (x̅ + y̅ ) = x̅ y̅
To make evaluation of the Boolean function easier, the truth table Double Complement Law (x̅ ) = x̅
contains extra (shaded) columns to hold evaluations of subparts of
the function. Boolean Algebra
Sometimes it is more economical to build a circuit using the
F (x, y, z) = xz̄ + y
complement of a function (and complementing its result) than it is
x y z z̄ xz̄ xz̄ + y to implement the function directly.
0 0 0 1 0 0 DeMorgan’s law provides an easy way of finding the complement
0 0 1 0 0 0 of a Boolean function.
0 1 0 1 0 1 Recall DeMorgan’s law states:
0 1 1 0 0 1 (x̅ y̅ ) = x̅ + y̅ and (x̅ + y̅ ) = x̅ y̅
1 0 0 1 1 1
1 0 1 0 0 0 Digital Components
1 1 0 1 1 1 The main thing to remember is that combinations of gates
1 1 1 0 0 1 implement Boolean functions.
The circuit below implements the Boolean function:
F (X, Y, Z) = X + Y̅ Z
Boolean Algebra
Most Boolean identities have an AND (product) form as well as an
OR (sum) form. We give our identities using both forms. Our first
group is rather intuitive: X Y Z Y̅ Y̅ Z X + Y̅ Z
Identity Name AND Form OR Form 0 0 0 1 0 0
Identity Law 1x = x 0+x=x 0 0 1 1 1 1
Null Law 0x = 0 1+x=1 0 1 0 0 0 0
Idempotent Law xx = x x+x=x 0 1 1 0 0 0
Inverse Law xx̅ = 0 x + x̅ = 1 1 0 0 1 0 1
1 0 1 1 1 1
1 1 0 0 0 1
Boolean Algebra 1 1 1 0 0 1
Our second group of Boolean identities should be familiar to you
from your study of algebra.
Inversion (NOT)
Logic: Q = A̅
A Q
0 1
1 0
FALSE 13. The sum of two binary digits (ignoring the carry)
is expressed by an AND gate.