King Fahd University of Petroleum and Minerals

Slides:



Advertisements
Similar presentations
Other Gate Types Why? Gate classifications
Advertisements

Logic Gates.
Logic Gates.
Overview Part 1 – Gate Circuits and Boolean Equations
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 2 – Combinational.
Lecture 6 More Logic Functions: NAND, NOR, XOR and XNOR
Overview Part 1 – Gate Circuits and Boolean Equations
Other Gate Types COE 202 Digital Logic Design Dr. Aiman El-Maleh
Exclusive-OR and Exclusive-NOR Gates
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 3.
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR, Parity Circuits, Comparators.
Overview Part 3 – Additional Gates and Circuits 2-8 Other Gate Types
Based on slides by: Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 10 – Other Gate Types.
Additional Gates BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
NOCTI Review Lesson 4 Objectives:
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 7 Transformations Factoring - finding a factored form from SOP or POS expression Decomposition.
CS 151: Introduction to Digital Design Chapter 2-9 Exclusive-OR Gates.
Digital Logic Design Week 3
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Chapter 33 Basic Logic Gates. 2 Objectives –After completing this chapter, the student should be able to: Identify and explain the function of the basic.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
LOGIC CIRCUIT IMPLEMENTATION
Basic logic gates  AND gate:The truth table is given by A.BBA
Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output.
CS 121 Digital Logic Design Gate-Level Minimization Chapter 3.
COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES.
CHAPTER 5 Combinational Logic Analysis
Combinational Logic: Other Gate Types
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR and parity check Circuits.
Chapter 33 Basic Logic Gates. Objectives After completing this chapter, you will be able to: –Identify and explain the function of the basic logic gates.
Combinational Logic Design
1 Digital Systems Design Lecture 7 Transformations Factoring - finding a factored form from SOP or POS expression Decomposition - expression of a function.
Chapter 5 Combinational Logic 组合逻辑
Combinational Circuits Part 1
Gate-Level Minimization
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Overview Part 1 – Logic Circuits and Boolean Functions
Logic Gates and Boolean Algebra
Logic Gates.
Logic Gates Benchmark Companies Inc PO Box Aurora CO
2-6 Exclusive-OR Operator and Gates
Digital Logic & Design Dr. Waseem Ikram Lecture 05
EI205 Lecture 5 Dianguang Ma Fall 2008.
Overview Part 1 – Gate Circuits and Boolean Equations
PROPAGATION DELAY.
Exclusive OR Gate.
Digital Signals Digital Signals have two basic states:
Principles & Applications
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Logic & Design Lecture 05
SCO I: Algebra Logică 2 Combinational Logic Circuits
Logic Gates.
Overview Part 3 – Additional Gates and Circuits
Gate Level Minimization
Digital Fundamentals Floyd Chapter 5 Tenth Edition
GCSE Computer Science – Logic Gates & Boolean Expressions
Overview Part 3 – Additional Gates and Circuits 2-8 Other Gate Types
XOR, XNOR, and Binary Adders
Special Gates Combinational Logic Gates
XOR Function Logic Symbol  Description  Truth Table 
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Chapter 5 Combinational Logic Analysis
Department of Electronics
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Combinational Logic Circuit
Circuit Simplification and
Presentation transcript:

King Fahd University of Petroleum and Minerals Additional Gates COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Presentation Outline Additional Gates and Symbols Universality of NAND and NOR gates NAND-NAND and NOR-NOR implementations Exclusive OR (XOR) and Exclusive NOR (XNOR) gates Odd and Even functions

Additional Logic Gates and Symbols Why? Low cost implementation Useful in implementing Boolean functions 𝑥 𝑦 𝑥·𝑦 AND gate 𝑥 𝑦 𝑥+𝑦 OR gate 𝑥′ 𝑥 NOT gate (inverter) 𝑥 𝑦 𝑥·𝑦 ′ NAND gate 𝑥 𝑦 (𝑥+𝑦)′ NOR gate 𝑥 Buffer 𝑓 𝑥 3-state gate 𝑐 𝑥 𝑦 𝑥⊕𝑦 XOR gate 𝑥 𝑦 (𝑥⊕𝑦)′ XNOR gate

Another symbol for NAND NAND Gate The NAND gate has the following symbol and truth table NAND represents NOT AND The small bubble circle represents the invert function NAND gate is implemented efficiently in CMOS technology In terms of chip area and speed x y NAND 0 0 1 0 1 1 0 1 1 𝑥 𝑦 𝑥·𝑦 ′ = 𝑥 ′ +𝑦′ NAND gate 𝑥 𝑦 𝑥′+𝑦′ Another symbol for NAND

NOR Gate The NOR gate has the following symbol and truth table NOR represents NOT OR The small bubble circle represents the invert function NOR gate is implemented efficiently in CMOS technology In terms of chip area and speed x y NOR 0 0 1 0 1 1 0 1 1 𝑥 𝑦 𝑥+𝑦 ′ = 𝑥 ′ ·𝑦′ NOR gate 𝑥 𝑦 𝑥′·𝑦′ Another symbol for NOR

The NAND Gate is Universal NAND gates can implement any Boolean function NAND gates can be used as inverters, or to implement AND/OR A single-input NAND gate is an inverter 𝑥 NAND 𝑥 = (𝑥·𝑥)′ = 𝑥′ AND is equivalent to NAND with inverted output (𝑥 NAND 𝑦)′ = ((𝑥·𝑦)′)′ = 𝑥·𝑦 (AND) OR is equivalent to NAND with inverted inputs (𝑥′ NAND 𝑦′) = (𝑥′·𝑦′)′ = 𝑥+𝑦 (OR) 𝑥 𝑦 𝑥·𝑦 𝑥 𝑦 𝑥+𝑦 𝑥′ 𝑦′

The NOR Gate is also Universal NOR gates can implement any Boolean function NOR gates can be used as inverters, or to implement AND/OR A single-input NOR gate is an inverter 𝑥 NOR 𝑥 = (𝑥+𝑥)′ = 𝑥′ OR is equivalent to NOR with inverted output (𝑥 NOR 𝑦)′ = ((𝑥+𝑦)′)′ = 𝑥+𝑦 (OR) AND is equivalent to NOR with inverted inputs (𝑥′ NOR 𝑦′) = ( 𝑥 ′ +𝑦′)′ = 𝑥·𝑦 (AND) 𝑥 𝑦 𝑥+𝑦 𝑥 𝑦 𝑥·𝑦 𝑥′ 𝑦′

Non-Associative NAND / NOR Operations Unlike AND, NAND operation is NOT associative (𝑥 NAND 𝑦) NAND 𝑧 ≠ 𝑥 NAND (𝑦 NAND 𝑧) (𝑥 NAND 𝑦) NAND 𝑧 = ((𝑥𝑦)′𝑧)′=((𝑥′+𝑦′)𝑧)′=𝑥𝑦+𝑧′ 𝑥 NAND (𝑦 NAND 𝑧) = (𝑥(𝑦𝑧)′)′=(𝑥(𝑦′+𝑧′))′=𝑥′+𝑦𝑧 Unlike OR, NOR operation is NOT associative (𝑥 NOR 𝑦) NOR 𝑧 ≠ 𝑥 NOR (𝑦 NOR 𝑧) (𝑥 NOR 𝑦) NOR 𝑧 = 𝑥+𝑦 ′ +𝑧 ′ = 𝑥 ′ 𝑦 ′ +𝑧 ′ =(𝑥+𝑦)𝑧′ 𝑥 NOR (𝑦 NOR 𝑧) = 𝑥+ 𝑦+𝑧 ′ ′ = 𝑥+ 𝑦 ′ 𝑧 ′ ′ =𝑥′(𝑦+𝑧)

Multiple-Input NAND / NOR Gates NAND/NOR gates can have multiple inputs, similar to AND/OR gates 𝑤 𝑧 𝑤·𝑥·𝑦·𝑧 ′ 4-input NAND gate 𝑦 𝑥 𝑥 𝑧 𝑥·𝑦·𝑧 ′ 3-input NAND gate 𝑦 𝑥 𝑦 𝑥·𝑦 ′ 2-input NAND gate 𝑤 𝑧 𝑤+𝑥+𝑦+𝑧 ′ 4-input NOR gate 𝑦 𝑥 𝑥 𝑧 𝑥+𝑦+𝑧 ′ 3-input NOR gate 𝑦 𝑥 𝑦 𝑥+𝑦 ′ 2-input NOR gate Note: a 3-input NAND is a single gate, NOT a combination of two 2-input gates. The same can be said about other multiple-input NAND/NOR gates.

NAND – NAND Implementation Consider the following sum-of-products expression: 𝑓=𝑏𝑑+𝑎′𝑐𝑑′ A 2-level AND-OR circuit can be converted easily to a 2-level NAND-NAND implementation 𝑏 𝑑 𝑓 𝑎′ 𝑐 𝑑′ 2-Level AND-OR 𝑏 𝑑 𝑓 𝑎′ 𝑐 𝑑′ Inserting Bubbles 𝑏 𝑑 𝑓 𝑎′ 𝑐 𝑑′ 2-Level NAND-NAND 3-input AND gate 3-input NAND gate Two successive bubbles on same line cancel each other

NOR – NOR Implementation Consider the following product-of-sums expression: 𝑔=(𝑎+𝑑)(𝑏+𝑐+𝑑′) A 2-level OR-AND circuit can be converted easily to a 2-level NOR-NOR implementation 2-Level OR-AND 𝑎 𝑑 𝑔 𝑏 𝑐 𝑑′ Inserting Bubbles 𝑎 𝑑 𝑔 𝑏 𝑐 𝑑′ 2-Level NOR-NOR 𝑎 𝑑 𝑔 𝑏 𝑐 𝑑′ 3-input OR gate 3-input NOR gate Two successive bubbles on same line cancel each other

Exclusive OR / Exclusive NOR Exclusive OR (XOR) is an important Boolean operation used extensively in logic circuits Exclusive NOR (XNOR) is the complement of XOR x y XOR 0 0 0 1 1 1 0 1 1 x y XNOR 0 0 1 0 1 1 0 1 1 XNOR is also known as equivalence 𝑥 𝑦 𝑥 ⨁ 𝑦 XOR gate 𝑥 𝑦 (𝑥 ⨁ 𝑦)′ XNOR gate

XOR / XNOR Functions The XOR function is: 𝑥 ⨁ 𝑦=𝑥𝑦′+𝑥′𝑦 The XNOR function is: (𝑥 ⨁ 𝑦)′=𝑥𝑦+𝑥′𝑦′ XOR and XNOR gates are complex Can be implemented as a true gate, or by Interconnecting other gate types XOR and XNOR gates do not exist for more than two inputs For 3 inputs, use two XOR gates The cost of a 3-input XOR gate is greater than the cost of two XOR gates Uses for XOR and XNOR gates include: Adders, subtractors, multipliers, counters, incrementers, decrementers Parity generators and checkers

XOR and XNOR Properties 𝑥 ⨁ 0=𝑥 𝑥 ⨁ 1=𝑥′ 𝑥 ⨁ 𝑥=0 𝑥 ⨁ 𝑥′=1 𝑥 ⨁ 𝑦=𝑦 ⨁ 𝑥 𝑥 ′ ⨁ 𝑦 ′ =𝑥 ⨁ 𝑦 𝑥 ⨁ 𝑦 ′ = 𝑥 ′ ⨁ 𝑦=𝑥 ⨁ 𝑦′ XOR and XNOR are associative operations 𝑥 ⨁ 𝑦 ⨁ 𝑧=𝑥 ⨁ 𝑦 ⨁ 𝑧 =𝑥 ⨁ 𝑦 ⨁ 𝑧 𝑥 ⨁ 𝑦 ′ ⨁ 𝑧 ′ = 𝑥 ⨁ (𝑦 ⨁ 𝑧)′ ′ =𝑥 ⨁ 𝑦 ⨁ 𝑧

Odd Function Output is 1 if the number of 1's is odd in the inputs Output is the XOR operation on all input variables 𝑓𝑜𝑑𝑑= (1, 2, 4, 7) x y z fodd 0 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 𝑓𝑜𝑑𝑑= 𝑥 ′ 𝑦 ′ 𝑧+ 𝑥 ′ 𝑦 𝑧 ′ +𝑥 𝑦 ′ 𝑧 ′ +𝑥𝑦𝑧 𝑓𝑜𝑑𝑑=𝑥 ⨁ 𝑦 ⨁ 𝑧 Odd Function with 3 inputs 𝑥 𝑦 𝑧 𝑓𝑜𝑑𝑑 Implementation using two XOR gates

Even Function Output is 1 if the number of 1's is even in the inputs (complement of odd function) Output is the XNOR operation on all inputs w x y z feven 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 𝑓𝑒𝑣𝑒𝑛= (0, 3, 5, 6, 9, 10, 12, 15) Even Function with 4 inputs 𝑓𝑒𝑣𝑒𝑛=(𝑤 ⨁ 𝑥 ⨁ 𝑦 ⨁ 𝑧)′ 𝑤 𝑥 𝑦 𝑓𝑒𝑣𝑒𝑛 𝑧 Implementation using two XOR gates and one XNOR

Parity Generators and Checkers Sender Receiver n-bit code Parity Generator (n+1)-bit code Checker Error A parity bit is added to the n-bit code Produces (n+1)-bit code with an odd (or even) count of 1's Odd parity: count of 1's in the (n+1)-bit code is odd Use an even function to generate the odd parity bit Use an even function to check the (n+1)-bit code Even parity: count of 1's in the (n+1)-bit code is even Use an odd function to generate the even parity bit Use an odd function to check the (n+1)-bit code

Example of Parity Generator and Checker Design even parity generator & checker for 3-bit codes Solution: Use 3-bit odd function to generate even parity bit 𝑃. Use 4-bit odd function to check if there is an error 𝐸 in even parity. Given that: 𝑥𝑦𝑧 = 001 then 𝑃 = 1. The sender transmits 𝑃𝑥𝑦𝑧 = 1001. If 𝑦 changes from 0 to 1 between generator and checker, the parity checker receives 𝑃𝑥𝑦𝑧 = 1011 and produces 𝐸 = 1, indicating an error. 𝑥 𝑦 𝑧 𝑃 Parity Generator 𝑃 𝑥 𝑦 𝐸 𝑧 Parity Checker