Sie sind auf Seite 1von 19

NAND/NOR Only Implementations

Although we can implement any circuit with AND/OR/NOT, we can also implement any circuit with only NAND or NOR gates. We might want to do this because of technology considerations; That is, these gates might be cheaper to implement in silicon or they might be the only type of gates we have available. Since we can always use only NAND or NOR gates, these gates are sometimes called universal gates.

The trick (if you want to call it that) is to see that we can implement the three basic gates (AND, OR, NOT) in terms of NAND or NOR gates.

ECE124 Digital Circuits and Systems

Page 1

NOT-gate via NAND


We can implement a NOT-gate using a NAND by applying the same signal to both inputs.

ECE124 Digital Circuits and Systems

Page 2

AND-gate via NAND


We can implement an AND-gate by using a NAND gate and (then) another NAND gate to invert the output.

ECE124 Digital Circuits and Systems

Page 3

OR-gate via NAND


We can implement an OR-gate by using a NAND gate and (then) other NAND gates to invert the inputs. The ability to implement INV/AND/OR with NAND means we can implement any circuit using only NANDs (if only my replacing the AND, OR and NOT gates with their NAND implementations).

ECE124 Digital Circuits and Systems

Page 4

Comment
Before continuing, we should make note that a NAND gate performs the same function as an OR gate with inverts at the inputs. This is useful to remember. We can illustrate for a 3-input gate:

ECE124 Digital Circuits and Systems

Page 5

2-level NAND only implementations (1)


If we are given a 2-level SOP, obtaining a NAND only implementation is trivial; we simply use apply a double inversion and use the DeMorgan theorem being careful of where we leave the inversions in the final expression. For example: f = = = = x1 !x2 + !x1 x2 + x3 !(!f) !( !(x1 !x2 + !x1 x2 + x3) ) !( !(x1 !x2) !(!x1 x2) !(x3) )

ECE124 Digital Circuits and Systems

Page 6

2-level NAND only implementations (2)


We can also make the conversion graphically. Again, given a 2-level SOP the procedure is straightforward: Insert double inverters at input of OR gate (input will be either from an AND gate, or from an input literal). Convert OR gate plus one level of inverters to NAND gate. Convert AND-gates plus the other level of inverters to NAND gates. Some literals might get inverted.

ECE124 Digital Circuits and Systems

Page 7

2-level NAND only implementations (3)

ECE124 Digital Circuits and Systems

Page 8

Multi-level NAND gate implementations (1)


Circuits are not always in 2-level (or SOP) form.

Example:

x2

x1

x2
x4

x1 x5 x3

Conversion method is essentially the same: Insert double inverters before OR gates. Use one set of inverters plus the OR gates to convert to NAND. Use other inverts with AND gates to convert to NAND. Occasionally, might need to implement an inverter using NAND.

ECE124 Digital Circuits and Systems

Page 9

Multi-level NAND gate implementations (2)


x2
x2
x4
x1

x1
x5
x3
x1

x2

x2
x4
Notice the extra inverters

x1 x5

x3

ECE124 Digital Circuits and Systems

Page 10

NOT-gate via NAND


We can implement a NOT-gate using a NOR by applying the same signal to both inputs.

ECE124 Digital Circuits and Systems

Page 11

OR-gate via NOR


We can implement an OR-gate using a NOR and (then) another NOR to perform inversion.

ECE124 Digital Circuits and Systems

Page 12

AND-gate via NOR


We can implement an AND-gate by using a NOR gate and (then) other NOR gates to invert the inputs. The ability to implement INV/AND/OR with NOR means we can implement any circuit using only NORs (if only my replacing the AND, OR and NOT gates with their NOR implementations).

ECE124 Digital Circuits and Systems

Page 13

Comment
Before continuing, we should make note that a NOR gate performs the same function as an AND gate with inverters at the inputs. This is useful to remember. We can illustrate for a 3-input gate:

ECE124 Digital Circuits and Systems

Page 14

2-level NOR only implementations (1)


If we are given a 2-level POS, obtaining a NOR only implementation is trivial; we simply use apply a double inversion and use the DeMorgan theorem being careful of where we leave the inversions in the final expression. For example: f = = = = (x1 + x2)(x3 + x4)(x5) !(!f) !( !((x1 + x2)(x3 + x4)(x5)) ) !( !(x1 + x2) + !(x3 + x4) + !(x5) )

ECE124 Digital Circuits and Systems

Page 15

2-Llevel NOR gate implementations (2)


Can also make the conversion graphically and it is straightforward: Insert double inverters at input of AND gate (input will be either from an OR gate, or from an input literal). Convert AND gate plus one level of inverters to NOR gate. Convert OR gates plus the other level of inverters to NOR gates. Some literals might get inverted.

ECE124 Digital Circuits and Systems

Page 16

2-Llevel NOR gate implementations (3)

ECE124 Digital Circuits and Systems

Page 17

Multi-level NOR gate implementations (1)


Circuits are not always in 2-level (or POS) form.

Example:

x2

x1

x2
x4

x1 x5 x3

Conversion method is essentially the same: Insert double inverters before AND gates. Use one set of inverters plus the AND gates to convert to NOR. Use other inverters with OR gates to convert to NOR. Occasionally, might need to implement an inverter using NOR.

ECE124 Digital Circuits and Systems

Page 18

Multi-level NOR gate implementations (2)


x2
x1

x2
x4

x1 x5 x3

x2

x1
x1

x2
x4
Notice the extra inverters

x5
x3

ECE124 Digital Circuits and Systems

Page 19

Das könnte Ihnen auch gefallen