You are on page 1of 8

Experiment 2: Logic Gates

Objective :
This lab will allow you to gain familiarity with basic logic gates (NOT, AND, OR, NAND, and
NOR).
Equipment/Components Needed:
-

IDL-800 Digital Lab trainer


Wires
IC Chips (74LS00, 74LS08, 74LS02, 74LS04, 74LS32)
IC extractor

Discussion of Theory:
Combinational logic circuits use logic gates to perform logic functions. They are the building
blocks of digital systems. By combining them in different ways any desired output for a given
input can be achieved. The seven basic logic gates are NOT, AND, OR, NAND, NOR, X-OR and
X-NOR. Each exhibits a different behavior when input is applied and this is illustrated in the
sections which follow. For each gate a symbol, behavioral description and an example, including
truth table is given. Note also that the algebraic representation of each gate is given for each such
example circuit. This will be discussed in detail in the next chapter, but is included for
completeness and ease of reference.
The NOT gate has only one input and one output and is the simplest gate. The remaining
gates can all have one or many inputs, but all have only one output.
Notice that two symbols are shown for the NOT gate. In some cases the gate described can
be implemented using a combination of other gates. Where this is appropriate such equivalent
combinational circuits are drawn in pale green boxes. Note that in this case only 2-input circuits
are shown, though it is trivial to redraw any such circuit with more inputs.
Before the logic gates are described it should be noted that there are two generally accepted
methods of drawing logic gate symbols; the distinctive shape method and the rectangular shape
with qualifying symbol method. Both are shown for each gate, though the preferred method used
throughout this text is the distinctive shape method. Also note that each method has its own
symbol for negation, i.e. inversion. Both are commonly used in digital circuits and should be
understood. To illustrate this the symbols for a NOT gate are shown below.
When drawing large circuits or conceptual circuits the negation symbol for the rectangular
shape method is commonly encountered. In algebraic terms a negation is signified by an overbar,
i.e.

XA

, in this case X is the inverse of A.

The NOT gate


BEHAVIOR: The Output is the inverse of the Input:
EXAMPLE:
Truth Table

Input

Output

1ALGEBRAICALLY
0
:
The AND gate
BEHAVIOR: The Output is

Inputs

Output

AB

00

01

10

11

Inputs

Output

BEHAVIOR: The Output is

AB

EXAMPLE:

00

01

10

11

EXAMPLE:

XA

1 only if all the Inputs are 1

The OR gate
1 if any or all of the Inputs are 1

Basic Boolean Postulates


In working with logic relations in digital form, we need a set of rules for symbolic
manipulation which will enable us to simplify complex expressions and solve for unknowns.
Originally, Boolean algebra which was formulated by George Boole, an English mathematician
(1815-1864) described propositions whose outcome would be either true or false. In computer
work it is used in addition to describe circuits whose state can be either 1 (true) or 0 (false).

P1 : X = 0 or X = 1

P2 : 00 = 0

P3 : 1 + 1 = 1

P4 : 0 + 0 = 0

P5 : 1 1 = 1

P6 : 1 0 = 0 1 = 0

P7 : 1 + 0 = 0 + 1 = 1

Basic Boolean Theorems


Principle of Duality
1. Interchanging the OR and AND operations of the expression.
2. Interchanging the 0 and 1 elements of the expression.
3. Not changing the form of the variables.
T1 : Commutative Law
(a) A + B = B + A
(b) A B = B A
T2 : Associative Law
(a)(A + B) + C = A + (B + C)
(b) (A B) C = A (B C)
T3 : Distributive Law
(a)A (B + C) = A B + A C
(b) A + (B C) = (A + B) (A + C)
T4 : Identity Law
(a)A + A = A
(b) A A = A
T5 : Negation Law
(a) (A) = A

(b) (A) = A
T6 : Redundance Law
(a)A + A B = A
(b) A (A + B) = A
T7 :
(a)0 + A = A
(b) 1 A = A
(c) 1 + A = 1
(d) 0 A = 0
T8 :
(a) A + A = 1
(b) AA = 0
T9 :
(a) A + AB = A + B
(b) A(A +B) = AB
T10 : De Morgan's Theorem
(a) (A+B) = AB
(b) (AB) = A + B

Data and Results


Boolean Algebra
Boolean algebra which deals with 2-valued (true/false or 1 and 0)variables and functions
finds its use in modern digital computers since the 2-level system called binary system.

I.
1. Create a truth table for Boolean expression.
a. Y = AB + B(A + C)
A
0
0
0
0
1
1
1
1

B
0
0
1
1
0
0
1
1

C
0
1
0
1
0
1
0
1

A
1
1
1
1
0
0
0
0

B
1
1
0
0
1
1
0
0

AB
1
1
0
0
0
0
0
0

A+C
0
1
0
1
1
1
1
1

B(A+C)
0
0
0
1
0
0
1
1

Y
1
1
0
1
0
0
1
1

b. Y = BC + AC
A
0
0
0
0
1
1
1
1

B
0
0
1
1
0
0
1
1

C
0
1
0
1
0
1
0
1

C
1
0
1
0
1
0
1
0

BC
0
0
0
1
0
0
0
1

AC
0
0
0
0
1
0
1
0

Y
0
0
0
1
1
0
1
1

c. Y = A + CD
A
0
0
0
0
1
1
1
1

C
0
0
1
1
0
0
1
1

D
0
1
0
1
0
1
0
1

CD
0
0
0
1
0
0
0
1

Y
0
0
0
1
1
1
1
1

d. Y = (A + B)(C + D)
A
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1

B
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1

C
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1

D
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1

C
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0

C + D
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1

A+B
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1

2.

II.

Implement the truth table for the following Boolean expression and reduce the
following to minimum number of literals using Boolean algebra.

A. xy + xy = x (y + y)
= x (1)
=x

Observations:

Y
0
0
0
0
1
1
0
1
1
1
0
1
1
1
0
1

Conclusion:

The circuits and switching arrangements used in electronics are very complex. The flow
of electrical pulses which represent the binary digits 0 and 1 or also known as bits, is controlled
by combinations of electronic devices. These logic gates act as switches for the electrical pulses.
Special symbols are used to represent each type of logic gate.
The NOT gate is capable of reversing the input pulse. The NOT gate receives an input,
either a 1 (true) or 0 (false) and produces an output as follows :if input A is 1, output is 0; and if
input A is 0, output is 1. The AND gate receives two inputs A and B, and produces an output.
The only way that the output can be 1 is when A and B are both 1.The OR gate receives two
inputs A and B, and produces an output. The output will be 1 when A or B or both are 1.
Variable, complement, and literal are terms used in Boolean algebra. A variable is a
symbol used to represent a logical quantity. Any single variable can have a 1 or a 0 value. The
complement is the inverse of a variable and is indicated by a bar over variable. If A = 1, then A =
0. If A = 0, then A = 1. In Boolean algebra, a sum term is a sum of literals. In logic circuits, a
sum term is produced by an OR operation. A sum term is equal to 1 when one or more of the
literals in the term are 1. A sum term is equal to 0 only if each of the literals is 0. A product term
is the product of literals. In logic circuits, a product term is produced by an AND operation. A
product term is equal to 1 only if each of the literals in the term is 1. A product term is equal to 0
when one or more of the literals are 0. The basic laws of Boolean algebra-the commutative laws
for addition and multiplication, the associative laws for addition and multiplication, and the
distributive law-are the same as in ordinary algebra.
Boolean expressions can be simplified by using different postulates and theorems. The
number of literals can be decreased by applying each of these laws. By using the truth table, this
simplified version of the given Boolean expression can be checked if they are the same. Through
making the circuit using the given expression, the values can be checked. If there is light, it is
equal to a value of 1 and if there is no light, the value is 0. Always check your equipments to
make sure that your breadboard, wires, and LED are working. Proper connection of the wires in
the correct pin and gate must always be observed in order to prevent incorrect values.

-Amiel B. Guevarra

Recommendations:

You might also like