• No results found

NAND and NOR Implementation

N/A
N/A
Protected

Academic year: 2021

Share "NAND and NOR Implementation"

Copied!
12
0
0

Loading.... (view fulltext now)

Full text

(1)

University of Wisconsin - Madison

ECE/Comp Sci 352 Digital Systems Fundamentals

Charles R. Kime Section 2 – Fall 2001

Chapter 2 – Combinational Logic Circuits – Part 7

Charles Kime & Thomas Kaminski

© 2001 Prentice Hall, Inc

Logic and Computer Design Fundamentals

NAND and NOR Implementation

 We found that we could implement general Boolean equations with these three primitives:

• AND

• OR

• NOT

 In this section we will find that either of two gates, the NAND gate or the NOR gate can be used to implement arbitrary logic functions.

 We use the Positive Logic Convention (where

all signals are active high) and a small circle to

on a symbol to represent NOT or invert.

(2)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 3

NAND Gates

S The basic positive logic NAND gate is denoted by the following symbol:

• AND-Invert (NAND)

S NAND comes from NOT AND, I. e., the AND function with a NOT applied. We call this symbol for a NAND gate an AND-Invert. The small circle represents the invert function.

S If we apply DeMorgan's Law we get:

X Y Z

Z Y X Z Y

X⋅⋅⋅⋅ ⋅⋅⋅⋅ ==== ++++ ++++

Z Y X ) Z , Y , X (

F ==== ⋅⋅⋅⋅ ⋅⋅⋅⋅

Logic and Computer Design Fundamentals Chapter 2-Part 7 4

NAND Gates (Cont.)

S Applying DeMorgan's Law gives:

• Invert-OR (NAND)

S We call this symbol for a NAND gate the Invert - OR since all inputs are inverted, followed by the OR function.

S Both symbols represent the NAND gate - it is sometimes more logically descriptive to use one form over the other.

S A NAND gate with one input degenerates to an inverter.

X Y Z

Z Y X ) Z , Y , X (

F ==== ++++ ++++

(3)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 5

NAND Function Implementation

S NAND gates can implement a simplified Sum-of- Products form. Constructing two level NAND-NAND gate circuit:

S The first level is two 2-input NAND gates using AND- Invert. The second level is one 2-input NAND gate using Invert-OR. Using the NAND relationship, we have:

D C B

) A

D , C , B , A (

G ==== ⋅⋅⋅⋅ ⋅⋅⋅⋅ ⋅⋅⋅⋅

D C B A⋅⋅⋅⋅ ++++ ⋅⋅⋅⋅

====

D C B A⋅⋅⋅⋅ ++++ ⋅⋅⋅⋅

====

A B C D

D C B A ) D , C , B , A (

G ==== ⋅⋅⋅⋅ ++++ ⋅⋅⋅⋅

NAND Implementation (Cont.)

In the implementation, note that the bubbles are on opposite ends of the same line.

Thus, they can be combined and deleted:

A B C D

G(A,B,C,D)

This form of the implementation is the Sum-of-Products form.

(4)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 7

NAND Implementation (Cont.)

S In the implementation, the bubbles are on opposite ends of the same line.

S By , they can be combined and deleted:

S A sum-of-products (SOP) form results

S To implement an equation like: F(A,B,C) = A + BC, the NAND for A degenerates to a NOT since there is only one input

A B C D

G(A,B,C,D)

X ====

X

Logic and Computer Design Fundamentals Chapter 2-Part 7 8

Degenerate AND Term

S The degenerate NAND becomes an inverter:

S To implement the complement of F using NAND gates, add an inverter to the output:

A

B C

F(A,B,C)

A

B C

F'(A,B,C)

(5)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 9

NAND-NAND Example

S Implement:

x

z w

0 1 3 2

4 5 7 6

12 13 15 14

8 9 11 10

1 1 1 1

1 1 1

1 1

0 0

0 0 0

0 0

y

F’ (w,x,y,z) x

y

z w

0 1 3 2

4 5 7 6

12 13 15 14

8 9 11 10

1 1 1 1

1 1 1

1 1

0 0

0 0 0

0 0

F(w,x,y,z)

z w y x x w z y ) z , y , x , w (

F ==== ++++ ++++ ++++

Summary: Two-Level NAND Circuits

S Find minimum literal SOP form for F and F

S Select SOP form with smallest literal count

S Convert selected form to NAND circuit using AND-invert (inverters for single literal AND terms) and invert-OR symbols

S If SOP form for F used, add inverter to

circuit output.

(6)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 11

NOR Gates

The basic positive logic NOR gate (Not-OR) is denoted by the following symbol:

OR-Invert (NOR)

This is called the OR-Invert, since it is logically an OR function followed by an invert. By DeMorgan's Law we have the following Invert-AND symbol for a NOR gate:

X Y Z

Invert-AND

A single-input NOR gate is an inverter, too.

X Y Z

Z Y X ) Z , Y , X (

F ==== + ++++

Logic and Computer Design Fundamentals Chapter 2-Part 7 12

NOR Gates

S The basic positive logic NOR gate is denoted by the following symbol:

• OR-Invert (NOR)

S NOR comes from NOT OR, I. e., the OR function with a NOT applied. We call this symbol for a NOR gate an OR-Invert. The small circle represents the invert function.

S If we apply DeMorgan's Law we get:

Z Y X Z Y X++++ ++++ ====

X Y Z

Z Y X ) Z , Y , X (

F ==== + ++++

(7)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 13

NOR Gates (Cont.)

S Applying DeMorgan's Law gives:

• Invert-AND (NOR)

S We call this symbol for a NOR gate the Invert- AND since all inputs are inverted, followed by the AND function.

S Both symbols represent the NOR gate - it is sometimes more logically descriptive to use one form over the other.

S A NOR gate with one input degenerates to an inverter.

Z Y X ) Z , Y , X (

F ====

X Y Z

D) (C B) (A++++ ++++ ++++

NOR Function Implementation

S NAND gates can implement a simplified Sum-of- Products form. Constructing two-level NOR-NOR circuit:

S The first level is two 2-input NOR gates using OR- Invert. The second level is one 2-input NOR gate using Invert-AND.

S Using the NOR relationship, we have:

) D , C , B , A (

G ====

====

D) (C B) (A++++ ++++

====

((((

A B

)))) ((((

C D

))))

) D , C , B , A (

G ==== ++++ ⋅⋅⋅⋅ ++++

A B C D

D) (C B) (A++++ ++++

(8)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 15

Useful Transformations

From Involution (i.e. (A')' = A) and DeMorgan's Law, we get the following useful equivalences:

(A••••B) = ((A••••B)')' ⇔⇔⇔⇔ (A'+B')' (A+B) =

((A+B)')'

⇔ (A'••••B')'

(A••••B)' ⇔⇔⇔⇔ (A'+B') (A+B)' ⇔⇔⇔⇔ (A'••••B')

These simple transformations can be used to manipulate a two level network.

Logic and Computer Design Fundamentals Chapter 2-Part 7 16

Graphical Transformations

The relations from the previous slide lead to the following transformations:

Recall that two bubbles in series can be removed from the circuit

(A••••B) = ((A ••••B)')' ⇔⇔ (A'+B')' (A + B ) =

((A +B )')'

⇔ (A'••••B')' (A••••B)' ⇔⇔ (A'+B') (A + B )' ⇔ (A'••••B')

(9)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 17

General Two-level Implementations

We need to consider whether the form of a two-level implementation is to be:

1. SOP (AND-OR) or 2. POS (OR-AND).

Complemented output functions (i.e. AND-NOR or OR- NAND) can be handled by complementing the function.

Given a function F expressed as a Karnaugh Map, we can use the same general procedures we have used before to minimize the function and express it in SOP or POS form.

General Implementations (Cont.)

Given a two level implementation desired, use the previous transfromations to get it into one of the below forms. Then follow the steps to transform the function to the desired form:

For Type: Use:

AND-OR (SOP Form)

Circle 1's in the K-Map and minimize (Also use for NAND-NAND)

AND-NOR

(SOP complemented)

Circle 0's in the K-Map and minimize OR-AND

(POS Form)

Circle 0's in the K-Map and minimize SOP. Use DeMorgan's to transform to POS. (Also use for NOR-NOR)

OR-NAND

(POS complemented)

Circle 1's in the K-Map and minimize SOP. Use DeMorgan's to transform to POS.

(10)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 19

Implementation Example 1

Implement the function in NOR-OR.

A

B

C 1 1

1 1

0 1

0 0

We can remove the "Inverter" and replace it with the complement of the input variable

Logic and Computer Design Fundamentals Chapter 2-Part 7 20

Implementation Example 2

A

B 1

1 1 1

0 1

0 0

Implement the function in AND-NOR.

(11)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 21

Multi-level NAND Implementations

S Add inverters in two-level

implementation into the cost picture

S Attempt to “combine” inverters to reduce the term count

S Attempt to reduce literal + term count by factoring expression into POSOP or

SOPOS

Multi-level NAND Example 1

S F = A B’ + A C’ + B A’ + B C’

= A A’ + A B’ + A C’ + B A’ + B B’ + B C’

= A (A’ + B’ + C’) + B (A’ + B’ + C’)

F A

C B

7 inputs and 4 gates 15 inputs and 8 gates*

* Counting inverters (NOTS) as 1 input and 1 gate

(12)

Logic and Computer Design Fundamentals

© 2001 Prentice Hall, Inc Chapter 2-Part 7 23

Multilevel NAND Example 2

S F = AB + AD’ + BC + CD’

References

Related documents

Your brain transmits this glorious information to your mental level, which in turn passes it down to your emotional level, which tells your etheric body to turn off the adrenalin;

It is interesting to mention that in case of closed fracture-dislocation of the MCP joint, the open reduction is the most practical because of the interposition of

A model is introduced, in which the irregularity spectrum of the Galactic magnetic field beyond the dissipation length scale is in an isotropic approximation first a Kolmogorov

follow-up (3 years) and using self-reported clinical risk factors – more complex tools as FRAX® did not perform better in the fracture risk prediction compared with simpler tools

The computational study entails sequential screening of all food and drug administration-approved drugs (1491) against three protein targets; through structural- and

Improved Interpretation of Mercury Intrusion and Soil Water Retention Percolation Characteristics by Inverse Modelling and Void Cluster Analysis.. Gane 2

Moreover Otori et al., (2003) in the experimental study of different calcium channel blockers protective effect against glutamate neurotoxicity in purified retinal ganglion

American Psychiatric Association (2000). Diagnostic and Statistical Manual of Mental Disorders, Fourth Edition, Text Revision. Washington, DC, American Psychiatric