Lecture 09 NAND and XOR Implementations Overview Developing
- Slides: 28
Lecture 09 NAND and XOR Implementations
Overview ° Developing NAND circuits ° Two-level implementations • Convert from AND/OR to NAND (again!) ° Multi-level NAND implementations • Convert from a network of AND/ORs ° Exclusive OR • Comparison with SOP ° Parity checking and detecting circuitry • Efficient with XOR gates!
Gates AND A X = A • B X or B X = AB OR A X X = A + B B I A X = A ’ Buffer A X = A NAND NOR XOR Exclusive OR XNOR Exclusive NOR or Equivalence A X X = (AB) ’ B A X X = (A + B) ’ B A X = A B X or B X = A ’B + AB’ A X = (A B)’ X or B X = A ’B’+ AB A B X 0 0 1 1 1 A B X 0 0 1 1 1 0 1 1 A X 0 1 1 0 A X 0 0 1 1 A B X 0 0 1 1 1 0 A B X 0 0 1 0 1 0 0 1 1 0 A B X 0 0 1 0 1 0 0 1 1 1
Axioms and Graphical representation of De. Morgan's Law Commutative Law Associative Law Distributive Law Consensus Theorem
Network Conversion Using Alternate Gate Symbols • Recall that symbolic De. Morgan’s duals exist for all gate primitives nand nor and or not • The above alternate symbols can be used to facilitate the analysis and design of NAND and NOR gate networks.
NAND-NAND & NOR-NOR Networks De. Morgan’s Law: (a + b)’ = a’ b’ (a b)’ = a’ + b’ a + b = (a’ b’)’ (a b) = (a’ + b’)’ push bubbles or introduce in pairs or remove pairs.
NAND-NAND & NOR-NOR Networks
NAND-NAND Networks ° Mapping from AND/OR to NAND/NAND
NAND-NAND Networks
Implementations of Two-level Logic ° Sum-of-products • AND gates to form product terms (minterms) • OR gate to form sum ° Product-of-sums • OR gates to form sum terms (maxterms) • AND gates to form product
Two-level Logic using NAND Gates ° Replace minterm AND gates with NAND gates ° Place compensating inversion at inputs of OR gate
Two-level Logic using NAND Gates (cont’d) ° OR gate with inverted inputs is a NAND gate • de Morgan's: A' + B' = (A • B)' ° Two-level NAND-NAND network • Inverted inputs are not counted • In a typical circuit, inversion is done once and signal distributed
Two-level Logic using NAND Gates (cont’d)
Conversion Between Forms ° Convert from networks of ANDs and ORs to networks of NANDs and NORs • Introduce appropriate inversions ("bubbles") ° Each introduced "bubble" must be matched by a corresponding "bubble" • Conservation of inversions • Do not alter logic function ° Example: AND/OR to NAND/NAND A A B B C D Z C D NAND Z
Conversion Between Forms (cont’d) ° Example: verify equivalence of two forms A A B B C D Z C D NAND Z = [ (A • B)' • (C • D)' ]' = [ (A' + B') • (C' + D') ]' = [ (A' + B')' + (C' + D')' ] = (A • B) + (C • D) ü Z
Conversion to NAND Gates ° Start with SOP (Sum of Products) • circle 1 s in K-maps ° Find network of OR and AND gates
Multi-level Logic ° x = A D F + A E F + B D F + B E F + C D F + C E F + G • Reduced sum-of-products form – already simplified • 6 x 3 -input AND gates + 1 x 7 -input OR gate (may not exist!) • 25 wires (19 literals plus 6 internal wires) ° x = (A + B + C) (D + E) F + G • Factored form – not written as two-level S-o-P • 1 x 3 -input OR gate, 2 x 2 -input OR gates, 1 x 3 -input AND gate • 10 wires (7 literals plus 3 internal wires) A B C D E F G X
Conversion of Multi-level Logic to NAND Gates ° F = A (B + C D) + B C' Level 1 C D original AND-OR network introduction and conservation of bubbles redrawn in terms of conventional NAND gates B A B C’ C D B’ A B C’ Level 2 Level 3 Level 4 F F F
Conversion Between Forms ° Example A A (a) B C D X B C D F Add double bubbles at inputs Original circuit A A (c) B C D’ X (b) F X’ Distribute bubbles some mismatches B C D’ X’ Insert inverters to fix mismatches F (d)
Making NAND circuits (Ex) ° The easiest way to make a NAND circuit is to start with a regular, primitive gate-based diagram. ° Two-level circuits are trivial to convert, so here is a slightly more complex random example.
Converting to a NAND ° Step 1: Convert all AND gates to NAND gates and convert all OR gates to NAND gates. AND OR OR AND
Converting to NAND ° Step 2: Cancel all pairs of inverters ((x’)’ = x). .
Exclusive-OR and Exclusive-NOR Circuits Exclusive-OR (XOR) produces a HIGH output whenever the two inputs are at opposite levels.
Exclusive-NOR Circuits Exclusive-NOR (XNOR) : Exclusive-NOR (XNOR) produces a HIGH output whenever the two inputs are at the same level.
Exclusive-NOR Circuits XNOR gate may be used to simplify circuit implementation.
XOR Function ° XOR function can also be implemented with AND/OR gates (also NANDs).
Parity Generation and Checking FIGURE 4 -25 XOR gates used to implement the parity generator and the parity checker for an even-parity system.
Summary ° Follow rules to convert between AND/OR representation and symbols ° Conversions are based on De. Morgan’s Law ° NOR gate implementations are also possible ° XORs provide straightforward implementation for some functions ° Used for parity generation and checking • XOR circuits could also be implemented using AND/Ors ° Next time: Hazards
- A xor b = c
- Nand to xor gate conversion
- Smalltalk implementation language
- What are the common standard ethernet implementations?
- Ethics in security management
- 01:640:244 lecture notes - lecture 15: plat, idah, farad
- Xor and xnor symbols
- Language
- The dual symbol for a nand gate is a negative-and symbol.
- Nand gate to and gate
- Violent python 3
- Vbscript xor
- Kasbim mening faxrim mavzusida insho
- Xor split
- Xor in propositional logic
- Xor gate python
- Proposition in mathematics
- Xor in propositional logic
- Xor decision tree
- Xor linked list c++
- Xor de morgan
- Logic
- The proposition ~p ν (p ν q) is a
- Pwntools xor
- Mapa de karnaugh 5 variáveis
- Perceptron xor
- Xor boolean expression
- Functia xor
- Ereignis prozess kette