The main contents of the chapter consist of the following: Developing NAND circuits, two-level implementations, multi-level NAND implementations, convert from a network of AND/ORs, exclusive OR, comparison with SOP, parity checking and detecting circuitry.
Trang 1Lecture 09
NAND and XOR Implementations
Trang 2w
° 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!
Trang 4Axioms and Graphical representation of DeMorgan's Law
Y X Y X
14B)
Y X Y
X
14A)
Y X Y X X
13D)
Y X Y X X
13C)
Y X XY X
13B)
Y X Y X X
13A)
YZ YW
XZ XW
Z W Y X
12B)
XZ XY
Z Y X
12A)
Z Y X Z
Y X
11B)
Z XY YZ
10A)
Commutative Law
Associative Law
Distributiv
e Law Consensus
Theorem
Trang 5• The above alternate symbols can be used to facilitate
the analysis and design of NAND and NOR gate
networks.
Trang 7NAND-NAND & NOR-NOR Networks
=
=
Trang 8NAND-NAND Networks
° Mapping from AND/OR to NAND/NAND
a b c d
Trang 9NAND-NAND Networks
a b c d
a b c d
Trang 11° Replace minterm AND gates with NAND gates
° Place compensating inversion at inputs of OR gate
Trang 12° Two-level NAND-NAND network
• Inverted inputs are not counted
• In a typical circuit, inversion is done once and signal distributed
Trang 13Two-level Logic using NAND Gates (cont’d)
Trang 14° 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
Z NAND
NAND
NAND
Trang 15Z = [ (A • B)' • (C • D)' ]' = [ (A' + B') • (C' + D') ]' = [ (A' + B')' + (C' + D')' ] = (A • B) + (C • D)
Z NAND
NAND
NAND
Trang 17A B C
D 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)
Trang 18Level 1 Level 2 Level 3 Level 4
original ANDOR
C D B
B C’
F
introduction and conservation of
C D B B C’
B C’
F
Conversion of Multi-level Logic to NAND
Gates
° F = A (B + C D) + B C'
Trang 19A
X
B C D
Trang 20Making 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.
Trang 21Converting to a NAND
° Step 1: Convert all AND gates to NAND gates and
convert all OR gates to NAND gates.
Trang 22Converting to NAND
° Step 2: Cancel all pairs of inverters ((x’)’ = x)
Trang 23Exclusive-OR and Exclusive-NOR Circuits
ExclusiveOR (XOR) produces a HIGH output whenever the two inputs are at opposite levels.
Trang 24ExclusiveNOR (XNOR) produces a HIGH output whenever the two inputs are at the same level.
Exclusive-NOR Circuits
Trang 25Exclusive-NOR Circuits
Trang 26XOR Function
° XOR function can also be implemented with
AND/OR gates (also NANDs).
Trang 27FIGURE 425 XOR gates used to implement the parity generator and the parity checker for an evenparity system.
Parity Generation and Checking
Trang 28° Follow rules to convert between AND/OR
representation and symbols
° Conversions are based on DeMorgan’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