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

Lecture 07

Uploaded by

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

Lecture 07

Uploaded by

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

More Logic Functions: NAND, NOR, XOR

Asst. Prof. Mohanad Alayedi


Department of Software Engineering
Haliç University
mohanadysalayedi@halic.edu.tr

CEN203, Summer 2024

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 1


Overview

➢ More 2-input logic gates (NAND, NOR, XOR)


➢ Extensions to 3-input gates
➢ Converting between sum-of-products and NANDs
• SOP to NANDs
• NANDs to SOP
➢ Converting between sum-of-products and NORs
• SOP to NORs
• NORs to SOP

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 2


Logic functions of N variables

➢ Each truth table represents one possible function


(e.g. AND, OR)
N
➢ If there are N inputs, there are 22
For example, if N is 2 then there are 16 possible x y G
truth tables.
0 0 0
➢ So far, we have defined 2 of these functions 0 1 0
1 0 0
• 14 more are possible.
1 1 1
➢ Why consider new functions?
• Cheaper hardware, more flexibility.

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 3


The NAND Gate

➢ This is a NAND gate. It is a combination of an A


AND gate followed by an inverter. Its truth table Y
shows this… B
➢ NAND gates have several interesting properties…
• NAND(a,a)=(aa)’ = a’ = NOT(a)
• NAND’(a,b)=(ab)’’ = ab = AND(a,b)
• NAND(a’,b’)=(a’b’)’ = a+b = OR(a,b)
A B Y
0 0 1
0 1 1
1 0 1
1 1 0

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 4


The NAND Gate

➢ These three properties show that a NAND gate with both of its inputs
driven by the same signal is equivalent to a NOT gate.

➢ A NAND gate whose output is complemented is equivalent to


an AND gate, and a NAND gate with complemented inputs
acts as an OR gate.

➢ Therefore, we can use a NAND gate to implement all three of the


elementary operators (AND,OR,NOT).

➢ Therefore, ANY switching function can be constructed using only


NAND gates. Such a gate is said to be primitive or functionally
complete.

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 5


NAND Gates into Other Gates

(what are these circuits?)


A
Y

NOT Gate A
B Y

A AND Gate

Y
B

OR Gate
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 6
The NOR Gate

➢ This is a NOR gate. It is a combination of an OR


gate followed by an inverter. It’s truth table A
shows this… Y
B
➢ NOR gates also have several
➢ interesting properties…
• NOR(a,a)=(a+a)’ = a’ = NOT(a)
• NOR’(a,b)=(a+b)’’ = a+b = OR(a,b)
A B Y
• NOR(a’,b’)=(a’+b’)’ = ab = AND(a,b)
0 0 1
0 1 0
1 0 0
1 1 0

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 7


Functionally Complete Gates

➢ Just like the NAND gate, the NOR gate is functionally


complete…any logic function can be implemented using just
NOR gates.

➢ Both NAND and NOR gates are very valuable as any design
can be realized using either one.

➢ It is easier to build an IC chip using all NAND or NOR gates


than to combine AND,OR, and NOT gates.

➢ NAND/NOR gates are typically faster at switching and cheaper to


produce.

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 8


NOR Gates into Other Gates

(what are these circuits?)


A
Y
A
NOT Gate B
OR Gate
A
Y
B

AND Gate
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 9
The XOR Gate (Exclusive-OR)

➢ This is a XOR gate. A


B
Y
➢ XOR gates assert their output when exactly
one of the inputs is asserted, hence the
name.
➢ The switching algebra symbol for this A B Y
operation is , i.e. 0 0 0
0 1 1
1  1 = 0 and 1  0 = 1.
1 0 1
1 1 0

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 10


The XNOR Gate

➢ This is a XNOR gate.


A
➢ This functions as an exclusive- Y
B
NOR gate, or simply the
complement of the XOR gate.
➢ The switching algebra symbol for this A B Y
operation is , i.e. 0 0 1
0 1 0
1  1 = 1 and 1  0 = 0.
1 0 0
1 1 1

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 11


NOR Gate Equivalence

NOR Symbol, Equivalent Circuit, Truth Table

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 12


DeMorgan’s Theorem

A key theorem in simplifying Boolean algebra


expression is DeMorgan’s Theorem. It states:
(a + b)’ = a’b’ (ab)’ = a’ + b’

Complement the expression


a(b + z(x + a’)) and simplify.

(a(b+z(x + a')))' = a' + (b + z(x + a'))'


= a' + b'(z(x + a'))'
= a' + b'(z' + (x + a')')
= a' + b'(z' + x'a")
= a' + b'(z' + x'a)

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 13


Example

➢ Determine the output expression for the below circuit and


simplify it using DeMorgan’s Theorem

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 14


Universality of NAND and NOR gates

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 15


Universality of NOR gate

➢ Equivalent representations of the AND, OR, and NOT gates

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 16


Example

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 17


Interpretation of the two NAND gate symbols

➢ Determine the output expression for circuit via DeMorgan’s


Theorem

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 18


Interpretation of the two OR gate symbols

➢ Determine the output expression for circuit via


DeMorgan’s Theorem

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 19


Summary

➢ Basic logic functions can be made from NAND, and NOR functions
➢ The behavior of digital circuits can be represented with waveforms, truth
tables, or symbols
➢ Primitive gates can be combined to form larger circuits
➢ Boolean algebra defines how binary variables with NAND, NOR can be
combined
➢ DeMorgan’s rules are important.
• Allow conversion to NAND/NOR representations

CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 20

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy