0% found this document useful (0 votes)
97 views45 pages

22ESC143 - Module 3 - Notes

This document is a course module on Boolean Algebra, Logic Circuits, and Combinational Logic for Electronics Engineering students at RVITM, Bengaluru. It covers topics such as binary numbers, number base conversions, complements, and the design of combinational logic circuits like adders. The document serves as a comprehensive guide for understanding fundamental concepts in digital logic design.

Uploaded by

Akarsh AK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views45 pages

22ESC143 - Module 3 - Notes

This document is a course module on Boolean Algebra, Logic Circuits, and Combinational Logic for Electronics Engineering students at RVITM, Bengaluru. It covers topics such as binary numbers, number base conversions, complements, and the design of combinational logic circuits like adders. The document serves as a comprehensive guide for understanding fundamental concepts in digital logic design.

Uploaded by

Akarsh AK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Department of Electronics and Communication Engineering

Rashtreeya Sikshana Samithi Trust's

Rashtreeya Vidyalaya Institute of Technology and


Management (RVITM), Bengaluru

INTRODUCTION TO ELECTRONICS ENGINEERING(22ESC143/243)

SEMESTER-I
Module-3

Boolean Algebra, Logic Circuits


and
Combinational logic
Prepared by Divyashree M Assistant Professor, Dept. of E & C Engg, RVITM, Bengaluru

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

I & II Introduction to Internet of Things (22ETC151/251) P a g e 1 | 45


Semester
Department of Electronics and Communication Engineering

Module 3 Boolean Algebra, Logic Circuits RBT


and Combinational logic Levels

Boolean Algebra and Logic Circuits: Binary numbers, L2,


L3
Number Base Conversion, octal & Hexa Decimal Numbers,
Complements, Basic definitions, Axiomatic Definition of
Boolean Algebra, Basic Theorems and Properties of Boolean
Algebra, Boolean Functions, Canonical and Standard Forms,
Other Logic Operations, Digital Logic Gates.

Combinational logic: Introduction, Design procedure, Adders-


Half adder, Full adder.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 2 | 45


Semester
Department of Electronics and Communication Engineering

Boolean Algebra,
Logic Circuits
and
Combinational logic

I & II Introduction to Internet of Things (22ETC151/251) P a g e 3 | 45


Semester
Department of Electronics and Communication Engineering

3. Boolean Algebra, Logic Circuits and Combinational Logic


3.1 Binary Numbers

 A decimal number such as 7392 can be represented as:


7 x 103 + 3 x 102 + 9 x 101 + 2 x 100

 A number with a decimal point is represented by a series of coefficients as follows:


a5 a4 a3 a2 a1 a0. a-1 a-2 a-3

 The decimal equivalent of the binary 11010.11 is 26.75


1 x 24 + 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 + 1 x 2-1 + 1 x 2-2 = 26.75

 A number expressed in base-r system has coefficients multiplied by powers of r:an


. rn + an-1 . rn-1 + . . . + a2 . r2 + a1 . r + a0 + a-1 . r-1 + a-2 . r-2+ . . . + a-m . r-m
where r = 2,3,4... 8,9,10, ...16...

System Radix Allowable Digits

Binary 2 0,1
Octal 8 0,1,2,3,4,5,6,7
Decimal 10 0,1,2,3,4,5,6,7,8,9
Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,A, B, C, D, E, F

 (4021.2)5 = 4 x 53 + 0 x 52 + 2 x 51 + 1 x 50 + 2 x 5-1 = (511.4)10


4 x 125 + 0 + 10 + 1 + 2 x (1/5)
500 + 11 + .4

 (B65F)16 = 11 x 163 + 6 x 162 + 5 x 161 + 15 x 160 = (46687)10


11 x 4096 + 6 x 256 + 5 x 16 + 15
45056 + 1536 + 80 + 15

I & II Introduction to Internet of Things (22ETC151/251) P a g e 4 | 45


Semester
Department of Electronics and Communication Engineering
Augend: 101101 minuend: 101101 multiplicand: 1011
Addend: + 100111 subtrahend: -100111 multiplier: x 101

1010100 000110 110111

3.2 Number Base Conversions

 A binary number can be converted to decimal by forming the sum of powers of 2 of


those coefficients whose value is 1.
(1010.011) 2 = 23 + 21 + 2-2 + 2-3 = (10.375) 10

 Similarly, a number expressed in base r can be converted to its decimal equivalent by


multiplying each coefficient with the corresponding power of r and adding.
(630.4) 8 = 6 x 82 + 3 x 81 + 0 x 80 + 4 x 8-1 = (408.5) 10

 Conversion from Decimal 41 to Binary:

Integer quotient Remainder Coefficient


41/2 = 20 + ½ a0 = 1
20/2 = 10 + 0 a1 = 0
10/2 = 5 + 0 a2 = 0
5/2 = 2 + ½ a3 = 1
2/2 = 1 + 0 a4 = 0
1/2 = 0 + ½ a5 = 1

 The conversion from decimal integers to any base-r system is similar to the
example, except that division is done by r instead of 2.

 Conversion from Decimal 153 to Octal:

153
19 1
2 3
0 2 = (231) 8

I & II Introduction to Internet of Things (22ETC151/251) P a g e 5 | 45


Semester
Department of Electronics and Communication Engineering
 Conversion from Decimal fraction (0.6875) 10 to Binary:

Integer Fraction Coefficient


0.6875 x 2 = 1 + 0.3750 a-1 = 1
0.3750 x 2 = 0 + 0.7500 a-2 = 0
0.7500 x 2 = 1 + 0.5000 a-3 = 1
0.5000 x 2 = 1 + 0.0000 a-4 = 1

 The conversion from decimal fraction to any base-r system is similar to the example.
Multiplication is by r instead of 2, and the coefficients found from the integers may range
in value from 0 to r-1 instead of 0 and 1.

 Conversion from Decimal fraction (0.513) 10 to Octal:


0.513 x 8 = 4.104
0.104 x 8 = 0.832
0.832 x 8 = 6.656
0.656 x 8 = 5.248
0.248 x 8 = 1.984
0.984 x 8 = 7.872

(0.513) 10 = (0.406517…) 8

 The conversion of decimal numbers with both integers and fraction parts is done by
converting the integer and fraction separately and then combining the two answers.

3.3 Octal and Hexadecimal Numbers

 The conversion from and to binary, octal and hexadecimal plays an important part indigital
computers. Since 23 = 8 and 24 = 16, each octal digit corresponds to three binary digits
and each hexadecimal digit corresponds to four binary digits.
 Conversion from binary to Octal:
(10 110 001 101 011. 111 100 000 110) 2 = (26153.7406) 8

 Conversion from binary to Hexadecimal:


(10 1100 0110 1011. 1111 0000 0110) 2 = (2C6B.F06) 16

I & II Introduction to Internet of Things (22ETC151/251) P a g e 6 | 45


Semester
Department of Electronics and Communication Engineering
 Conversion from Octal to binary:
(673.124) 8 = (110 111 011. 001 010 100) 2

 Conversion from Hexadecimal to binary:


(306.D) 16 = (0011 0000 0110. 1101) 2

 Conversion from Hexadecimal to Decimal:


(37B) 16
3 x 162 + 7 x 161 + 11 x 160
= 3 x 256 + 7 x 16 + 11 x 1
= 768 + 112 +11
= (891) 10

3.4 Complements

 Are used to simplify the subtraction operation and for logical manipulation.

3.4.1 Diminished Radix Complement

Given a number N in base r having n digits, the (r – 1)’s complement of N is definedas (r – 1) –


N. For decimal numbers, r = 10 and r – 1 = 9, so the ninth complement of N is (10n – 1) – N.
Now, 10n represents a number that consists of a single 1 followed by n 0’s. 10n – 1 is a number
represented by n 9’s.

 If n = 4  104 = 10,000 and 104 – 1= 9999.


 The 9’s complement of 546700 is 999999 – 546700 = 453299
 The 9’s complement of 012398 is 999999 – 012398 = 987601
 For binary numbers, r = 2 and r – 1 = 1, so the 1’s complement of N is (2n – 1) – N.2n is
represented by a binary number that consists of a 1 followed by n 0’s.

 If n = 4  24 = (10000) 2 and 24 – 1= (1111) 2.

The 1’s complement of a binary number is formed by changing 1’s to 0’s and 0’s to1’s.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 7 | 45


Semester
Department of Electronics and Communication Engineering
The 1’s complement of 1011000 is 0100111
1’s complement of 0101101 is 1010010

3.4.2 Radix Complement

 The r’s complement of n-digit number N in base r is defined as rn – N for N ≠ 0 and 0for N
= 0. Comparing with the (r – 1)’s complement, the r’s complement is obtained by adding
1 to the (r – 1)’s complement since rn – N = [(rn – 1) –N] + 1.

 The 10’s complement of decimal 2389 = (104 –1) – 2389 +1 = 7611.


 The 2’s complement of binary 101100 = (26 –1) – 101100 + 1 = 010100.
 The 10’s complement of decimal 012389 = (106 –1) – 012389 + 1 = 987602.
 The 10’s complement of decimal 246700 = (106 –1) – 246700 + 1 = 753300.

Summary

The radix complement and diminished radix complement are defined as:
(N) r = an n-digit number N in base r
[N] r = the r’s complement of (N)r
[N] r-1 = the (r-1)’s complement of (N)r
[N] r = rn - (N)r (Eq.1)
[N] r-1 = [N]r – 1 (Eq.2)
From Eq.1 and Eq.2, we can also derive the following equations:
[N] r = [N]r-1 + 1 (Eq.3)
[N] r-1 = (rn - 1) - (N)r (Eq.4)

In the decimal system, r=10, we have 10’s complement and 9’s complement. In the octal
system, r=8, we have 8’s complement and 7’s complement. In the binary system, r=2, we have
2’s complement and 1’s complement.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 8 | 45


Semester
Department of Electronics and Communication Engineering
System Radix Complement Diminished Radix Complement

Decimal 10's complement 9's complement


Octal 8's complement 7's complement
Binary 2's complement 1's complement

To find the radix complement representation of a number, it is more convenient to firstderive the
diminished radix complement. The radix complement is then obtained by adding 1 to the
diminished radix complement.

The 9's complement of a decimal number is obtained by subtracting each digit from 9. The 7's
complement of an octal number is obtained by subtracting each digit from 7. The 1's
complement of a binary integer is obtained by subtracting each digit from 1.

Examples:

- Find the 10's complement and the 9's complement of (546700) 10


(453299)10 9's complement
(453300)10 10's complement (add 1 to the 9’s complement)

- Find the 8's complement and the 7's complement of (526071) 8


(251706)8 7's complement
(251707)8 8's complement (add 1 to the 7’s complement)

- Find the 2's complement and the 1's complement of (00011010) 2


(11100101)2 1's complement
(11100110)2 2's complement (add 1 to the 1’s complement)

I & II Introduction to Internet of Things (22ETC151/251) P a g e 9 | 45


Semester
Department of Electronics and Communication Engineering
3.4.3 Subtraction with Complements

Example (1):

Using 10’s complement, subtract 72532 – 3250


M– N

M = 72532
10’s complement of N = + 96750 (99999 – 03250) + 1
Sum = 169282
Discard end carry 105 =- 100000
Answer = 69282
Example (2):

Using 10’s complement, subtract 3250 – 72532


M – N

M = 03250
10’s complement of N = + 27468 (99999 – 72532) + 1
Sum = 30718
No end carry.
Answer - (10’s complement of 30718) = - 69282

Example (3):

Using 2’s complement, subtract 1010100 – 1000011


X–Y

X = 1010100
2’s complement of Y = + 0111101
Sum = 10010001
Discard end carry 27 = - 10000000
Answer: X - Y = 0010001

I & II Introduction to Internet of Things (22ETC151/251) P a g e 10 | 45


Semester
Department of Electronics and Communication Engineering
Example (4):

Using 2’s complement, subtract 1000011 – 1010100

X–X

Y = 1000011
2’s complement of X = + 0101100
Sum = 1101111
No end carry.
Answer: Y – X - (2’s complement of 1101111) = -0010001

Example (5): Using 1’s complement, subtract X – Y = 1010100 – 1000011


X = 1010100
1’s complement of Y = + 0111100 (+1 End-around carry)
Sum = 10010000
+1
Answer: X - Y = 0010001

Example (6): Using 1’s complement, subtract Y – X 1000011 – 1010100


Y = 1000011
1’s complement of X = + 0101011
Sum = 1101110
No end carry.
Answer: Y – X - (1’s complement of 1101110) = -0010001

I & II Introduction to Internet of Things (22ETC151/251) P a g e 11 | 45


Semester
Department of Electronics and Communication Engineering
3.5 Basic Definitions of Boolean Algebra

• Mathematical methods that simplify binary logics or circuits rely primarily on Boolean
algebra.

• Boolean algebra: a set of elements, a set of operators, and a number of unproved axioms
or postulates.

• A set of elements is any collection of objects, usually having a common property. A = {1,
2, 3, 4} indicates that set A has the elements of 1, 2, 3, and 4.

• A binary operator defined on a set S of elements is a rule that assigns, to each pair of
elements from S, a unique element from S.

The most common postulates used to formulate various algebraic structures areas follows:

1. Closure. A set S is closed with respect to a binary operator if, for every pair of
elements of S, the binary operator specifies a rule for obtaining a unique element of S.

2. Associative law. A binary operator * on a set S is said to be associative whenever


(x * y) * z = x * (y * z) for all x, y, z,  S

3. Commutative law. A binary operator * on a set S is said to be commutative whenever


x * y = y * x for all x, y  S

4. Identity element. A set S is said to have an identity element with respect to a binary
operation * on S if there exists an element e S with the property that
e * x = x * e = x for every x  S
Example: The element 0 is an identity element with respect to the binary operator +
on the set of integers I = {c, -3, -2, -1, 0, 1, 2, 3,c}, since x + 0 = 0
+ x = x for any x  I
The set of natural numbers, N, has no identity element, since 0 is excluded from the
set.
5. Inverse. A set S having the identity element e with respect to a binary operator
* is said to have an inverse whenever, for every x S, there exists an element

I & II Introduction to Internet of Things (22ETC151/251) P a g e 12 | 45


Semester
Department of Electronics and Communication Engineering
y  S such that x * y = e
Example: In the set of integers, I, and the operator +, with e = 0, the inverse of an
element a is (-a), since a + (-a) = 0.

6. Distributive law. If * and • are two binary operators on a set S, * is said to be


distributive over • whenever

x * (y • z) = (x * y) • (x * z)
Field:
• A field is an example of an algebraic structure.

• The field of real numbers is the basis for arithmetic and ordinary algebra.

• The binary operator + defines addition.

• The additive identity is 0.

• The additive inverse defines subtraction.

• The binary operator • defines multiplication.

• The multiplicative identity is 1.

• For a ≠ 0, the multiplicative inverse of a = 1/a defines division (i.e., a •1/a = 1).

• The only distributive law applicable is that of • over +:


a • (b + c) = (a • b) + (a • c)

3.6 Axiomatic Definition of Boolean Algebra

In 1854, George Boole developed an algebraic system now called Boolean algebra. In 1904, E. V.
Huntington formulated a set of postulates that formally define the Boolean algebra. In 1938, C. E.
Shannon introduced a two-valued Boolean algebra called switching algebra that represented the
properties of bistable electrical switching circuits.

• Two binary operators, + and •, (Huntington) postulates:

1. (a) The structure is closed with respect to the operator +.

(b) The structure is closed with respect to the operator •.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 13 | 45


Semester
Department of Electronics and Communication Engineering
2. (a) The element 0 is an identity element with respect to +;

that is, x + 0 = 0 + x = x.
(b) The element 1 is an identity element with respect to •;
that is, x • 1 = 1 • x = x.

3. (a) The structure is commutative with respect to +; that is, x + y = y + x.


(b) The structure is commutative with respect to • ; that is, x • y = y • x.

4. (a) The operator • is distributive over +; that is, x • (y + z) = (x • y) + (x • z).


(b) The operator + is distributive over •; that is, x + (y • z) = (x + y) • (x + z).

5. For every element x  B, there exists an element x  B (called the


complement of x)such that (a) x + x = 1 and (b) x • x = 0.

6. There exist at least two elements x, y  B such that x ≠ y

Comparing Boolean algebra with arithmetic and ordinary algebra

1. Huntington postulates do not include the associative law. However, this


law holds for Boolean algebra and can be derived (for both operators) from
the other postulates.

2. The distributive law of + over • (i.e., x + (y • z) = ( x + y) • ( x + z) ) is valid


for Booleanalgebra, but not for ordinary algebra.

3. Boolean algebra does not have additive or multiplicative inverses;


therefore, there areno subtraction or division operations.

4. Postulate 5 defines an operator called the complement that is not available


in ordinaryalgebra.

5. Ordinary algebra deals with the real numbers, which constitute an infinite
set of elements. Boolean algebra deals with the as yet undefined set of
elements, B, but in the two-valued Boolean algebra defined next (and of
interest in our subsequent use of that algebra), B is defined as a set with only
two elements, 0 and 1.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 14 | 45


Semester
Department of Electronics and Communication Engineering
3.6.1 Two-valued Boolean Algebra

• B = {0,1}

• The rules of operations

• Closure: the result of each operation is either 1

• Identity elements: 0 for + and 1 for ‧

• The commutative laws are obvious from the symmetry of the binary operator tables.

• Distributive laws:
x‧(y + z) = (x‧y) + (x‧z)
x+ (y‧z) = (x+y)‧(x+z)

y‧z x+(y‧z)
0 0
0 0
0 0
1 1
0 1
0 1
0 1
1 1

I & II Introduction to Internet of Things (22ETC151/251) P a g e 15 | 45


Semester
Department of Electronics and Communication Engineering
x+ x+z (x+y)‧(x+z)
y
0 0 0
0 1 0
1 0 0
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1

• Complement

– x+x'=1: 0+0'=0+1=1; 1+1'=1+0=1

– x‧x'=0: 0‧0'=0‧1=0; 1‧1'=1‧0=0

• Has two distinct elements 1 and 0, with 0 ≠ 1

• We have just established a two-valued Boolean algebra:


• a set of two elements
• + : OR operation; ‧ : AND operation
• a complement operator: NOT operation
• Binary logic is a two-valued Boolean algebra
• also called “switching algebra” by engineers

3.7 Basic Theorems and Properties of Boolean Algebra

• Duality
• the binary operators are interchanged; AND  OR

• the identity elements are interchanged; 1 0

I & II Introduction to Internet of Things (22ETC151/251) P a g e 16 | 45


Semester
Department of Electronics and Communication Engineering
Table 3.1 Postulates and Theorems of Boolean Algebra

Theorem 1(a): x+x = x

x+x = (x+x) •1 by postulate: 2(b)

= (x+x) (x+x') 5(a)

= x+xx' 4(b)

= x+0 5(b)

=x 2(a)

Theorem 1(b): x • x = x

x•x=xx+0 by postulate: 2(a)

= xx + xx' 5(b)

= x (x + x') 4(a)

=x•1 5(a)

=x 2(b)

Theorem 1(b) is the dual of theorem 1(a)

I & II Introduction to Internet of Things (22ETC151/251) P a g e 17 | 45


Semester
Department of Electronics and Communication Engineering
Theorem 2(a): x + 1 = 1

x + 1 = 1 • (x + 1) by postulate: 2(b)

= (x + x')(x + 1) 5(a)

= x + x' • 1 4(b)

= x + x' 2(b)

=1 5(a)

Theorem 2(b): x • 0 = 0 by duality

Theorem 3: (x')' = x

• Postulate 5 defines the complement of x, x + x' = 1 and x • x' = 0

• The complement of x' is x is also (x')'

Theorem 6(a): x + xy = x

x + xy = x • 1 + xy by postulate: 2(b)

= x (1 +y) 4(a)

=x•1 2(a)

=x 2(b)

Theorem 6(b): x (x + y) = x by duality

• By means of truth table

I & II Introduction to Internet of Things (22ETC151/251) P a g e 18 | 45


Semester
Department of Electronics and Communication Engineering
The algebraic proofs of the associative law and De Morgan’s theorem are long and will not be
shown here. However, their validity is easily shown with truth tables. For example, the truth
table for the first De Morgan’s theorem (x  y)  x y is shown below.

x y xy (x  y) x y x y


0 0 0 1 1 1 [
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0

3.7.1 Operator Precedence

The operator precedence for evaluating Boolean expressions is (1) parentheses, (2) NOT, (3)
AND, and (4) OR. In other words, the expression inside the parentheses must be evaluated
before all other operations. The next operation that holds precedence is the complement, then
follows the AND, and finally the OR. As an example, consider the truth table for De Morgan’s
theorem. The left side of the expression is (x  y). Therefore, the expression inside the
parentheses is evaluated first and the result then complemented. The right side of the expression
is x y. There- fore, the complement of x and the complement of y are both evaluated first and
the result is then ANDed. Note that in ordinary arithmetic the same precedence holds (except for
the complement) when multiplication and addition are replaced by AND and OR, respectively.

EXAMPLE 1: Using basic Boolean theorem prove:


(a) (x + y)(x + z) = x + yz
Soln: (x + y) (x + z)
=xx+xz+yx+yz since x.x = x
= x + xz + yx + yz
= x (1 + z) + yx + yz since (1 + z) = 1
= x + yx + yz
= x (1 + y) + yz since (1 + y) = 1
= x + yz (Proved)
(b) xy + xz + yz = xz + yz
Soln: xy + xz + yz
= xy(z + z) + xz(y + y) + yz(x + x) since x + x = 1
= xyz + xyz + xyz + xyz + xyz + xyz
= xyz + xyz +xyz + xyz since xyz + xyz = xyz
= xyz + xyz + xyz + xyz rearranging
= xz(y + y) + yz(x + x) since y + y = 1 and x + x = 1
= xz + yz (Proved)
I & II Introduction to Internet of Things (22ETC151/251) P a g e 19 | 45
Semester
Department of Electronics and Communication Engineering
3.7.2 Venn Diagram

A helpful illustration that may be used to visualize the relationships among the variables of a
Boolean expression is the Venn diagram. This diagram consists of a rectangle such as shown

x y

xy xy xy

xy

Figure 3.1 Venn diagram for two variables

x y

Figure 3.2 Venn diagram illustration x = xy + x

in Fig. 3.1, inside of which are drawn overlapping circles, one for each variable. Each circle is
labeled by a variable. We designate all points inside a circle as belonging to the named variable
and all points outside a circle as not belonging to the variable. Take, for example, the circle la-
beled x. If we are inside the circle, we say that x  1; when outside, we say x  0. Now, with
two overlapping circles, there are four distinct areas inside the rectangle: the area not belonging
to either x or y (x y), the area inside circle y but outside x (x y), the area inside circle x but
outside y (xy), and the area inside both circles (xy).

Venn diagrams may be used to illustrate the postulates of Boolean algebra or to show the
validity of theorems. Figure 3.2, for example, illustrates that the area belonging to xy is inside
the circle x and therefore x  xy  x. Figure 3.3 illustrates the distributive law x(y  z)  xy  xz.
In this diagram we have three overlapping circles, one for each of the variables x, y, and z. It is
possible to distinguish eight distinct areas in a three-variable Venn diagram. For this particular
example, the distributive law is demonstrated by noting that the area intersecting the circle x
with the area enclosing y or z is the same area belonging to xy or xz.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 20 | 45


Semester
Department of Electronics and Communication Engineering
3.8 Boolean Functions
A binary variable can take the value of 0 or 1. A Boolean function is an expression formed
with binary variables, the two binary operators OR and AND, the unary operator NOT,
parentheses, and equal sign. For a given value of the variables, the function can be either 0 or 1.
Consider, for example, the Boolean function:

F1  xyz

The function F1 is equal to 1 if x  1 and y  1 and z  1; otherwise F1  0, The above is an


example of a Boolean function represented as an algebraic expression. A Boolean function
may also be represented in a truth table. To represent a function in a truth table, we need a list
of the 2n combinations of l’s and 0’s of the n binary variables, and a column showing the
combinations

x x y
y

z z

X(Y + Z) XY+XZ

Figure 3.3 Venn diagram illustration of the distributive law.

Table 3.2 Truth tables for Truth tables for F1 = xyz, F2 = x + y z,

F3 = x y z + x yz + xy, and F4 = xy + x z

x y z F1 F2 F3 F4
0 0 0 0 0 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 1 1
1 0 0 0 1 1 1
1 0 1 0 1 1 1
1 1 0 1 1 0 0
1 1 1 0 1 0 0

I & II Introduction to Internet of Things (22ETC151/251) P a g e 21 | 45


Semester
Department of Electronics and Communication Engineering
for which the function is equal to 1 or 0. As shown in Table 3.2, there are eight possible distinct
combinations for assigning bits to three variables. The column labeled F1 contains either a 0 or
a 1 for each of these combinations. The table shows that the function F1 is equal to 1 only when
x  1, y  1, and z — 0. It is equal to 0 otherwise. (Note that the statement z  1 is equivalent
to saying that z  0.) Consider now the function:

F2  x  y z

F2  1 if x  1 or if y  0, while z  1. In Table 3.2, x  1 in the last four rows and yz  01 in


rows 001 and 101. The latter combination applies also for x  1. Therefore, there are five
combinations that make F2  1. As a third example, consider the function:

F3  x y z  x y z  xy

This is shown in Table 3.2 with four l’s and four 0’s. F4 is the same as F3 and is considered
below.

Any Boolean function can be represented in a truth table. The number of rows in the table is 2n,
where n is the number of binary variables in the function. The 1’s and 0’s combinations for each
row is easily obtained from the binary numbers by counting from 0 to 2n  1. For each row of
the table, there is a value for the function equal to either 1 or 0. The question now arises, Is an
algebraic expression of a given Boolean function unique? In other words, Is it possible to find
two algebraic expressions that specify the same function? The answer to this question is yes.
As a matter of fact, the manipulation of Boolean algebra is applied mostly to the problem of
finding simpler expressions for the same function. Consider, for example, the function:

F4  xy  x z

From Table 3.2, we find that F4 is the same as F3 since both have identical 1’s and 0’s for each
combination of values of the three binary variables. In general, two functions of n binary
variables are said to be equal if they have the same value for all possible 2 n combinations of
the n variables.

A Boolean function may be transformed from an algebraic expression into a logic diagram
composed of AND, OR, and NOT gates. The implementation of the four functions introduced

I & II Introduction to Internet of Things (22ETC151/251) P a g e 22 | 45


Semester
Department of Electronics and Communication Engineering
in the previous discussion is shown in Fig. 3.4. The logic diagram includes an inverter circuit
for every variable present in its complement form. (The inverter is unnecessary if the
complement of the variable is available.) There is an AND gate for each term in the expression,
and an OR gate is used to combine two or more terms. From the diagrams, it is obvious that the
implementation of F4 requires fewer gates and fewer inputs than F3. Since F4 and F3 are equal
Boolean functions, it is more economical to implement the F4 form than the F3 form. To find
simpler circuits, one must know how to manipulate Boolean functions to obtain equal and
simpler expressions. What constitutes the best form of a Boolean function depends on the
particular application. In this section, consideration is given to the criterion of equipment
minimization.

Figure 3.4 Implementation of Boolean function with gates

the previous discussion is shown in Fig. 2-4. The logic diagram includes an inverter circuit for
every variable present in its complement form. (The inverter is unnecessary if the complement
of the variable is available.) There is an AND gate for each term in the expression, and an OR

I & II Introduction to Internet of Things (22ETC151/251) P a g e 23 | 45


Semester
Department of Electronics and Communication Engineering
gate is used to combine two or more terms. From the diagrams, it is obvious that the
implementation of F4 requires fewer gates and fewer inputs than F3. Since F4 and F3 are equal
Boolean functions, it is more economical to implement the F4 form than the F3 form. To find
simpler circuits, one must know how to manipulate Boolean functions to obtain equal and
simpler expressions. What constitutes the best form of a Boolean function depends on the
particular application. In this section, consideration is given to the criterion of equipment
minimization.

3.8.1 Algebraic Manipulation

A literal is a primed or unprimed variable. When a Boolean function is implemented with logic
gates, each literal in the function designates an input to a gate, and each term is implemented
with a gate. The minimization of the number of literals and the number of terms results in a
circuit with less equipment. It is not always possible to minimize both simultaneously; usually,
further criteria must be available. At the moment, we shall narrow the minimization criterion to
literal minimization. The number of literals in a Boo- lean function can be minimized by algebraic
manipulations. Unfortunately, there are no specific rules to follow that will guarantee the final
answer. The only method available is a cut-and-try procedure employing the postulates, the
basic theorems, and any other manipulation method which becomes familiar with use. The
following examples illustrate this procedure.

EXAMPLE 3.2: Simplify the following Boolean functions to a minimum


number of literals.

1. x  x y – (x  x)(x  y)  1 • (x  y)  x  y
2. x (x  y)  xx  xy  0  xy  xy
3. x y z  x yz  xy  x z(y  y)  xy  x z  xy
4. xy  x z  yz  xy  x z  yz(x  x)
 xy  x z  xyz  x yz
 xy (1  z)  x z (1  y)
 xy  x z
5. (x  y) (x  z) (y  z)  (x  y) (x  z) by duality from function 4.

Functions 1 and 2 are the duals of each other and use dual expressions in corresponding steps.
Function 3 shows the equality of the functions F3 and F4 discussed previously. The fourth

I & II Introduction to Internet of Things (22ETC151/251) P a g e 24 | 45


Semester
Department of Electronics and Communication Engineering
illustrates the fact that an increase in the number of literals sometimes leads to a final simpler
expression. Function 5 is not minimized directly but can be derived from the dual of the steps
used to derive function 4.

3.8.2 Complement of a Function

The complement of a function F is F and is obtained from an interchange of 0’s for 1’s and l’s
for 0’s in the value of F. The complement of a function may be derived algebraically through
De Morgan’s theorem. This pair of theorems is listed in Table 3.1 for two variables. De Mor-
gan’s theorems can be extended to three or more variables. The three-variable form of the
first De Morgan’s theorem is derived below. The postulates and theorems are those listed in
Table 3.1.

(A  B  C)  (A  X) let B  C  X


 A X by theorem 5(a) (De Morgan)
 A • (B  C) substitute B  C  X
 A • (B C) by theorem 5(a) (De Morgan)
 A B C by theorem 4(b) (associative)

De Morgan’s theorems for any number of variables resemble in form the two-variable case and
can be derived by successive substitutions similar to the method used in the above derivation.
These theorems can be generalized as follows:

(A  B  C  D  …  F)  ABCD … F


(ABCD … F)  A  B  C  D  …  F

The generalized form of De Morgan’s theorem states that the complement of a function is
obtained by interchanging AND and OR operators and complementing each literal.

EXAMPLE 3.3: Find the complement of the functions F1  x yz  x y z and F2


 x(y’z’  yz). Applying De Morgan’s theorem as many times as necessary, the complements
areobtained as follows:

F1  (x yz  x y z)  (x yz)(x y z)  (x  yz)(x  y  z)

F2  [x (y z  yz)]  x  (y z  yz)  x  (y z) • (yz) 


 x  (y  z)(y  z)

I & II Introduction to Internet of Things (22ETC151/251) P a g e 25 | 45


Semester
Department of Electronics and Communication Engineering
A simpler procedure for deriving the complement of a function is to take the dual of the
function and complement each literal. This method follows from the generalized De Morgan’s
theorem. Remember that the dual of a function is obtained from the interchange of AND and
OR operators and 1’s and 0’s.

EXAMPLE 3.4: Find the complement of the functions F1 and F2 of


Example 2-3 by taking their duals and complementing each literal.

1. F1  x yz  x y z.
The dual of F1 is (x  y  z) (x  y  z).
Complement each literal: (x  y  z)(x  y  z)  F1.

2. F2 – x (y z  yz).
The dual of F2 is x  (y  z) (y  z).
Complement each literal: x  (y  z)(y  z)  F2.

3.9 Canonical and Standard Forms


3.9.1 Minterms and Maxterms

A binary variable may appear either in its normal form (x) or in its complement form (x). Now
consider two binary variables x and y combined with an AND operation. Since each variable
may appear in either form, there are four possible combinations: xy, xy, xy, and xy. Each of
these four AND terms represents one of the distinct areas in the Venn diagram of Fig. 3.1 and
is called a minterm or a standard product. In a similar manner, n variables can he combined to
form 2n minterms. The 2n different minterms may be determined by a method similar to the
one shown in Table 3.3 for three variables. The binary numbers from 0 to 2 n  1 are listed
under the n variables. Each minterm is obtained from an AND term of the n variables, with
each variable being primed if the corresponding bit of the binary number is a 0 and imprinted if
a 1. A symbol for each mineterns is also shown in the table and is of the form mj, where j
denotes the decimal equivalent of the binary number of the minterm designated.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 26 | 45


Semester
Department of Electronics and Communication Engineering
Table 3.3 Minterms and maxterms for three binary variables

In a similar fashion, n variables forming an OR term, with each variable being primed or
unprimed, provide 1, 2n possible combinations, called maxterms or standard sums. The eight
maxterms for three variables, together with their symbolic designation, are listed in Table 3.3.
n
Any 2 maxterms for n variables may be determined similarly. Each maxterm is obtained from
an OR term of the n variables, with each variable being unprimed if the corresponding bit is a 0
and primed if a 1. * Note that each maxterm is the complement of its corresponding minterm, and
vice versa.

A Boolean function may be expressed algebraically from a given truth table by forming a
minterm for each combination of the variables which produces a 1 in the function, and then tak-
ing the OR of all those terms. For example, the function f1 in Table 3.4 is determined by express-
ing the combinations 001, 100, and 111 as xyz, xyz, and xyz, respectively. Since each one of
these minterms results in f1  1, we should have:

f1  xyz  xyz  xyz = m1  m4  m7

Similarly, it may be easily verified that:

f2  xyz  xyz  xyz  xyz  m3  m5  m6  m7

These examples demonstrate an important property of Boolean algebra: Any Boolean function
can be expressed as a sum of mjnterms (by “sum” is meant the ORing of terms).

Now consider the complement of a Boolean function. It may be read from the truth table by

I & II Introduction to Internet of Things (22ETC151/251) P a g e 27 | 45


Semester
Department of Electronics and Communication Engineering
forming a minterm for each combination that produces a 0 in the function and then OR ing those
terms. The complement of f1 is read as:

f1  xyz  xyz  xyz  xyz  xyz

Table 3.4 Functions of three variables

x y z Function f1 Function f2
0 0 0 0 0
0 0 1 1 0
0 1 0 0 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 I 0 0 1
1 1 1 1 1

If we take the complement of f1, we obtain the function f1:

f1  (x  y  z)(x  y z)(x  y  z)(x  y  z)(x  y  z)


 M0M2M3M5M6

Similarly, it is possible to read the expression for f2 from the table;

f2  (x  y  z)(x  y z)(x  y  z)(x  y  z)  M0M1M2M4

These examples demonstrate a second important property of Boolean algebra: Any Boolean
function can be expressed as a product of maxterms (by “product” is meant the ANDing of
terms). The procedure for obtaining the product of maxterms directly from the truth table is as
follows. Form a maxterm for each combination of the variables which produces a 0 in the func-
tion, and then form the AND of all those maxterms. Boolean functions expressed as a sum of
minterms or product of maxterms are said to be in canonical form.

3.9.2 Sum of Minterms

It was previously stated that for n binary variables, one can obtain 2n distinct minterms. and
that any Boolean function can be expressed as a sum of minterms. The minterms whose sum
defines the Boolean function are those that give the l’s of the function in a truth table. Since the
function can be either 1 or 0 for each minterm. and since there are 2n minterms, one can
calculate the possible functions that can be formed with n variables to be 2n. It is sometimes

I & II Introduction to Internet of Things (22ETC151/251) P a g e 28 | 45


Semester
Department of Electronics and Communication Engineering
convenient to express the Boolean function in its sum-of-minterms form. If not in this form, it
can be made so by first expanding the expression into a sum of AND terms. Each term is then
inspected to see if it contains all the variables. If it misses one or more variables, it is ANDed
with an expres- sion such as x  x, where x is one of the missing variables. The following
example clarifies this procedure.

EXAMPLE 3.5: Express the Boolean function F  A  B’C in a sum of


minterms. The func- tion has three variables A, B, and C. The first term A is
missing two variables; therefore:

A  A(B  B)  AB  AB’

This is still missing one variable:

A  AB(C  C)  AB(C  C)


 ABC  ABC  ABC  ABC 

The second term BC is missing one variable:

BC  BC (A  A)  ABC  ABC

Combining all terms, we have:

F  A  BC
 ABC  ABC   ABC  ABC   ABC  ABC

But ABC appears twice, and according to theorem 1 (x  x  x), it is


possible to remove one of them. Rearranging the minterms in ascending
order, we finally obtain:

F  ABC  ABC   ABC  ABC   ABC


 m1  m4  m5  m6  m7

It is sometimes convenient to express the Boolean function, when in its sum of minterms, in the
following short notation:

F(A,B,C)  ∑ (1,4, 5,6,7)

The summation symbol ∑ stands for the ORing of terms; the numbers following it are the
minterms of the function. The letters in parentheses following F form a list of the variables in the
order taken when the minterm is converted to an AND term

I & II Introduction to Internet of Things (22ETC151/251) P a g e 29 | 45


Semester
Department of Electronics and Communication Engineering
3.9.3 Product of Maxterms

Each of the 22n functions of n binary variables can be also expressed as a product of maxterms. To
express the Boolean function as a product of maxterms, it must first be brought into a form of OR
terms. This may be done by using the distributive law x  yz  (x  y)(x  z). Then any missing
variable x in each OR term is ORed with xx. This procedure is clarified by the following example.

EXAMPLE 3.6: Express the Boolean function F  xy  xz in a product of


maxterm form. First convert the function into OR terms using the distributive
law:
F  xy  xz  (xy  x)(xy  z)
 ( x  x)(y  x)(x  z)(y  z)
 (x  y)(x  z)(y  z)

The function has three variables: x, y, and z. Each OR term is missing one
variable; therefore:
x  y  x  y  zz  (x  y  z)(x  y  z)
x  z  x  z  yy  (x  y  z)(x  y  z)
y  zy  z  xx  (x  y  z)(x  y  z)

Combining all the terms and removing those that appear more than once, we
finally obtain:
F  (x  y  z)(x  y  z)(x  y  z)(x  y  z)
 M0M2M4M5

A convenient way to express this function is as follows:


F(x,y,z)  ∏(0,2, 4, 5)

The product symbol, ∏, denotes the ANDing of maxterms; the numbers, are the maxterms of
the function.

3.9.4 Conversion between Canonical Forms

The complement of a function expressed as the sum of minterms equals the sum of minterms
missing from the original function. This is because the original function is expressed by those
minterms that make the function equal to I, while its complement is a 1 for those minterms that
the function is a 0. As an example, consider the function:

F(A,B, C)  ∑(1,4,5,6,7)

This has a complement that can be expressed as:

I & II Introduction to Internet of Things (22ETC151/251) P a g e 30 | 45


Semester
Department of Electronics and Communication Engineering
F(A, B, C)  ∑ (0, 2, 3)  m0  m2  m3
Now, if we take the complement of F by De Morgan’s theorem, we obtain F in a different form:

F  (m0  m2  m3)  m0 .m2 .m3 M0M2M3  ∏ (0, 2, 3)

The last conversion follows from the definition of minterms and maxterms as shown in Table
3.3. From the table, it is clear that the following relation holds true:

Mj  Mj

That is, the maxterm with subscript j is a complement of the minterm with the same subscript j,
and vice versa.

The last example demonstrates the conversion between a function expressed in sum of min-
terms and its equivalent in product of maxterms. A similar argument will show that the conver-
sion between the product of maxterms and the sum of minterms is similar. We now state a
general conversion procedure. To convert from one canonical form to another, interchange the
symbols
∑ and ∏ and list those numbers missing from the original form. As another example, the function:

F(x, y, z)  ∏ (0, 2, 4, 5)

is expressed in the product of maxterm form. Its conversion to sum of minterms is:

F(x, y, z)  ∑ (1,3,6,7)
Note that, in order to find the missing terms, one must realize that the total number of
minterms or maxterms is 2n, where n is the number of binary variables in the function.

3.9.5 Standard Forms

The two canonical forms of Boolean algebra are basic forms that one obtains from reading a
function from the truth table. These forms are very seldom the ones with the least number of
literals, because each minterm or maxterm must contain, by definition, all the variables either
complemented or uncomplemented.

Another way to express Boolean functions is in standard form. In this configuration, the terms
that form the function may contain one, two or any number of literals. There are two types of
standard forms: the sum of products and product of sums.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 31 | 45


Semester
Department of Electronics and Communication Engineering
The sum of products is a Boolean expression containing AND terms, called product terms, of
one or more literals each. The sum denotes the ORing of these terms. An example of a function
expressed in sum of products is:

F1  y  xy  xyz

The expression has three product terms of one, two, and three literals each, respectively. Their
sum is in effect an OR operation.

A product of sums is a Boolean expression containing OR terms, called sum terms. Each term
may have any number of literals. The product denotes the AN Ding of these terms. An ex-
ample of a function expressed in product of sums is:

F2  x(y  z)(x  y  z  w)

This expression has three sum terms of one, two, and four literals each. The product is an AND
operation. The use of the words product and sum stems from the similarity of the AND
operation to the arithmetic product (multiplication) and the similarity of the OR operation to the
arithmetic sum (addition).

A Boolean function may be expressed in a nonstandard form. For example, the function:

F3  (AB  CD)(AB  CD)

is neither in sum of products nor in product of sums. It can be changed to a standard form by
using the distributive law to remove the parentheses:

F3  ABCD  ABCD

Table 3.5 Truth tables for the 16 functions of two binary variables
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15
x y
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Operator
Symbol / /  +    

I & II Introduction to Internet of Things (22ETC151/251) P a g e 32 | 45


Semester
Department of Electronics and Communication Engineering
3.10 Other Logic Operations
When the binary operators AND and OR are placed between two variables x and y, they form
two Boolean functions x  y and x  y, respectively. It was stated previously that there are 22n
functions for n binary variables. For two variables, n  2 and the number of possible Boolean
functions is16. Therefore, the AND and OR functions are only two of a total of 16 possible
functions formed with two binary variables. It would be instructive to find the other 14
functions and investigate their properties.

The truth tables for the 16 functions formed with two binary variables x and y are listed in
Table 3.5. In this table, each of the 16 columns F0 to F15 represents a truth table of one possible
function for the two given variables x and y. Note that the functions are determined from the
16 binary combinations that can be assigned to F. Some of the functions are shown with an
operator symbol. For example, F1 represents the truth table for AND and F7 represents the truth
table for OR. The operator symbols for these functions are () and (  ), respectively.

The 16 functions listed in truth table form can be expressed algebraically by means of Boolean
expressions. This is shown in the first column of Table 3.6. The Boolean expressions listed are
simplified to their minimum number of literals.

Although each function can be expressed in terms of the Boolean operators AND, OR, and
NOT, there is no reason one cannot assign special operator symbols for expressing the other
functions. Such operator symbols are listed in the second column of Table 3.6. However, all the
new symbols shown, except for the exclusive-OR symbol , are not in common use by digital
designers. Each of the functions in Table 3.6 is listed with an accompanying name and a
comment that explains the function in some way. The 16 functions listed can be subdivided into
three categories:

1. Two functions that produce a constant 0 or 1.


2. Four functions with unary operations complement and transfer.
3. Ten functions with binary operators that define eight different operations
AND, OR, NAND, NOR, exclusive-OR, equivalence, inhibition, and
implication.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 33 | 45


Semester
Department of Electronics and Communication Engineering
Any function can be equal to a constant, but a binary function can be equal to only 1 or 0. The
complement function produces the complement of each of the binary variables. A function
which is equal to an input variable has been given the name transfer, because the variable x or y
is transferred through the gate that forms the function without changing its value. Of the eight
binary operators, two (inhibition and implication) are used by logicians but are seldom used in

Table 3.6 Boolean expressions for the 16 functions of two variables

Boolean functions Operator symbol Name Comments


F0  0 Null Binary constant 0
F1  xy xy
AND x and y
F2  xy x/y Inhibition x but not y
F3  x Transfer x
F4  xy y/x Inhibition y but not x
F5  y Transfer y
F6  xy  xy xy Exciusive-OR x or y but not both
F7  x y xy OR x or y
F8  (x  y) xy NOR Not-OR
F9  xy  xy x y Equivalence* x equals y
F10  y y Complement Not y
F11  x  y xy Implication If y then x
F12  x x Complement Not x
F13  x  y xy Implication If x then y
F14  (xy) xy NAND Not-AND
F15  1 Identity Binary constant 1
*Equivalence is also known as equality, coincidence, and exclusive-NOR.

computer logic. The AND and OR operators have been mentioned in conjunction with Boolean
algebra. The other four functions are extensively used in the design of digital systems.

The NOR function is the complement of the OR function and its name is an abbreviation of not-
OR. Similarly, NAND is the complement of AND and is an abbreviation of not-AND. The
exclusive-OR, abbreviated XOR or EOR, is similar to OR but excludes the combination of both x
and y being equal to 1. The equivalence is a function that is 1 when the two binary variables are
equal, i.e., when both are 0 or both are 1. The exclusive-OR and equivalence functions are the
complements of each other. This can be easily verified by inspecting Table 3.5. The truth table
for the exclusive-OR is F6 and for the equivalence is F9, and these two functions are the

I & II Introduction to Internet of Things (22ETC151/251) P a g e 34 | 45


Semester
Department of Electronics and Communication Engineering
complements of each other. For this reason, the equivalence function is often called exclusive-
NOR, i.e.,exclusive-OR-NOT.

Boolean algebra, as defined in Sections 3.2, has two binary operators, which we have called AND
and OR, and a unary operator, NOT (complement). From the definitions, we have deduced a
number of properties of these operators and now have defined other binary operators in terms of
them. There is nothing unique about this procedure. We could have just as well started with the
operator NOR (), for example, and later defined AND, OR, and NOT in terms of it. There are,
nevertheless, good reasons for introducing Boolean algebra in the way it has been introduced.
The concepts of “and,” “or,” and “not” are familiar and are used by people to express everyday
logical ideas. Moreover, the Huntington postulates reflect the dual nature of the algebra,
emphasizing the symmetry of  and · with respect to each other.

3.11 Digital Logic Gates


Since Boolean functions are expressed in terms of AND, OR, and NOT operations, it is easier to
implement a Boolean function with these types of gates. The possibility of constructing gates for
the other logic operations is of practical interest. Factors to be weighed when considering the
construction of other types of logic gates are (1) the feasibility and economy of producing the
gate with physical components, (2) the possibility of extending the gate to more than two inputs,
(3) the basic properties of the binary operator such as commutativity and associativity, and (4)
the ability of the gate to implement Boolean functions alone or in conjuction with other gates.

Of the 16 functions defined in Table 3.6, two are equal to a constant and four others are re- peated
twice. There are only ten functions left to be considered as candidates for logic gates. Two,
inhibition and implication, are not commutative or associative and thus are impractical to use as
standard logic gates. The other eight: complement, transfer, AND, OR, NAND, NOR, exclusive-
OR, and equivalence, are used as standard gates in digital design.

The graphic symbols and truth tables of the eight gates are shown in Fig. 3.5. Each gate has one or
two binary input variables designated by x and y and one binary output variable designated by F.
The AND, OR, and inverter circuits were defined in Fig. 3.6. The inverter circuit inverts the logic
sense of a binary variable. It produces the NOT, or complement, function. The small circle in the

I & II Introduction to Internet of Things (22ETC151/251) P a g e 35 | 45


Semester
Department of Electronics and Communication Engineering
output of the graphic symbol of an inverter designates the logic complement. The triangle symbol
by itself designates a buffer circuit. A buffer produces the transfer function but does not produce
any particular logic operation, since the binary value of the output is equal to the binary value of
the input. This circuit is used merely for power amplification of the signal and is equivalent to two
inverters connected in cascade.

The NAND function is the complement of the AND function, as indicated by a graphic symbol
which consists of an AND graphic symbol followed by a small circle. The NOR function is the
complement of the OR function and uses an OR graphic symbol followed by a small circle. The
NAND and NOR gates are extensively used as standard logic gates and are in fact far more
popular than the AND and OR gates. This is because NAND and NOR gates are easily
constructed with transistor circuits and because Boolean functions can be easily implemented
with them. The exclusive-OR gate has a graphic symbol similar to that of the OR gate, except for
the ad- ditional curved line on the input side. The equivalence, or exclusive-NOR, gate is the
complement of the exclusive-OR, as indicated by the small circle on the output side of the graphic
symbol.

3.11.1 Extension to Multiple Inputs

The gates shown in Fig. 3.5, except for the inverter and buffer, can be extended to have more than
two inputs. A gate can be extended to have multiple inputs if the binary operation it represents is
commutative and associative. The AND and OR operations, defined in Boolean algebra, possess
these two properties. For the OR function we have:

X+Y=Y+X commutative

and

(X+Y)+Z=X+(Y+Z)=X+Y+Z Associative

which indicates that the gate inputs can be interchanged and that the OR function can be
extended to three or more variables.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 36 | 45


Semester
Department of Electronics and Communication Engineering

Figure 3.5 Digital logic gates

Figure 3.6 Demonstrating the nonassciativity of the NOR operator; (x  y)  z  x(y  z)

I & II Introduction to Internet of Things (22ETC151/251) P a g e 37 | 45


Semester
Department of Electronics and Communication Engineering
The NAND and NOR functions are commutative and their gates can be extended to have more
than two inputs, provided the definition of the operation is slightly modified. The difficulty is that
the NAND and NOR operators are not associative, i.e., (x  y) z ≠ x  (y  z), as shown in Fig.
3.6 and below:

(x  y) z  [(x  y)  z]  (x  y)z  xz  yz x  (y  z)  [x 


(y  z)]  x(y  z)  xy  xz

To overcome this difficulty, we define the multiple NOR (or NAND) gate as a complemented OR (or
AND) gate. Thus, by definition, we have:

x  y  z  (x  y  z)x  y  z  (xyz)

The graphic symbols for the three-input gates are shown in Fig. 3.7. In writing cascaded NOR
and NAND operations, one must use the correct parentheses to signify the proper sequence of
the gates. To demonstrate this, consider the circuit of Fig. 3.7(c). The Boolean function for the
circuit must be written as:

F  [(ABC)(DE)]  ABC  DE

The second expression is obtained from De Morgan’s theorem. It also shows that an expression in
sum of products can be implemented with NAND gates.

Figure 3.7 Multiple-input and Cascaded NOR and NAND gate

I & II Introduction to Internet of Things (22ETC151/251) P a g e 38 | 45


Semester
Department of Electronics and Communication Engineering

Figure 3.8 Three-input exclusive-OR gate

The exclusive-OR and equivalence gates are both commutative and associative and can be
extended to more than two inputs. However, multiple-input exclusive-OR gates are uncommon
from the hardware standpoint. In fact, even a two-input function is usually constructed with other
types of gates. Moreover, the definition of these functions must be modified when extended to
more than two variables. The exclusive-OR is an odd function, i.e., it is equal to 1 if the input
variables have an odd number of 1’s. The equivalence function is an even function, i.e., it is equal
to 1 if the input variables have an even number of 0’s. The construction of a three-input exclusive-
OR function is shown in Fig. 3.8. It is normally implemented by cascading two-input gates as
shown in (a). Graphically, it can be represented with a single three-input gate as shown in (b). The
truth table in (c) clearly indicates that the output F is equal to 1 if only one input is equal to 1 or
if all three inputs are equal to 1, i.e., when the total number of 1’s in the input variables is odd.

EXAMPLE 3.7: Construct AND Gate using NOR Gate


Soln: A.B = (A.B)ˮ = (A + B) using D Morgan’s theorem
A'
A

y = (A' + B')' = A.B

B'
B

I & II Introduction to Internet of Things (22ETC151/251) P a g e 39 | 45


Semester
Department of Electronics and Communication Engineering
Combinational logic

3.12 Introduction

 Logic circuits for digital systems may be combinational or sequential.


 A combinational circuit consists of input variables, logic gates, and output variables.

Figure 3.9 Block diagram of combinational circuits

For n input variables, there are 2n possible combinations of binary input variables. For each
possible input Combination, there is one and only one possible output combination. A
combinational circuit can be described by m Boolean functions one for each output variables.
Usually the input s comes from flip-flops and outputs go to flip-flops.

3.13 Design Procedure

The design of combinational circuits starts from the verbal outline of the problem and ends in a
logic circuit diagram, or a set of Boolean functions from which the logic diagram can be easily
obtained. The procedure involves the following steps:

1. The problem is stated.


2. The number of available input variables and required output variables is determined.
3. The input and output variables are assigned lettersymbols.
4. The truth table that defines the required relationship between inputs and outputs is derived.
5. The simplified Boolean function for each output is obtained.
6. Logic diagram is drawn.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 40 | 45


Semester
Department of Electronics and Communication Engineering
A truth table for a combinational circuit consists of input columns and output columns. The 1’s
and 0’s in the input columns are obtained from the 2n binary combinations available for n input
variables. The binary values for the outputs are determined from examination of the stated
problem. An output can be equal to either 0 or 1 for every valid input combination. However, the
specifications may indicate that some input combinations will not occur. These combinations
become don’t-care conditions.

The output Boolean functions from the truth table are simplified by any available method, such
as algebraic manipulation, the map method, or the tabulation procedure. Usually there will be a
variety of simplified expressions from which to choose. However, in any particular applica tion,
certain restrictions, limitations, and criteria will serve as a guide in the process of choosing a
particular algebraic expression. A practical design method would have to consider such con-
straints as (1) minimum number of gates, (2) minimum number of inputs to a gate, (3) minimum
propagation time of the signal through the circuit, (4) minimum number of interconnections, and
(5) limitations of the driving capabilities of each gate.

3.14 Adders

Digital computers perform variety of information processing tasks, the one is arithmetic
operations. The most basic arithmetic operation is the addition of two binary digits. i.e, 4 basic
possible operations are: 0+0=0,0+1=1,1+0=1,1+1=10 The first three operations produce a sum
whose length is one digit, but when augends and addend bits are equal to 1,the binary sum
consists of two digits. The higher significant bit of this result is called a carry. A combinational
circuit that performs the addition of two bits is called a half adder. One that performs the addition
of 3 bits (two significant bits & previous carry) is called a full adder. 2 half adder can employ as
a full-adder.

3.14.1 The Half Adder

A Half Adder is a combinational circuit with two binary inputs (augends and addend bits and two
binary outputs (sum and carry bits.) It adds the two inputs (X and Y) and produces the sum (S)
and the carry (C) bits. It is an arithmetic operation of addition of two single bit words.

I & II Introduction to Internet of Things (22ETC151/251) P a g e 41 | 45


Semester
Department of Electronics and Communication Engineering
The truth table of half adder is shown below.

x y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

The Sum(S) bit and the carry (C) bit, according to the rules of binary addition, the sum (S) is the
X-OR of X and Y ( It represents the LSB of the sum). Therefore,
S= xy + xy
The carry (C) is the AND of X and Y (it is 0 unless both the inputs are 1).Therefore,
C = xy
A half-adder can be realized by using one X-OR gate and one AND gate. The logic diagram for
this implementation is shown in Fig. 3.10 (a), as are four other implementa tions for a half-adder.

Figure 3.10 Various implementations of half adder

I & II Introduction to Internet of Things (22ETC151/251) P a g e 42 | 45


Semester
Department of Electronics and Communication Engineering
Figure 3.10(a), as mentioned above, is the implementation of the half-adder in sum of products.
Figure 3.10(b) shows the implementation in product of sums:
S = (x + y) (x′ + y′)
C=xy
To obtain the implementation of Fig. 3.10(c), we note that S is the exclusive-OR of x and y. The
complement of S is the equivalence of x and y.
S′ = x y + x′y′
but C = x y, and therefore we have:
S′ = (C + x′y′)′
In Fig. 3.10(d) we use the product of sums implementation with C derived as follows:
C = x y = (x′ + y′)′
The half-adder can be implemented with an exclusive-OR and an AND gate as shown in Fig.
3.10(e). This form is used later to show that two half-adder circuits are needed to construct a full-
adder circuit.

3.14.2 The Full Adder

A full-adder is a combinational circuit that forms the arithmetic sum of three input bits. It
consists of three inputs and two outputs. Two of the input variables, denoted by x and y represent
the two significant bits to be added. The third input, z represents the carry from the previous
lower significant position. Two outputs are necessary because the arithmetic sum of three binary
digits ranges in value from 0 to 3, and binary 2 or 3 needs two digits. The two outputs are
designated by the symbols S for sum and C for carry. The binary variable S gives the value of
the least significant bit of the sum. The binary variable C gives the output carry. The truth table
of the full-adder is as follows:
x y z C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1

I & II Introduction to Internet of Things (22ETC151/251) P a g e 43 | 45


Semester
Department of Electronics and Communication Engineering
The eight rows under the input variables designate all possible combinations of 1’s and 0’s that these
variables may have. The 1’s and 0’s for the output variables are determined from the arith metic sum of the
input bits. When all input bits are O’s, the output is 0. The S output is equal to 1

Figure 3.11 Maps for full adder

when only one input is equal to 1 or when all three inputs are equal to 1. The C output has a
carryof 1 if two or three inputs are equal to 1.

The input and output bits of the combinational circuit have different interpretations at various
stages of the problem. Physically, the binary signals of the input wires are considered binary
digits added arithmetically to form a two-digit sum at the output wires. On the other hand, the
same binary values are considered variables of Boolean functions when expressed in the truth
table or when the circuit is implemented with logic gates. It is important to realize that two
different interpretations are given to the values of the bits encountered in this circuit.

The input-output logical relationship of the full-adder circuit may be expressed in two Boolean
functions, one for each output variable. Each output Boolean function requires a unique map for
its simplification. Each map must have eight squares, since each output is a function of three
input variables. The maps of Fig. 3.11 are used for simplifying the two output functions. The
1’s in the squares for the maps of S and C are determined directly from the truth table. The
squares with 1’s for the S output do not combine in adjacent squares to give a simplified
expression in sum of products. The C output can be simplified to a six-literal expression. The
logic diagram for the full-adder implemented in sum of products is shown in Fig. 3.12. This
implementation uses the following Boolean expressions:

I & II Introduction to Internet of Things (22ETC151/251) P a g e 44 | 45


Semester
Department of Electronics and Communication Engineering
S = xyz + xyz + xyz + xyz
C = xy + xz + yz

Figure 3.12 Implementation of full-adder in sum of products

Figure 3.13 Implementation of full-adder with two half-adders and an OR gate

Other configurations for a full-adder may be developed. The product-of-sums implementation


requires the same number of gates as in Fig. 3.12, with the number of AND and OR gates
interchanged. A full-adder can be implemented with two half-adders and one OR gate, as
shown in Fig. 3.13. The S output from the second half-adder is the exclusive-OR of z and the
output of the first half-adder, giving;

S= z  (x  y)
= z(x y + xy) + z(x y + xy)
= z(x y + xy) + z(x y + xy)
= x yz + xyz + x yz + xyz

and the carry output is:


C = z(x y + xy) + x y = x yz + xyz + x y

I & II Introduction to Internet of Things (22ETC151/251) P a g e 45 | 45


Semester

You might also like