0% found this document useful (0 votes)
17 views22 pages

Lesson 1-Logic Gates-1

Uploaded by

kerrykerry028
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views22 pages

Lesson 1-Logic Gates-1

Uploaded by

kerrykerry028
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

KENYATTA UNIVERSITY

DEPARTMENT OF COMPUTING AND INFORMATION


SCIENCE

Lesson 1: Logic Gates


Ojwang D.O.

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

• y is only TRUE only if a is TRUE and b is TRUE.


• AND gate is a circuit that operates such that its output is
logic 1 (HIGH) only when ALL its inputs are HIGH
• Has a minimum of two inputs and maximum of 8 inputs
• For all other cases the AND gate’s output is LOW
• Note that in Boolean algebra AND is represented by a dot .
8/17/2023 ELECTRONICS 10
Practical Application of AND
logic gate

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

• y is TRUE if a is TRUE or b is TRUE (or both) but FALSE


when both inputs are FALSE
• It has two or more inputs and one output
• In Boolean algebra OR is represented by a plus sign +

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

• y is TRUE if a is FALSE or b is FALSE (or both)


• y is FALSE only if a is TRUE and b is TRUE
• It is the same as the AND gate symbol except for the small
circle on its output. Once again the small circle denotes
the inversion operation
• Thus the NAND gate operates like an AND gate followed
8/17/2023 ELECTRONICS 14
by INVERTER
NOT OR (NOR) Gate
a b y y=a+b
0 0 1
0 1 0
1 0 0
1 1 0

• y is TRUE only if a is FALSE and b is FALSE


• y is FALSE if a is TRUE or b is TRUE (or both)
• It is a combination of an OR function and a NOT function.
• It is realized by connecting a NOT gate to the output of an
OR gate.

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

• y is TRUE if a is TRUE or b is TRUE (but not both)


• In Boolean algebra XOR is represented by an + sign
• Note that its truth table is almost the same as that of OR
except for the last entry in the truth table where both inputs
are HIGH
• When the inputs are equal the output goes LOW and when
the input differ the output is HIGH. This characteristic gives
the gate the name of an inequality comparator
8/17/2023 ELECTRONICS 16
EXCLUSIVE NOR (XNOR) Gate

a a b y y=a +b
y 0 0 1
b 0 1 0
1 0 0
1 1 1

• y is TRUE if both a and b are TRUE or when both are FALSE

• 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)

• Realize the following functions using NOR gates

• (A+B)(C+D)
• (A.B)+(C.D)

8/17/2023 ELECTRONICS 22

You might also like