Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Aim: Validation of truth tables of logic gates (NAND, NOR, AND, OR, NOT, XOR).

Apparatus: IC for 7400, 7402, 7404, 7408, 7432, 7486, breadboard, connecting wires, 2
momentary switches, two 10 KΩ resistors, 220 Ω resistor, LED.

Theory

One of the most important functions of the CPU in a computer is to perform logical operations
by utilizing hardware like Integrated Circuits, electronic circuits, and software technologies. For
a simple operation, computers utilize binary digits rather than digital digits. Binary information
is represented in digital computers by physical quantities called signals. Electrical signals such as
voltages exist throughout the computer in either one of the two recognizable states. The two
states represent a binary variable that can be equal to 1 or 0. For example, a particular digital
computer may employ a signal of 3 volts to represent binary 1 and 0.5 volts to represent binary 0.
Now the input terminals of digital circuits will accept binary signals of only 3 and 0.5 volts to
represent binary input and output corresponding to 1 and 0, respectively. So now we know, that
at a core level, the computer communicates in the form of 0 and 1, which is nothing but low and
high voltage signals.

Binary logic deals with binary variables and with operations that assume a logical meaning. It is
used to describe, in algebraic or tabular form, the manipulation is done by logic circuits called
gates. Gates are blocks of hardware that produce graphic symbol and its operation can be
described by means of an algebraic expression. The input-output relationship of the binary
variables for each gate can be represented in tabular form by a truth-table. Digital logic gates
may have more than one input, (A, B, C, etc.) but generally only have one digital output, (Q).
Individual logic gates can be connected together to form combinational or sequential circuits or
larger logic gate functions.

A good example of a digital state is a simple light switch. The switch can be either “ON” or
“OFF”, one state or the other, but not both at the same time. Then we can summaries the
relationship between these various digital states as being:

The various logical gates are:

AND
OR
NOT
NAND
NOR
XOR
Logic AND Gate

The output state of a digital logic AND gate only returns “LOW” again when ANY of its inputs
are at a logic level “0” (Fig 1). In other words for a logic AND gate, any LOW input will give a
LOW output. The logic or Boolean expression is given for a digital logic AND gate is that for
Logical Multiplication which is denoted by a single dot or full stop symbol, (.) giving us the
Boolean expression of: . Then we can define the operation of a digital 2-input logic AND gate as
being:

“If both A and B are true, then Q is true”

Fig 1: Truth table & Symbol for AND gate

Logic OR Gate

The output, Q of a “Logic OR Gate” only returns “LOW” again when ALL of its inputs are at a
logic level “0” (Fig 2). In other words for a logic OR gate, any “HIGH” input will give a
“HIGH”, logic level “1” output. The logic or Boolean expression is given for a digital logic OR
gate is that for Logical Addition which is denoted by a plus sign, (+) giving us the Boolean
expression of: A+B=Q. Then we can define the operation of a 2-input logic OR gate as being:

“If either A or B is true, then Q is true”

Fig 2: Truth table & Symbol for OR gate


Logic NOT Gate

Inverting NOT gates are single-input devices which have an output level that is normally at logic
level “1” and goes “LOW” to a logic level “0” when its single input is at logic level “1” (Fig 3),
in other words, it “inverts” (complements) its input signal. The output from a NOT gate only
returns “HIGH” again when its input is at logic level “0” giving us the Boolean expression
of:-------. Then we can define the operation of a single input digital logic NOT gate as being:

“If A is NOT true, then Q is true”

Fig 3: Truth table & Symbol for NOT gate

Logic NAND Gate

The NAND (Not – AND) gate has an output that is normally at logic level “1” and only goes
“LOW” to logic level “0” when ALL of its inputs are at logic level “1” (Fig 4). The Logic
NAND Gate is the reverse or “Complementary” form of the AND gate. The logic or Boolean
expression given for a logic NAND gate is that for Logical Addition, which is the opposite to the
AND gate, and which it performs on the complements of the inputs. The Boolean expression for
a logic NAND gate is denoted by a single dot or full stop symbol, (.) with a line or Overline, (‾‾)
over the expression to signify the NOT or logical negation of the NAND gate giving us the
Boolean expression of: ---------. Then we can define the operation of a 2-input digital logic
NAND gate as being:

“If either A or B are NOT true, then Q is true”


Fig 4: Truth table & Symbol for NAND gate

Logic NOR Gate


The inclusive NOR (Not-OR) gate has an output that is normally at logic level “1” and only goes
“LOW” to a logic level “0” when ANY of its inputs are at logic level “1” (Fig 5). The Logic
NOR Gate is the reverse or “Complementary” form of the inclusive OR gate. The logic or
Boolean expression is given for a logic NOR gate is that for Logical Multiplication which it
performs on the complements of the inputs. The Boolean expression for a logic NOR gate is
denoted by a plus sign, (+) with a line or Overline, (‾‾) over the expression to signify the NOT or

logical negation of the NOR gate giving us the Boolean expression of: Then we can
define the operation of a 2-input digital logic NOR gate as being:

“If both A and B are NOT true, then Q is true”

Fig 5: Truth table & Symbol for NOR gate

Exclusive-OR Gate
The output of an Exclusive-OR gate ONLY goes “HIGH” when its two input terminals are at
“DIFFERENT” logic levels with respect to each other (Fig 6). An odd number of logic “1’s” on
its inputs gives a logic “1” at the output. These two inputs can be at logic level “1” or at logic
level “0” giving us the Boolean expression of :

Fig 6: Truth table for XOR gate

The applications of logic gates are mainly determined based upon their truth table, i.e., their
mode of operations. The basic logic gates are used in many circuits like a push-button lock, light-
activated burglar alarm, safety thermostat, an automatic watering system, etc.

Schematic Diagrams

Fig 7: Schematic for Logic AND Gate


Fig 8: Schematic for Logic OR Gate

Fig 9. Schematic for Logic NOT Gate


Fig 10: Schematic for Logic NAND Gate

Fig 11: Schematic for Logic NOR Gate


Fig 12: Schematic for Logic EX-OR (XOR) Gate

Result

The truth tables of logic gates NAND, NOR, AND, NOT, OR, XOR was verified on circuits
over a breadboard.

References

LOGIC GATES- https://www.electronics-tutorials.ws/logic/logic_1.html

https://www.studytonight.com/computer-architecture/logic-gates

Datasheet OR gate-
https://www.alldatasheet.com/datasheet-pdf/pdf/248452/RENESAS/HD74HC32P.html

Datasheet AND gate-


https://www.alldatasheet.com/datasheet-pdf/pdf/247363/RENESAS/HD74LS08.html

Datasheet led -
https://pdf1.alldatasheet.com/datasheet-pdf/view/986384/ROITHNER/LED19.html

Ballast resistor - https://www.evilmadscientist.com/2012/resistors-for-leds/

Pull-down resistor- http://www.resistorguide.com/pull-up-resistor_pull-down-resistor/

You might also like