Lesson 1-Logic Gates-1
Lesson 1-Logic Gates-1
ELECTRONICS
8/17/2023 1
Definition:
• The logic gate is the basic building block in digital systems used to
implement Boolean function.
• Basic logic circuits with one or more inputs and one output are
known as gates
• A gate is a device that performs a basic operation on electrical
signals
• Gates are combined into circuits to perform more complicated
tasks.
• Gates are used as the building blocks in the design of more
complex digital logic circuits
• Logic gates are circuits that take one or more input signals and
send out a single output signal
8/17/2023 ELECTRONICS 2
Representing Logic Functions
• There are three different but equally powerful, notational methods of
describing the behavior of gates and circuits:
–Logic diagrams/ symbol
– Truth tables
– Boolean expressions
We will now describe commonly used gates
8/17/2023 ELECTRONICS 3
8/17/2023 ELECTRONICS 4
8/17/2023 ELECTRONICS 5
8/17/2023 ELECTRONICS 6
Logic 0 vs Logic 1
• Logic 0 is the same as • Logic 1 is the same as
• FALSE
– TRUE
• OFF
• LOW – ON
• NO – HIGH
• OPEN SWITCH – YES
– CLOSED SWITCH
8/17/2023 ELECTRONICS 7
Classification of Logic gates
• Gates can be categorized into THREE
• Primary gates (Basic logic gates)-Inverter (NOT gate), AND gate and OR gate
• Universal gates (NAND & NOR gates)
• Combinational Logic gates (NAND, NOR, EXOR & EXNOR)
8/17/2023 ELECTRONICS 8
NOT Gate (INVERTER)
Symbol
Truth-table Boolean
y=a
a y Input Output
a y
0 1
1 0
8/17/2023 ELECTRONICS 9
AND Gate
Symbol Truth-table Boolean
a y a b y
0 0 0 y = a.b
b
0 1 0
1 0 0
1 1 1
8/17/2023 ELECTRONICS 11
OR Gate
Symbol Truth-table Boolean
a
y=a+b
a b not read as a plus b
b
0 0 0
0 1 1
1 0 1
1 1 1
8/17/2023 ELECTRONICS 12
Practical application of OR logic gate
8/17/2023 ELECTRONICS 13
NOT AND (NAND) Gate
y = a.b
0 0 1
0 1 1
1 0 1
1 1 0
8/17/2023 ELECTRONICS 15
EXCLUSIVE OR (XOR) Gate
a a b y y=a +b
y 0 0 0
b 0 1 1
1 0 1
1 1 0
a a b y y=a +b
y 0 0 1
b 0 1 0
1 0 0
1 1 1
• From the truth table when the inputs are not the same the output is
LOW/FALSE otherwise the output will be HIGH/TRUE. This gives
the gate the characteristic equality comparator
8/17/2023 ELECTRONICS 17
Universal Gates
• A universal gate is a gate which can implement any Boolean
function without need to use any other gate type.
• The NAND and NOR gates are universal gates.
• In practice, this is advantageous since NAND and NOR gates are
economical and easier to fabricate and are the basic gates used
in all IC digital logic families. In fact, an AND gate is typically
implemented as a NAND gate followed by an inverter not the
other way around!!
• Likewise, an OR gate is typically implemented as a NOR gate
followed by an inverter not the other way around!!
8/17/2023 ELECTRONICS 18
NAND gate as a universal gate
8/17/2023 ELECTRONICS 19
NOTE
8/17/2023 ELECTRONICS 20
NOR gate as a universal gate
8/17/2023 ELECTRONICS 21
Examples
• Realize the following functions using NAND gates
• (A+B)(C+D)
• (A.B)+(C.D)
• (A+B)(C+D)
• (A.B)+(C.D)
8/17/2023 ELECTRONICS 22