0% found this document useful (0 votes)
48 views

Implementation Using Logic Gates and

The document discusses the implementation of digital circuits using logic gates. It covers universal gates like NAND and NOR and how they can be used to implement AND, OR, and NOT gates. It also discusses how any Boolean function can be implemented using either NAND gates alone by expressing the function using a sum-of-products form or using NOR gates alone by expressing the function as a product-of-sums. The concepts of minterms, maxterms, sum-of-products form (SOP), and product-of-sums (POS) form are explained. Conversion between standard and canonical SOP and POS forms is also covered.

Uploaded by

Gautam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Implementation Using Logic Gates and

The document discusses the implementation of digital circuits using logic gates. It covers universal gates like NAND and NOR and how they can be used to implement AND, OR, and NOT gates. It also discusses how any Boolean function can be implemented using either NAND gates alone by expressing the function using a sum-of-products form or using NOR gates alone by expressing the function as a product-of-sums. The concepts of minterms, maxterms, sum-of-products form (SOP), and product-of-sums (POS) form are explained. Conversion between standard and canonical SOP and POS forms is also covered.

Uploaded by

Gautam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Digital Circuit Design

18B11EC215
Lecture 7
Implementation using Logic Gates and
Standard forms

1
Outline
▪ Universal Gates: NAND and NOR

▪ Implementation using NAND Gates

▪ Implementation using NOR Gates

▪ Standard Forms

▪ Minterm & Maxterm

▪ Canonical Form
▪ SOP
▪ POS
▪ Conversion between canonical forms

2
Universal Gates: NAND and NOR[1,3]
▪ AND/OR/NOT gates are sufficient for building any Boolean functions.
▪ We call the set {AND, OR, NOT} a complete set of logic.
▪ However, other gates are also used because:
(i) usefulness
(ii) economical on transistors
(iii) self-sufficient

NAND/NOR: economical, self-sufficient


XOR: useful (e.g. parity bit generation)

3
NAND Gate
▪ NAND gate is self-sufficient (can build any logic circuit with it).
▪ Therefore, {NAND} is also a complete set of logic.
▪ Can be used to implement AND/OR/NOT.
▪ Implementing an inverter using NAND gate:

x x'

(x.x)' = x' (T1: idempotency)

4
NAND Gate[2]
▪ Implementing AND using NAND gates:
(x.y)'
x ((xy)'(xy)')' = ((xy)')' idempotency
x.y
y = (xy) involution

Implementing OR using NAND gates:

x'
x ((xx)'(yy)')' = (x'y')' idempotency
x+y = x''+y'' DeMorgan
= x+y involution
y
y'

5
NOR Gate[2]
▪ NOR gate is also self-sufficient.
▪ Therefore, {NOR} is also a complete set of logic
▪ Can be used to implement AND/OR/NOT.
▪ Implementing an inverter using NOR gate:

x x'

(x+x)' = x' (T1: idempotency)

6
NOR Gate[2]
Implementing AND using NOR gates:
x'
x
x.y
((x+x)'+(y+y)')'=(x'+y')' idempotency
y
y' = x''.y'' DeMorgan
= x.y involution

Implementing OR using NOR gates:

(x+y)'
x
x+y
y
((x+y)'+(x+y)')' = ((x+y)')' idempotency
= (x+y) involution

7
Implementation using NAND gates[1,2,3]
▪ Possible to implement any Boolean expression using NAND gates.
Procedure:
(i) Obtain sum-of-products Boolean expression:
e.g. F3 = xy'+x'z
(ii) Use DeMorgan theorem to obtain expression using 2-level NAND
gates
e.g. F3 = xy'+x'z
= (xy'+x'z)' ' involution
= ((xy')' . (x'z)')' DeMorgan

8
Implementation using NAND gates contd.
x (xy')'
y'
F3
x'
z (x'z)'

F3 = ((xy')'.(x'z)') ' = xy' + x'z

9
Implementation using NOR gates[1,2,3]
▪ Possible to implement any Boolean expression using NOR gates.
Procedure:
(i) Obtain product-of-sums Boolean expression:
e.g. F6 = (x+y').(x'+z)
(ii) Use DeMorgan theorem to obtain expression using 2-level NOR gates.
e.g. F6 = (x+y').(x'+z)
= ((x+y').(x'+z))' ' involution
= ((x+y')'+(x'+z)')' DeMorgan

10
Implementation using NOR gates contd.
x (x+y')'
y'
F6
x'
z (x'+z)'

F6 = ((x+y')'+(x'+z)')' = (x+y').(x'+z)

11
Standard Forms

▪ Two Standard Forms:

▪ Sum-of-Products and Product-of-Sums

▪ Literals: A variable and its complemented form

▪ x, x' , y, y'

▪ Product Term: A single literal or a Product of several literals

▪ x, x.y.z', A'.B, A.B

▪ Sum Term: A single literal or a Sum of several literals


x, x+y+z', A'+B, A+B
SOP and POS

Sum-of-Products (SOP) Expression: Product-of-Sums (POS) Expression:

A product term or a logical sum (OR) of A sum term or a logical product (AND) of
several product terms. several sum terms.

x, x,
x.(y+z'),
x+y.z',
(x+y').(x'+y+z),
x.y'+x’.y.z,
(A+B).(A'+B')
A.B+A'.B'

Every Boolean expression can either be expressed as SOP or POS expression.


Example
SOP
1. x′.y + x.y′ + x.y.z

2. (x + y′).(x′ + y).(x′ + z′) POS


3. x′ + y + z or x.y.z′
Both
4. x.(w′ + y.z) or z′ + w.x′.y + v.(x.z + w′)

Neither

▪ SOP circuits can easily be implemented using NAND Gate

▪ POS circuits can easily be implemented using NOR Gate


Minterm & Maxterm [1,2]

▪ Consider two binary variables x, y.


▪ Each variable may appear as itself or in complemented form as literals (i.e. x, x' & y, y'
)
▪ For two variables, there are four possible combinations with the AND operator, namely:
x'.y', x'.y, x.y', x.y
■ Minterm: a product term in which all the variables appear exactly once, either
complemented or uncomplemented
▪ These product terms are called the minterms.

▪ A minterm of n variables is the product of n literals from the different variables.


Minterm & Maxterm [1,2]

▪ In general, n variables can give 2n minterms.


▪ In a similar fashion, a maxterm of n variables is the sum of n literals from the
different variables.
Examples: x'+y', x'+y, x+y',x+y
▪ Maxterm: a sum term in which all the variables appear exactly once, either
complemented or uncomplemented
▪ In general, n variables can give 2n maxterms.
Minterm & Maxterm [1]
The minterms and maxterms of 2 variables are denoted by m0 to m3 and M0 to M3
respectively:

Each minterm is the complement of the corresponding maxterm:


Example: m2 = x.y’
m2' = (x.y')' = x' + (y')' = x'+y = M2
Canonical Form: Sum of Minterms[1]
▪ What is a canonical/normal form?
▪ A unique form for representing something.

■ Any Boolean function F( ) can be expressed as a unique sum of minterms


and a unique product of maxterms (under a fixed variable ordering).

■ In other words, every function F() has two canonical forms:


■ Canonical Sum-Of-Products (sum of minterms)
■ Canonical Product-Of-Sums (product of maxterms)
Canonical Form: Sum of Minterms

a) Example: Obtain Sum-of-Minterms from the truth table


jab bhi hum ek boolean func ko sum of minterms use krke
represent krenge tab hum un hi minterms ko select krna hai
jaha output 1 ho
F1 = x.y.z' = Σm(6)
F2 = x'.y'.z + x.y'.z‘ + x.y'.z + x.y.z‘ + x.y.z
= Σm(1,4,5,6,7)
F3 = x'.y'.z + x'.y.z + x.y'.z' +x.y'.z
= Σm(1,3,4,5)
Conversion of SOP from standard to
canonical form [1]
jaha koi variable missing ho toh us variable ko represent krne k liye 1 ko insert kro for eg x missing
hai toh (x+x'=1) ko term mai dal do or expand kro or duplicate minterms ko remove krdo
■ Expand non-canonical terms by inserting equivalent of 1 in each missing variable x:
(x + x’) = 1
■ Remove duplicate minterms
■ f1(a,b,c) = a’b’c + bc’ + ac’
= a’b’c + (a+a’)bc’ + a(b+b’)c’
= a’b’c + abc’ + a’bc’ + abc’ + ab’c’
= a’b’c + abc’ + a’bc’ + ab’c’
= m1+m6+m2+m4
Canonical Form: Product of Maxterms [1]
jab bhi hum ek boolean func ko product of maxterms use krke represent krenge
tab hum un hi maxterms ko select krna hai jaha output 0 ho
▪ Maxterms are sum terms.
▪ For Boolean functions, the maxterms of a function are the terms for which the
result is 0.
▪ Boolean functions can be expressed as Products-of-Maxterms.
Canonical Form: Product of Maxterms

F1 = ΠM(0,1,2,3,4,5,7) =(x+y+z).(x+y+z’)(x+y'+z).(x+y'+z’)(x’+y+z)(x’+y+z’)(x’+y’+z’)

F2 = ΠM(0,2,3) = (x+y+z).(x+y'+z).(x+y'+z’)

F3 = ΠM(0,2,6,7)
= (x+y+z).(x+y'+z).(x'+y'+z).(x'+y'+z')
Conversion of POS from standard to
canonical form
■ Expand noncanonical terms by adding 0 in terms of missing variables (e.g., x.x’ = 0)
and using the distributive law

■ Remove duplicate maxterms

■ f1(a,b,c) = (a+b+c)•(b’+c’)•(a’+c’)
= (a+b+c)•(aa’+b’+c’)•(a’+bb’+c’)
= (a+b+c)•(a+b’+c’)•(a’+b’+c’)•(a’+b+c’)•(a’+b’+c’)

= (a+b+c)•(a+b’+c’)•(a’+b’+c’)•(a’+b+c’)
Conversion Between Canonical Forms [1]
terms
■ Replace ∑ with ∏ (or vice versa) and replace those j’s that appeared in the
original form with those that do not.

■ Example:
f1(a,b,c) = a’b’c + a’bc’ + ab’c’ + abc’
= m1 + m2 + m4 + m6
= ∑m(1,2,4,6)
= ∏M(0,3,5,7)
= (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’)
Implementation of SOP Expressions[1]
▪ Sum-of-Products expressions can be implemented using:
❖ 2-level AND-OR logic circuits
❖ 2-level NAND logic circuits
▪ AND-OR logic circuit

A
B
F = AB + CD + E
C
F
D

25
Implementation of SOP Expressions
contd.
▪ NAND-NAND circuit (by circuit
transformation) A
a) add double bubbles B
b) change OR-with- C
inverted-inputs to NAND F
D
& bubbles at inputs to
their complements E

A
B
C
F
D

E'

26
Implementation of POS Expressions[1]
▪ Product-of-Sums expressions can be implemented using:
❖ 2-level OR-AND logic circuits
❖ 2-level NOR logic circuits
▪ OR-AND logic circuit

A
B
G = (A+B).(C+D).E
C
G
D

27
Implementation of POS Expressions
contd.

▪ NOR-NOR circuit (by circuit A


transformation): B
a) add double bubbles C
b) changed AND-with- G
D
inverted-inputs to NOR
& bubbles at inputs to E
their complements

A
B
C
G
D

E'

28
References

[1] M. Morris Mano and Michael D. Ciletti, “Digital Design with an Introduction to the
Verilog HDL,” 5th Edition, Pearson Education,2013.

[2] Reshu Gupta, Amit Gupta ,Atul Kumar Sharma “ Switching Theory(Digital
Electronics)”, Tech India Publication Series, Satya Prakashan, New Delhi.

[3] R. P. Jain, “Modern Digital Electronics,” 4th Edition, Tata McGraw-Hill Education,
2009.

29

You might also like