CSE-1 & IT-1 Digital Principles & System Design 2
CSE-1 & IT-1 Digital Principles & System Design 2
COLLEGE OF ENGINEERING
CS6201- Digital Principles and System Design
UNIT-I BOOLEAN ALGEBRA AND LOGIC GATES
(REGULATION-2013)
(For Second Semester B.E/B.Tech students)
Department of CSE/IT
Prepared by Approved by
Mr.U.Palani HOD/IT
Mr. D.Prabakaran/ ASP Mrs.R.Geetha HOD /ECE
Ms.M.Nishanthi/AP Mr.S.Viswanathan HOD/ CIVIL
Course Coordinator
Mrs.R.Geetha HOD
COURSE OUTCOMES (COs)
CO 1: To able the students to understand different methods used for the simplification of
Boolean functions
CO 2: To able the students to understand the concepts of combinational circuits and code
converter.
CO 3: To able the students to design and implement the synchronous sequential circuits.
CO 4: To able the students to design and implement the Asynchronous Sequential Circuits.
Binary Codes: Weighted codes, Reflective codes, Non weighted codes, Sequential codes, Alpha
numeric codes, Error detecting and correcting code
Boolean Algebra and Theorems:
i)Commutative Law iii) Distributive Law
(A+B)= (B+A) A+(B.C)= (A+B) (A+C)
(A.B)= (B.A) A. (B+C) = (A.B) +(A.C)
ii)Associative Law
A+ (B+C) = (A+B) +C
(A.B).C=A. (B.C)
DeMorgan’s theorem.
1. The complement of a product is equal to the sum of the complements.(AB)' = A' + B'
2. The complement of a sum term is equal to the product of the complements. (A +B)' = A'B'
effective method which is used to simplify the Boolean functions. It is also called as the Tabulation
method. The fundamental principle is is that the minterms while binary equivalent differ only in one
place can be combined to reduce the minterms.
Prime Implicant: All the implicants of a function determined using a Karnaugh map are called
prime implicants.
Logic Gates: The logic gate is an electronic circuit that has one or more input binary variables but
only one output.
1. AND gate-(A.B) 4.NAND gate-(A.B)‟
2. OR gate-(A+B) 5.NOR gate-(A+B)‟
3. NOT gate-A‟ 6.EX-OR gate-A‟B+AB‟
NAND-NAND Implementation: The rules involved in obtaining the logic diagram from a Boolean
function are
1. Simplify the given Boolean function and express it in sum of product form.
2. Draw a NAND gate for each product term of the function that has two or more literals. The
inputs to each NAND gate are the literals of the term. This constitutes a group of first level
gates.
3. If Boolean function includes any single literal or literals draw NAND gate for each single
literal and connect corresponding literal as an input to the NAND gates.
4. Draw a single NAND gate in the second level, with inputs coming from output first level
gates.
NOR –NOR Implementation: The rules involved in obtaining the logic diagram from a Boolean
function are
1. Simplify the given Boolean function and express it in product of sum form.
2. Draw a NOR gate for each sum term of the function that has two or more literals. The inputs to
each NOR gate are the literals of the term. These constitute a group of first level gates.
3.If Boolean function includes any single literal or literals, draw NOR gate for each single literal
and connect corresponding literal as an input to the NOR gate.
4. Draw a single NOR gate in the second level, with inputs coming from output of first level gates
Two Marks
Review of Number Systems
1. What are the types of number system in digital electronics? May-03
Decimal Number system: The decimal number system has 10 numerals or
symbols. The decimal number system is called as base-10 system.
Binary number system: This number system has two digits 0 and 1. The
decimal number system is called as base-2 system.
Octal number system: It has eight digits 0 to 7. The octal number system is a
base 8 number system.
Hexa decimal number system: It has sixteen digits 0 to 9,A,B,C,D,E,F. The
hexa decimal number system is a base 16 number system.
2. Find the binary equivalent of the decimal number 108.
2 108
2 54-0
2 27-0
2 13-1
2 6-1
2 3-0
1-1
Ans: (108)10=(1101100)2
3. Find (10010.011)2=(?)10
Solution:
(10010.011)2=(?)10
=(1x24)+ (0x23)+ (0x22)+ (1x21)+ (0x20). (0x2-1)+ (1x2-2)+ (1x2-3)
=(16+0+0+2+0)x(0+0.25+0.125) =(18.375)10
(10010.011)2=(18.375)10
4. Perform the following code conversion. Nov-11
(1010.10)16=(?)2=(?)8=(?)10
Solution:
Hexa decimal to binary:
(1010.10)16=(0001000000010000.00010000)2
Binary to octal:
(0001000000010000.00010000)2=(10020.04)8
Octal to decimal:
(10020.04)8=(1x84)+ (0x83)+ (0x82)+ (2x81)+ (0x80). (0x8-1)+ (4x8-2)
=(4112.0625)10
1 3 3 . 3 2
(1011011.01101)2=(133.32)8
(ii) (3574)8=(?)2
3 5 7 4
0x0=0
0x1=0
1x0=0
1x1=1
Binary Codes
10. List the types of binary codes in digital electronics.
i) Weighted codes
ii) Reflective codes
iii) Non weighted codes
iv) Sequential codes
v) Alpha numeric codes
vi) Error detecting and correcting code
A B A.B B A B.A
0 0 0 0 0 0
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 1 1 1
The associative property of Boolean algebra states that the OR ing of several
variables results in the same regardless of the grouping of the variables. The
associative property is stated as follows:
i) A+(B+C) = (A+B) +C
ii) (A.B).C=A. (B.C)
Truth table (A.B).C=A. (B.C)
A B C AB (AB)C A B C BC A(BC)
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 0 0
0 1 0 0 0 0 1 0 0 0
0 1 1 0 0 0 1 1 1 0
1 0 0 0 0 1 0 0 0 0
1 0 1 0 0 1 0 1 0 0
1 1 0 1 0 1 1 0 0 0
1 1 1 1 1 1 1 1 1 1
A B (AB)‟ A‟+B‟
0 0 1 1
0 1 1 1
1 0 1 1
1 1 0 0
A B (A+B)‟ A‟.B‟
0 0 1 1
0 1 0 0
1 0 0 0
1 1 0 0
Example: A+A‟=1,A.A‟=0
21. State consensus theorem in Boolean algebra.
In simplification of Boolean expression, an expression of the form
AB+A‟C+BC the term BC is redundant and can be eliminated to form the equivalent
expression AB-A‟C. The theorem used for this simplification is known as Consensus
theorem.
Example: AB+A‟C+BC=AB+A‟C
Solution:
D=(A+B)(A+B‟)
=AA+AB+AB‟+BB‟
=A+AB+AB‟+BB‟
= A(1+B+B‟) [B.B‟=0]
=A.1
=A [B+B‟=1]
Solution:
Z=A+A‟B
=A+AB+A‟B [A+AB=A]
=A+B (A+A) [A+A‟=1]
=A+B
Boolean Functions
24. What do you meant by literal?
In Boolean function, the total number of variables in complemented or
uncomplemented form is called literals.
Example: The function F(A,B,C,D)=A+B‟C‟+ACD‟ contains 4 literals.
The function F(A,B)=AB‟ contains 2 literals.
The function F(X,Y)=XY+X‟Y‟ contains 2 literals.
Solution:
F=C+A‟B‟
by only one prime implicant, the prime implicant is said to be essential. The sum
terms which appear in the k-map are called prime implicant groups.
All the implicants of a function determined using a Karnaugh map are called
prime implicants.
1. It does not have any essential prime implicant ( essential row ), that is each
column contains at least two X‟s( don‟t cares)
2. NO dominance relation exists among rows and columns.
3. The costs of the rows are not the same.
o A semi cyclic prime implicant table is said to be cyclic if all the rows of that table
are of same cost.
o To solve such cases include any one of the rows to possible minimal sum and
proceed as if it were a normal case
Logic Gates
42. What is meant by logic gates?
The logic gate is an electronic circuit that has one or more input binary
variables but only one output. It is called logic gate because of it ability to operate on
a number of binary inputs to perform a logical function, i.e its output is a logical
function of inputs.
The three basic logic gates are
1. AND gate
2. OR gate
3. NOT gate
43. Why NAND and NOR gates are called universal gates?
NAND and NOR are the gates that can be used alone to generate remaining gates
such as NOT, AND and OR gates. Thus, with only any of the two gates we can
implement the logic circuit. Hence they are called as Universal gates.
NAND Gate:
NOR Gate:
44. Draw the logic diagram and truth table for OR gate.
OR Gate logic diagram:
Truth table:
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
45. Draw the truth table for NAND and NOR gate.
NAND Gate: NOR Gate:
Truth table:
A B Output A B Output
0 0 1 0 0 1
0 1 1 0 1 0
1 0 1 1 0 0
1 1 0 1 1 0
Truth Table:
A B Output
0 0 1
0 1 1
1 0 1
1 1 0
48. Why digital circuits are more frequently constructed with NAND and NOR
gates than with AND and OR gates?
Digital circuits are frequently constructed with NAND and NOR gates due to
following reasons,
If any simple combinational circuit we want to build and we are not using
universal gates then we want several AND, OR and NOT gates. This demands
number of ICs, one for each type of gate.
By using universal gates it is possible to reduce number of ICs required to
implement combinational circuit.
5. Simplify the given Boolean function and express it in sum of product form.
6. Draw a NAND gate for each product term of the function that has two or more
literals. The inputs to each NAND gate are the literals of the term. This
constitutes a group of first level gates.
7. If Boolean function includes any single literal or literals draw NAND gate for
each single literal and connect corresponding literal as an input to the NAND
gates.
8. Draw a single NAND gate in the second level, with inputs coming from output
first level gates.
51. Implement EX-OR gate using only NAND gates.
Simplify the given Boolean function and express it in product of sum form.
Draw a NOR gate for each sum term of the function that has two or more literals.
The inputs to each NOR gate are the literals of the term. These constitute a group
of first level gates.
If Boolean function includes any single literal or literals, draw NOR gate for
each single literal and connect corresponding literal as an input to the NOR gate.
Draw a single NOR gate in the second level, with inputs coming from output of
first level gates.
The tri-state configuration utilizes the high speed operation of the totem-
pole arrangement while permitting outputs to be wired-AND. It is called tri-state
TTL because it allows three possible output stages: HIGH, LOW and high-
impedance.
Advantages of CMOS logic
It consumes less power.
It can be operated at high voltages, resulting in improved noise immunity.
Fan out is more
Better noise margin
16 Marks
1. State and prove the fundamental laws of Boolean algebra. (16)
Fundamental laws of Boolean algebra:
a. Commutative law
b. Associative law
c. Distributive law
Commutative law:
1.The order in which the variables are OR-ed makes no difference in the output
(A+B)= (B+A)
A B A+B B A B+A
0 0 0 0 0 0
0 1 1 0 1 1
1 0 1 1 0 1
1 1 1 1 1 1
2. The order in which the variables are AND-ed makes no difference in the output.
(A.B)= (B.A)
A B A.B B A B.A
0 0 0 0 0 0
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 1 1 1
Associative Law:
i)The associative property of Boolean algebra states that in the OR ing of several variables
results in the same regardless of the grouping of the variables.
A+(B+C) = (A+B) +C
ii) The associative law of multiplication states that it makes no difference in what order the
variables are grouped when AND ing several variables.
(A.B).C=A. (B.C)
A B C AB (AB)C A B C BC A(BC)
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 0 0
0 1 0 0 0 0 1 0 0 0
0 1 1 0 0 0 1 1 1 0
1 0 0 0 0 1 0 0 0 0
1 0 1 0 0 1 0 1 0 0
1 1 0 1 0 1 1 0 0 0
1 1 1 1 1 1 1 1 1 1
Distributive Law :
The distributive property states that AND ing several variables and OR ing the result
with a single variable is equivalent to OR ing the single variable with each of the the several
variables and then AND ing the sums.
i)A+BC= (A+B) (A+C)
The distributive law states that ORing several variables and AND ing the result with
a single variable is equivalent to AND ing the result with a single variable with each of the
several variables and ORing the products.
ii)A.(B+C) = (A.B) + (A.C)
DeMorgan’s theorem:De Morgan suggested two theorems that form important part of
Boolean algebra.
,
1.The complement of a product is equal to the sum of the complements.
(AB)' = A' + B'
Truth Table:
A B (AB)‟ A‟+B‟
0 0 1 1
0 1 1 1
1 0 1 1
1 1 0 0
A B (A+B)‟ A‟.B‟
0 0 1 1
0 1 0 0
1 0 0 0
1 1 0 0
2. Subtract the number (1110)-(1010) using 1’s and 2’s complement method.
Nov-03
Solution:
X=1110
Y=1010
1’s complement
1‟s complement of Y =0101
X=1110
Sum=1 0011
End around carry= 1
0100
2’s complement
1‟s complement of Y =0101
1
2‟s complement of Y = 0110
X= 1110
1 0100
Carry discarded
(1110)-(1010)=(0100)2
Add1= 1
1000111010
Discard carry
(147-89)=( 0 0 0 1 1 1 0 1 0)2
Solution:
(iii)F(A,B,C)=(A+B’)(B+C)(A+C’) Nov-08
1. OR each sum term having missing literals with terms form by ANDing the literal
and its complement.
F(A,B,C)=(A+B‟)+(C.C‟))(B+C+(A.A‟))(A+C‟+(B.B‟))
2. Expand the terms and reorder literals.
F(A,B,C)=(A+B‟+C)(A+B‟+C‟)(A+B+C)(A‟+B+C)(A+B+C‟)(A+B‟+C)
3. Reduce the expression by omitting repeated sum.
F=(A+B‟+C)(A+B‟+C‟)(A+B+C)(A‟+B+C)(A+B+C‟)
Solution:
f ( A, B, C, D) B
Solution:
A‟BC‟D‟-0100
A‟BC‟D-0101
ABC‟D‟-1100
AB‟C‟D-1001
A‟B‟CD‟-0010
Y=A‟B‟CD‟-A‟BC‟+BC‟D‟+AB‟C‟D
i) F(A,B,C,D)= Σm(1,4,5,6,12,14,15)
Solution:
F=BD‟+A‟C‟D+ABC
F=A‟C‟-A‟BD+A‟B‟D‟+ACD
F=AB+B‟C
8. (i) Find the prime implicants for the following function and determine which are
essential. F(w,x,y,z)= Σ (0,2,4,5,6,7,8,10,13,15) Nov-08,11 2-51 (8)
Solution:
The minterms of the given function are marked with 1‟s in the map. Fig 1 shows two
essential prime implicants. The term xz is essential because because there is only one
way to include minterms m13 and m15 within four adjacent squares. Similarly thereis
only one way that minterms m8 and m10 can be combined with four adjacent squares and
this gives second term x‟z‟. the two essential prime implicants cover eight minterms.
The remaining two minterms m4 and m6 must be considered next.
Fig 1 and 2 shows that the two ways of including remaining minterms with
prime implicants. Minterms m4 and m6 can be included with either w‟x and w‟z‟.
the simplified expression is obtained from the logical sum of the two essential prime
implicants and any one prime implicant that includes minterms m4 and m6. Thus
there are two possible ways that the function can be expressed in the simplified form
F=x‟z‟+xz+w‟x
=x‟z‟+xz+w‟z‟
Solution:
F(A,B,C,D)=A‟B‟+CD
Solution:
F(A,B,C,D)=D.(A+C‟)
(A’+B’+C+D)(A+B’+C+D)(A+B+C’+D’)(A+B+C+D’)(A+B+C’+D)
Y=(B‟+C+D)(B+C+D‟)(A+B+C‟)
Solution:
E=0
E=1
F=(C+A)(A‟+D‟)(A‟+B‟+E‟)
Solution:
f ( A, B,C, D) AC BD AC AB
11. Simplify the following Boolean function by using a Quine McCluskey method.
F(A,B,C,D) = Σm(0,2,3,6,7,8,10,12,13). (16)
Solution:
Step 1: List all minterms in the binary form and Arrange the minterms according to the
numbers of 1s.
m0 0000 m0 0000
m2 0010 m2 0010
m3 0011 m8 1000
m6 0110 m3 0011
m7 0111 m6 0110
Step 2: Compare each binary number with every term in the adjacent next higher category
and if they differ only by one position put a check mark‟-„.
2,3 0001-
2,6 0-10
2,10 -010
8,10 10-0
8,12 1-00
3,7 0-11
6,7 011-
12,13 110-
Step 4: Select the minimum number of prime implicants which cover the minterms.
AC‟D‟ 8,12 . .
ABC‟
12,13
B‟D‟
0,2,8,10
A‟C
2,3,6,7
Thus the simplified expression from the tabulation method which is obtained from the prime
implicant selection chart is
F(A,B,C,D) = ABC‟+B‟D‟+A‟C.
Solution:
Step 1: List all minterms in the binary form and Arrange the minterms according to
the numbers of 1s.
m4 0100 m2 0010
m5 0101 m4 0100
Step 2: Compare each binary number with every term in the adjacent next higher
category and if they differ only by one position put a check mark‟-„.
4,5 4,5,12,13 -1 0-
010-
4,12
-100
5,13
-101
9,13 1-01
12,13
110-
A‟B‟CD‟ 2 0010
Step 4: Select the minimum number of prime implicants which cover the minterms.
A‟B‟CD‟
2
AC‟D
9,13
BC‟
4,5,12,13
Thus the simplified expression from the tabulation method which is obtained from
the prime implicant selection chart is
Y= A‟B‟CD‟+AC‟D+BC‟.
13. Simplify the following Boolean expression using Quine McCluskey method
F= Σm(0,9,15,24,29,30)+d(8,11,31). Nov-09 (16)
Solution:
Step 1: List all minterms in the binary form and Arrange the minterms according to the
numbers of 1s.
m0 00000 m0 00000
Step 2: Compare each binary number with every term in the adjacent next higher
category and if they differ only by one position put a check mark‟-„.
9,11 010-1
11,15 01-11
15,31 -1111
29,31 111-1
30,31 1111-
Step 3: Select the minimum number of prime implicants which cover the minterms.
A‟C‟D‟E‟
0,8
A‟BC‟D‟ 8,9 . .
BC‟D‟E‟
8,24
A‟BC‟E
9,11
A‟BDE
11,15
BCDE 15,31 . .
ABCE
29,31
ABCD
30,31
F(A,B,C,D,E)=A‟C‟D‟E‟+BC‟D‟E‟+A‟BC‟E+A‟BDE+ABCE+ABCD
Solution:
Step 1: List all minterms in the binary form and Arrange the minterms according to the
numbers of 1s.
m0 0000 m0 0000
m2 0010 m2 0010
m4 0100 m4 0100
m8 1000 m8 1000
m9 1001 m9 1001
Step 2: Compare each binary number with every term in the adjacent next higher
category and if they differ only by one position put a check mark‟-„.
4,10 -100
8,9 100-
8,12 -100
8,10 10-0
9,11 10-1
9,13 1-01
10,11 101-
12,13 110-
Step 4: Select the minimum number of prime implicants which cover the minterms.
AC‟D 9,13 . .
AC‟
8,9,12,13
B‟D‟
0,2,8,13
C‟D‟
0,8,4,12
AB‟
8,9,10,11
F (A, B, C, D) =C‟D‟+AC‟+AB‟+B‟D‟
Solution:
Step 1: List all minterms in the binary form and Arrange the minterms according to the
numbers of 1s.
m1 0001 m1
0001
m2 0010 m2 0010
m3 0011 m4 0100
m5 0101 m8 1000
m9 1001 m3
0011
Step 2: Compare each binary number with every term in the adjacent next higher category
and if they differ only by one position put a check mark‟-„.
3,11
-011
9,11
10-1
12,14
11-0
11,15 1-11
14,15 111-
Step 4: Select the minimum number of prime implicants which cover the minterms.
A‟C‟D
T 1,5
A‟B‟C
2,3
A‟BC‟ 4,5 . .
BC‟D‟ 4,12 . .
AB‟C‟ 8,9 . .
ACD‟ 8,12 . .
ABD‟
12,14
ACD 11,15 . .
ABC
14,15
B‟D
1,3,9,11
t
Thus the simplified expression from the tabulation method which is obtained from
the prime implicant selection chart is
Y=A‟C‟D+A‟B‟C+ABD‟+ABC+B‟D.
16. Draw the logic symbol and truth table for the following logic gates. (16)
Solution:
The logic gate is an electronic circuit that has one or more input binary
variables but only one output. It is called logic gate because of it ability to operate on
a number of binary inputs to perform a logical function, i.e its output is a logical
function of inputs.
OR Gate:
Truth table:
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
AND gate:
Truth table:
A B A.B
0 0 0
0 1 0
1 0 0
1 1 0
NAND Gate:
Truth table:
A B Output
0 0 1
0 1 1
1 0 1
1 1 0
NOR gate:
Truth table:
A B Output
0 0 1
0 1 0
1 0 0
1 1 0
NOT gate:
Truth table:
A Output
0 1
1 0
EX-OR gate:
Truth table:
A B Output
0 0 0
0 1 1
1 0 1
1 1 0
EX-NOR gate:
Truth table:
A B Output
0 0 1
0 1 0
1 0 0
1 1 1
Solution:
F=XY‟+Z+Y‟Z
Solution:
Step 1: Simplify the given Boolean function
Y=AC+ABC+A‟BC+AB+D
=AC+BC(A+A‟)+AB+C
=AC+BC+AB+D
Step 2: Implement using AND-OR logic
18. a) Using K map simplify the following expressions and implement the same using
Basic gates. F= Σ(1,3,4,6) (8)
Solution
Step 3 : Based on the grouping the expression as been written for each grouping.
Step 4 : Hence by combining all the individual terms we get the final simplified
expression.
K-map:
F=A‟B+AB‟
Logic diagram:
F=A‟B‟+A‟C+B‟C
19. Minimize the following using k map and implement the resultant function using
NOR gate only. F(A,B,C,D,E) = Πm(2,4,7,9,26,38,29,31). (16)
Solution:
A=0
A=1
F=(A+B+C‟+D+E)(A+B+C‟+D‟+E‟)(A+B+C+D‟+E)(A+B‟+C+D+E‟)(A‟+B‟+C‟+D)
(A‟+B‟+C‟+E‟)(A‟+B‟+C+D‟+E).
Logic diagram:
The postulates of a mathematical system form the basic assumption from which it is
possible to deduce the theorems, laws and properties of the system.
Closure with respect to the operator . (dot) : When two binary elements are operated
by operator . (dot), the result is a unique binary element.
Closure with respect to the operator +: When two binary elements are operated by
operator + the result is a unique binary element.
An identity element with respect to +, designated by 0:
A+0=0+A=A
An identity element with respect to . (dot), designated by 1:
A.1=1.A=A
Commutative with respect to + : A + B = B + A
Commutative with respect to . (dot) : A . B = B . A
Distributive property of . (dot) over + :
A . (B + C) = (A . B) + (A . C)
Distributive property of + over . (dot) :
A + (B . C) = (A + B) . (A + C)
Associative property of + : A + (B + C) = (A + B) + C
Associative property of . : A . (B . C) = (A .B) . C
For every binary element, there exists complement element. For example, if A
is an element, we have A‟ is a complement of A i.e., if A = 0, then A‟ = 1 and vice
versa.
There exist at least two elements, say A and B in the set of binary elements
such that A is not equal to B.
CMOS has been and will remain the dominant technology is almost all VLSI design
areas.This is a direct result of the following advantages offered by CMOS processes.
Low power consumption: CMOS process provides lower power consumption and is easy
to scaling down.
High input impedance: Gate of MOS needs much lower driving current than base current
of bipolar.
Reduced silicon area: Scaling down increases the CMOS speed and reduces the area of the
chip.
Mature technology: CMOS processes are well established and continue to become more
mature. The powerful trust by leading edge digital memory and processors has led to
continuous improvement and down scaling of CMOS processes.
Design resources: Circuit and system design in CMOS is supported by a vast number of
resources. Many design techniques and design libraries for analog and digital design are
available.