Binary Logic Gates: Prepared By: NSZ FSG, Uitm Pahang
Binary Logic Gates: Prepared By: NSZ FSG, Uitm Pahang
Prepared by:
NSZ
FSG, UiTM Pahang
Lesson Outline
• AND Gate
• OR Gate
• Inverter and Buffer
• NAND
• NOR Gate
• Exclusive OR Gate
• Exclusive NOR Gate
• Practical TTL and CMOS Gates
2
Lesson Outcomes
3
Introduction
Logic is applied to digital circuits used to implement logic function.
Logic function is an expression represents functions of the logic
gates
Logic gates are the basic building block in digital systems.
Logic gates operate with binary numbers
All voltages used with logic gates will be either HIGH or LOW.
These circuits will respond only to HIGH voltages (called 1s) or
LOW (ground) voltages (called 0s).
All digital systems are constructed by using only three basic logic
gates called:-
AND gate
OR gate
NOT/INVERTER gate
4
Boolean Constants and Variables
Boolean constants and variables
allows only two possible values— 0
and 1.
Boolean variables are often used to
represent the voltage level
(input/output).
Logic 0 can be: false, off, low, no,
open switch.
Logic 1 can be: true, on, high,
yes, closed switch
Boolean algebra is means for
expressing the relationship
between a logic circuits inputs and
outputs.
The three basic logic operations:
OR, AND, and NOT.
These basic operations are called
logic operations. 5
Truth Table
6
Truth Table
7
Basic Gates/Logic Gates
8
AND @ “all or nothing” Gate
The output is HIGH if both input A and B are HIGH
Operation : If any inputs is LOW, output is LOW
10
AND Gate
Making an AND Gate
11
AND Gate
Making an AND Gate
These are ways to make an AND gate from switches
12
AND Gate
IC7408 AND Gates
13
AND Gate
Boolean algebra of AND gate
The formal laws of Boolean algebra for the AND function
are:
14
OR @ “any or all” Gate
16
OR Gate
Making an OR Gate
These are ways to make an OR gate from transistor
switches or diodes
17
OR Gate
Making an OR Gate
18
OR Gate
IC 7432 OR Gates
19
OR Gate
Boolean algebra of OR gate
The formal laws of Boolean algebra for the OR function
are:
20
OR Gate
Example of the use of an OR
gate in an alarm system.
21
Buffer
The buffer is a single-input which
has a gain of 1, mirroring the input at
the output.
Also known as noninverting buffer /
driver.
It serves no logical purpose (it does
not invert), but is used to supply
greater drive current at its output
than is normal for a regular gate.
Since regular digital ICs have limited
drive current capabilities, the
noninverting buffer/driver is important
when interfacing ICs with other
devices such as LEDs, lamps, and
others.
Buffer / drivers are available in both
noninverting and inverting.
22
Inverter
Inverter/NOT is complement or invert a digital signal.
Ia a HIGH level (1) input comes in it, it will produce
Operation : a LOW level (0) output or Vice versa.
Read as:
“X equals NOT A”
“X equals the inverse of A”
“X equals the complement of A”
Truth Table 23
Inverter
The INVERTER inverts (complements) the
input signal at all points on the waveform.
24
Inverter
Typical application of the NOT gate.
26
Inverter
IC7404 Inverter
27
Inverter
28
Example 2.1
Write the Boolean expression for the logic circuit shown and draw
the truth table for the logic in Fig. 3-33.
Answer:
30
NAND Gate
Making a NAND Gate
31
NAND Gate
32
NAND Gate
Output waveform of a NAND gate for
the input waveforms shown here.
33
Universality of NAND Gate
• The NAND gate and the NOR gate can be said to be universal
gates since
• combinations of them can be used to accomplish any of the basic
operations.
35
NOR Gate
Making a NOR Gate
36
NOR Gate
37
NOR Gate
Output waveform of a NOR gate for
the input waveforms shown here.
38
NOR Gate
39
Universality of NOR Gate
How combinations of NANDs or NORs are
used to create the three logic functions.
2 – input OR Gate
41
Example 2.3
Develop a logic circuit of NOR by using switches and lamps
42
Summary Universal of NAND and NOR
NAND NOR OR
2 – input OR Gate
43
XOR @ “any but not all” Gate
The exclusive -OR gate is sometimes referred to as the “odd
but not even gate”.
an Exclusive-OR gate ONLY goes "HIGH" when its two input
terminals are at "DIFFERENT" logic levels with respect to each
other and they can both be at logic level "1" or both at logic level
"0"
It produces a HIGH output only when an odd
Operation :
number of HIGH input are present.
Boolean expression/logical expression :
X A B B.A A.B
44
Gate Symbol Truth Table
XOR Gate
Boolean expression, symbol, and truth table for a three
input XOR gate.
45
Example 2.4
Develop Boolean expression, logic diagram and truth table for 4
input XOR gate
46
XOR Gate
47
Exclusive OR Gate with NAND
48
XNOR Gate
Using NOR gate with added invert bubble on the output
side.
Gate Symbol
Truth Table
49
XNOR Gate
Truth Table
50
Converting gates using inverters
51
Converting gates using inverters
52
Evaluating Logic Circuit Outputs
53
Evaluating Logic Circuit Outputs
• The best way to analyze a circuit made up of multiple
logic gates is to use a truth table.
• It allows you to analyze one gate or logic combination
at a time.
• It allows you to easily double-check your work.
• When you are done, you have a table of tremendous
benefit in troubleshooting the logic circuit.
54
Evaluating Logic Circuit Outputs
• The first step after listing all input combinations
is to create a column in the truth table for each
intermediate signal (node).
59
Practical TTL and CMOS Logic Gates
60
TTL Logic Gates
• The transistor-transistor-logic (TTL) is a class of digital circuits
built from bipolar junction transistor (BJT) and resistors.
• TTL family was developed in the use of transistor switches for
logical operations and defines the values as
0V to 0.8V = Logic 0
2V to 5V = Logic 1
• TTL is the largest family of digital ICs, but the CMOS family is
growing rapidly.
• They are inexpensive,