0% found this document useful (0 votes)
49 views31 pages

Boolean Algebra and Digital Circuits Guide

ec bee notes

Uploaded by

ghanavigk
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)
49 views31 pages

Boolean Algebra and Digital Circuits Guide

ec bee notes

Uploaded by

ghanavigk
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

Basic Electronics (BBEE103/203)

Module – 4 Boolean Algebra and Logic Circuits

Boolean Algebra
Introduction,
Binary Numbers,
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 (Text 2: 1.2, 1.3, 1.4, 1.5,2.1,
2.2, 2.3, 2.4, 2.5, 2.6, 2.7)

Combinational logic:
Introduction,
Design procedure,
Adders- Half adder,
EASWARA
Full adder (Text 2:4.1,4.2, 4.3)
M

1
Basic Electronics (BBEE103/203)

4.1 INTRODUCTION TO DIGITAL ELECTRONICS

Digital electronics is a branch of electronics which deals with digital circuits and digital systems that they
operate in only two possible states. These states described with only two binary values (0, 1) which are
used to represent any data type including numbers, symbols, alphabetic, etc. In digital electronics every
digital device uses the signals are formed with only two voltage values (ideally, 0V and 5V).

Boolean algebra is the branch of algebra that differs from elementary algebra in the following ways:

Boolean algebra Elementary algebra


1. Variable values are binary numbers 1 and 0 1. Variable values are real numbers
2. Uses logical operators conjunction (AND), 2. Uses arithmetic operators such as addition,
disjunction (OR) and negation (NOT) multiplication, subtraction and division
3. Performs logical operations on binary variables 3. Performs numerical operations on any variables
Boolean algebra is used to analyze and simplify the digital (logic) circuits. Boolean variable is a symbol
used to represent a logical quantity. Any English alphabet can be used as Boolean variable.
Example: A, B, C, x, y, z etc,
Any single variable can have binary constants a 1 or a 0 value. Binary values used as logic 1 and 0 which
are used to denote the input and output conditions of a digital circuit. These discrete values can be achieved
by using transistor switches (logic gates). Ideally, if a digital device is in off-state means a logic 0 is used,

EASWARA
because voltage across it is equal to 0 V and if the device is in on-state means logic 1 is used, because its
full voltage is equal to 5V.

 HIGH voltage = 5V → represents logic 1.

M (HIGH = logic 1 = Closed switch = ON state of a


transistor)
 LOW voltage = 0V → represents logic 0.
(LOW = logic 0 = Open switch = OFF state of a
transistor)
Realistically, input-output acceptable voltage levels for Transistor-Transistor-Logic (TTL) devices
representing logic 0 and 1 is as shown in the fig.4.1.

Fig.4.1 input-output voltage levels for TTL gates

2
Basic Electronics (BBEE103/203)

4.2 NUMBER SYSTEMS

A number is a mathematical value used for counting, measuring objects and for performing arithmetic
operations like addition, subtraction, multiplication and division. Set of numbers (values) or digits used to
represent different quantities is known as number system. The value of any digit in a number can be
determined by the digit, the position and the base or radix of the number system.
For example, a decimal number (1947.0815)10 can be expanded using its positional weights as below

….. 103 102 101 100 · 10-1 10-2 10-3 10-4 ……


1 9 4 7 · 0 8 1 5
1x103 + 9x102 + 4x101 + 7x100 + 0x10-1 + 8x10-2 + 1x10-3 + 5x10-4
1000 + 900 + 40 +7 + 0 + 0.08 + 0.001 + 0.0005 = 1947.0815

Numbers have various categories like natural numbers, whole numbers, rational and irrational numbers,
prime and composite numbers and so on.
The natural numbers are 1, 2, 3, 4, 5, etc. There are infinitely many natural numbers. The whole numbers are
the natural numbers together with 0. That is numbers 0, 1, 2, 3, .... are called as whole numbers. The
integers are the set of real numbers consisting of the natural numbers, their additive, inverses and zero.
{..., -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5...}
Some important number systems are as follows.

1) Decimal number system –


It has a base of 10 with each position weighted by a factor of 10. The decimal number system is used in

EASWARA
general communication. It can be used to represent both the integer as well as floating point values. The
decimal point is used to separate the integer part and the fractionpart of the given real number.

2) Octal number system –


M
It has a base of 8 with each position weighted by a factor of 8. Octal number system is widely used in
computing systems such as PDP-8, ICL 1900, IBM main-frames, etc, where the systems employed 6-bit,
12-bit, 24-bit or 36-bit words.

3) Binary number system –


It has a base of 2 with each position weight by a factor of [Link] only work on the binary number
system. It can store and process each type of data interms of 0s and 1s only.

4) Hexadecimal number system –


It has a base of 16 with each position weighted by a factor of 16. However, the computers use binary
number system; so that it can store and process each type of data in terms of 0s and 1s only. The main
reason for choosing hexadecimal number system over decimal is
1) easy to convert from binary to hexadecimal and vice versa
2) it’s compact, compared to binary and decimal (less digits to write out values)
For example (1101011101011010)2 for a binary number its hexadecimal equivalent will be (D75A)16
which is more readable.
Hexadecimal number system is used in
1) assembly programming languages and in machine code
2) to describe locations in computer memory
3) to define colors on web pages

The details of these number systems are given in the table 4.1.

3
Basic Electronics (BBEE103/203)

Table-4.1
Number
Base Digits / symbols Example: with power notation
System
Decimal 10 0,1,2,3,4,5,6,7,8,9 (338.6)10 3x102+3x101+8x100. 6x10-1
Octal 8 0,1,2,3,4,5,6,7 (336.2)8 3x82+3x81+6x80. 2x8-1
Binary 2 0,1 (110.10)2 1x22+1x21+0x20. 1x2-1+0x2-2
Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F (4AB.2)16 4x162+10x161+11x160. 2x16-1

4.2.1 NUMBER BASE CONVERSIONS


Any type of number base conversions from one to another can be performed as easily as according to the
following three classifications.
1) Decimal to Non-decimal Base
2) Non-decimal to Decimal Base
3) Non-decimal to Non-decimal Base via Binary Base
Decimal to Non-decimal Base Conversion
In this conversion case given number is decimal base that can be converted to any non-decimal number
systems like, binary, octal and hexadecimal number system base. Decimal integer part and fractional part
values undergo different procedural steps as explained below.

EASWARA
M
Decimal integer part Decimal fractional part

Operation: Successive Division Operation: Successive Multiplication

1. Divide decimal integer number by the base 1. Multiply decimal fraction number by the base of
of number system to be converted. the number system to be converted.
2. Save remainder (read remainders from bottom 2. Save the whole number (integer) of the result
to top). (read remainders from top to bottom).
3. Repeat steps 1 and 2 until the quotient 3. Repeat steps 1 and 2 for the fractional part of step
becomes zero. 2 until to the desired precision.
Example-1: Decimal to Binary base ⟹ (25.625)10 ⟹ ( ? )2 ⟹ ( 11001 . 101)2
Integer part value is 25 Fractional part value is 0.625
25 ÷ 2 ⟹12 (R→ 1) 0.625 x 2 ⟹ 1.25 ⟹ 1
12 ÷ 2 ⟹ 6 (R→ 0) (25)10 ⟹ (11001)2 0.25 x 2 ⟹ 0.5 ⟹0 (0.625)10 = (0.101)2
6 ÷ 2 ⟹ 3 (R→ 0) 0.5 x 2 ⟹ 1.0 ⟹1
3 ÷ 2 ⟹ 1 (R→ 1) (save remainder (R) backward) (save whole number forward)
1÷2⟹0 (quotient becomes zero)

4
Basic Electronics (BBEE103/203)

Example-2: Decimal to octal ⟹ (175.15)10 ⟹ ( ? )8 ⟹ (257.114)8

175 ÷ 8 ⟹21 (R→ 7) 0.15 x 8 ⟹ 1.28 ⟹ 1


21 ÷ 8 ⟹ 2 (R→ 5) (175)10 ⟹ (257)8 0.28 x 8 ⟹ 1.60 ⟹ 1 (0.15)10 = (0.114)8
(save remainder (R) backward) 0.60 x 8 ⟹ 4.80 ⟹ 4 (save whole number forward)

Example-3: Decimal to Hexadecimal ⟹ (675.15)10 ⟹ ( ? )16 ⟹ (257.266)16

675÷ 16 ⟹ 42 (R→ 3) 0.15 x 16 ⟹ 2.40 ⟹ 2


42÷ 16 ⟹ 02 (R→ 10) (675)10 ⟹ (2A3)16 0.40 x 16 ⟹ 6.40 ⟹ 6 (save whole number forward)
0.40 x 16 ⟹ 6.40 ⟹ 6 (0.15)10 = (0.266)16
Non-Decimal to Decimal Base Conversion
In this conversion case given number can be any non-decimal number systems like, binary, octal or
hexadecimal number system base that can be converted to decimal number base. Conversion procedure is
same for both integer part and fractional part values. The procedure is explained below.

EASWARA
Procedure:
M
1. Obtain the power sequence (positional weights) of the number system to be determined.
2. Place the number in position : integers – left of the radix point ⟹ ( + ve powers)
fraction – right of the radix point ⟹ ( - ve powers)
3. Multiply the number with positional weights and add, to get decimal number.

Example-4: Binary to Decimal Example-5: Octal to Decimal Example-6: Hexadecimal to Decimal


Steps
(1011.01)2 ⟹ (?)10 ⟹ (11. 25)10 (1073.32)8 ⟹ (?)10 ⟹ (571. 406)10 (A2B.1D)16 ⟹ (?)10 ⟹ (2603.11252)10

power 23 22 21 20 . 2-1 2-2 83 82 81 80 . 8-1 8-2 163 162 161 160 . 16-1 16-2

weight 8 4 2 1 0.5 0.25 512 64 8 1 0.125 0.0156 4096 256 16 1 0.0625 0.0039

number 1 0 1 1 . 0 1 1 0 7 3 . 3 2 0 10 2 11 . 1 13
(8 + 0 + 2 + 1 + 0 + 0. 25) (512 + 0 + 56 + 3 + 0.375 + 0.031) (0 + 2560 + 32 + 11 + 0.0625 + 0.052)
numeric
value = (11. 25)10 = (571. 406)10 = (2603.11252)10

Non-Decimal to Non-Decimal Base Conversion


In this case, non-decimal base numbers, either octal or hexadecimal number system is converted into binary
number system. Then “grouping” of bits is conducted according to the conversion type, the grouped bits are
replaced by Binary Coded Octal (BCO) or Binary Coded Hexadecimal (BCH) as tabulated in the table 4.2.

5
Basic Electronics (BBEE103/203)

)
1
6

Octal ⟹ Binary ( )8 ⟹ ( )2 Hexadecimal ⟹ Binary


)
2

 Replace each octal digit by its 3-bit BCO  Replace each hexadecimal
equivalent (see table 4.2) both for integer digit by its 4-bit BCO
and fractional part. equivalent (see table 4.2) both
for integer
and fractional part.
Example-7: Exampl
e:8
(A2B.1D)16 ⟹ (?)2 ⟹ (

1 0 7 3 . 3 2
EASWARA
(1073.32)8 ⟹ (?)2 ⟹ ( 001000111011.011010 )2

[given octal A
001000111011.011010 )2
2 B . 1 D
number] [given hexadecimal]
001 000 111 011 . 011 010
M
[from BCO] 1010 0010 1011 . 0001 1101
[from BCH]

Table 4.2. Binary Coded Decimal (BCD), Binary Coded Octal (BCO) and Binary Coded
Hexadecimal (BCH)
Hexa
Deci Oct Binary Coded
Binary Coded Binary Coded deci
mal al Hexa-
mal
Nu
numb numb
Decimal (BCD) Octal (BCO) mb decimal (BCH)
ers ers
ers
0 00 0 0 0 0 0 0 0 00 0 0
1 00 0 1 1 0 0 1 1 00 0 1
2 00 1 0 2 0 1 0 2 00 1 0
3 00 1 1 3 0 1 1 3 00 1 1
4 01 0 0 4 1 0 0 4 01 0 0
5 01 0 1 5 1 0 1 5 01 0 1
6 01 1 0 6 1 1 0 6 01 1 0
7 01 1 1 7 1 1 1 7 01 1 1
8 10 0 0 10 0 0 1 0 0 0 8 10 0 0
9 10 0 1 11 0 0 1 0 0 1 9 10 0 1
10 0 0 0 1 00 0 0 12 0 0 1 0 1 0 A 10 1 0
11 0 0 0 1 00 0 1 13 0 0 1 0 1 1 B 10 1 1
12 0 0 0 1 00 1 0 14 0 0 1 1 0 0 C 11 0 0

6
Basic Electronics (BBEE103/203)

13 0 0 0 1 00 1 1 15 0 0 1 1 0 1 D 11 0 1
14 0 0 0 1 01 0 0 16 0 0 1 1 1 0 E 11 1 0
15 0 0 0 1 01 0 1 17 0 0 1 1 1 1 F 11 1 1
16 0 0 0 1 01 1 0 20 0 1 0 0 0 0 10 0 0 0 10000

4.3 COMPLEMENT OPERATIONS


Complements are used in digital computers in order to simply the subtraction operation and for the logical
manipulations. Binary subtraction can be done by simply adding the 2's complement of the subtrahend
(second number) to the minuend (non-complemented binary first number). 2's complement is the most
commonly used subtraction operation to represent the signed integers. In subtraction operation representing
the sign of the result (+ or -) is essential. But the digital systems normally do not use it, because more
complexity in the circuit implementation. Hence, 2’s complement system is used for representing the
signed binary numbers.

1’s Complement system

1’s complement means, replacing binary 0’s by binary 1’s and vice versa, as illustrated below.
Example: 1 0 1 1 0 1 0 0 0 1 Given binary bits
↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ Replace opposite bit
0 1 0
EASWARA
0 1 0 1 1 1 0 1’s complement binary number

There are two possible cases while subtracting using 1’s and 2’s complement system as similar to the
elementary arithmetic operation, to represent the magnitude of the result.
1.
2.
M
Subtracting smaller number from larger number and
Subtracting larger number from smaller number
Subtracting smaller number from larger number Subtracting larger number from smaller number
1. Take 1’s complement of smaller number 1. Take 1’s complement of larger number
(subtrahend) (subtrahend)
2. Add 1’s complemented value to the larger 2. Add 1’s complemented value to
number (minuend) the smallernumber (minuend)
3. Add end-around carry to LSB, if any. LSB 3. Answer is in 1’s complement, hence,
is applied to the fractional part also. re-complement the result.
4 Sum obtained is the answer. 4 Attach negative sign to the answer.

Example-13: Subtracting smaller number from larger number: (111001.10)2 - (011011.01)2

Larger (minuend) → 1 1 1 0 0 1.1 0 (57.50)10 (Unmodified) → 1 1 1 0 0 1 . 1 0


Smaller (subtrahend) - 0 1 1 0 1 1.0 1 (-27.25)10 1’s complement → +0 0 0 1 0 0 . 1 0
(+30.25)10 End carry 1 011110.00
added to LSB +1
(0 1 1 1 1 0 . 0 1)2 = (30.25)10
Example-14: Subtracting lager number from smaller number: (011011.01)2 - (111001.10)2

7
Basic Electronics (BBEE103/203)

Larger (minuend) → 0 1 1 0 1 1.0 1 (27.25)10 (Unmodified) → 0 1 1 0 1 1 . 0 1


Smaller (subtrahend) - 1 1 1 0 0 1.1 0 (-57.50)10 1’s complement → +0 0 0 1 1 0 . 0 1

(-30.25)10 Complement answer 1 0 0 0 0 1 . 1 0


Re-complement 011110.01
attach negative -(0 1 1 1 1 0 . 0 1)2 = (- 30.25)10
2’s Complement system
2’s complement means, 1’s complement system + adding binary 1 to the LSB. It is illustrated as below.
Given a binary number (10110)2 10110
1’s complement number is 01001
01001
+1
2’s complement number is 01010
Subtracting smaller number from larger number Subtracting larger number from smaller number
1. Take 2’s complement of smaller number 1. Take 2’s complement of larger number
(subtrahend) (subtrahend)
2. Add 2’s complemented value to the larger 2. Add 2’s complemented value to the smaller
number (minuend) number (minuend)
3. Discard end-around carry, if any. 3. Answer is in 2’s complement, hence, re-
4. Sum obtained is the answer. EASWARA complement the result.
4 Attach negative sign to the answer.

M
Example 15: Subtracting smaller number from larger number: (111001.10)2 - (011011.01)2

Larger (minuend) → 1 1 1 0 0 1.1 0 (57.50)10 (Unmodified) → 111001.10


Smaller (subtrahend) - 0 1 1 0 1 1.0 1 (-27.25)10 2’s complement → 1 0 0 1 0 0 . 1 1
(+30.25)10 011110.01
(0 1 1 1 1 0 . 0 1)2 = (30.25)10
Example 16: Subtracting lager number from smaller number: (011011)2 - (111001)2
Smaller (minuend)→ 0 1 1 0 1 1.0 1 (27.25)10 (Unmodified) → 0 1 1 0 1 1 . 0 1
Larger (subtrahend) - 1 1 1 0 0 1.1 0 (-57.50)10 2’s complement → 0 0 0 1 1 0 . 1 0
(- 30.25)10 complement result 1 0 0 0 0 1 . 1 1
re-complement → 0 1 1 1 1 0 . 0 1 (= 1’s +1)
attach negative (- 0 1 1 1 1 0 . 0 1)2 = (-30.25)10

9’s and 10’s Complement system

The 9's complement is used to find the subtraction of the decimal numbers. The 9's complement of a
number is obtained by subtracting each digit of the number by 9.
For example, given a decimal number (1423)10, then its 9's complement number is
9999
-1423

8
Basic Electronics (BBEE103/203)

8 5 7 6 (9’s complement)
The 10's complement is also used to find the subtraction of the decimal numbers. The 10's complement of a
number is obtained by subtracting each digit by 9 and then adding 1 to the result as shown below.
For example, given a decimal number (1423)10, then its 9's complement number is
9999
-1423
8576
+ 1
8 5 7 7 (10’s complement)
For example,
9’s complement subtraction: (752.3 – 325.5)10 = 10’s complement subtraction: (752.3 – 325.5)10 = 426.8
426.8 752.3 → → → → 752.3
752.3 → → 752.3 999.9 – 325.5 = + 674.4 674.5 (10’s complement)
999.9 – 325.5 = + 674.4 +1 1,426.8 neglecting the carry
1,426.7
426.8 426.8
+1
4.4 BOOLEAN ALGEBRA
Boolean algebra is a mathematical system for the manipulation of variables that can be used to analyze and
simplify the digital circuits whose outcome would be either 0 or1, since it uses only binary numbers (0,1). A
binary operator that will operates on two operands and manipulates them to return a result. Therefore, a
binary operator is a rule for combining two elements to produce another element.

Axiom: A EASWARA
set is a collection of objects with a common property. If S is a set and x is a member of the set S,
then x ∈ S. Let A = {1, 2, 3, 4} denotes the set A, whose elements are 1, 2, 3, 4.

M
Axioms are assumption that is valid without proof. So that axioms are the sets of logical expressions that
can accept as true and upon which a set of useful theorems can build. An axiom is nothing more than the
definition of three basic logic operations (AND, OR, and NOT). A number of rules can be derived from
basic logical AND, OR and NOT relations called as basic Boolean postulates.

Examples of axioms
Closure: A set S is closed with respect to a binary operator •, if and only if, for all x, y ∈ S, (x • y) ∈ S
Z+ = {1, 2, 3, …} is closed to addition, all positive numbers are in Z+
Associative law: A binary operator • defined on a set S is associative, iff, for all x, y, z ∈ S
(x • y) • z = x • (y • z)
Identity Element: A set S has an identity element e , iff, for every x ∈ S
For example, x + 0 = 0 + x = x
e • x = x • e = x (for example, x + 0 = 0 + x = x)
Commutative law: A binary operator • is commutative, iff, for all x, y ∈ S
x•y=y•x
Inverse Element: A set S has an inverse, iff, for every x ∈ S, there exists an element y ∈ S such that
x•y=e
Distributive law: If • and * are two binary operators on a set S, * is said to be distributive over • if, for all x,
y, z ∈ S
x • (y * z) = (x * y) • (x * z)
Axiomatic definition of Boolean algebra

9
Basic Electronics (BBEE103/203)

Boolean algebra is a set of elements B with two binary operators (+) and (∙), which satisfies the following
six axioms or postulates:
Axiom 1 (Closure):
(a) B is closed with respect to the operator (+);
(b) B is also closed with respect to the operator ( ∙ )
Axiom 2 (Identity):
(a) B has an identity element with respect to (+), designated by 0;
for example: x + 0 = 0 + x = x
(b) B has an identity element with respect ( ∙ ) , designated by 1;
for example: x∙1 =1∙ x = x
Axiom 3 (Commutative):
(a) B is commutative with respect to (+);
For example, x + y = y + x
(b) B is commutative with respect to ( ∙ )
For example, x ∙ y = y ∙ x

Axiom 4 (Distributive):
(a) The operator ∙ is distributive over (+);
x · (y + z) = (x · y) + (x · z)
(b) The operator + is distributive over ( ∙ )

EASWARA
x + (y · z) = (x + y)(x + z)
Axiom 5 (Complement Element):
For every x ∈ B, there exists an element x′ ∈ B such that
(a) x + x′ = 1 and
(b) x ∙ x′ = 0 M
The second element x′, is called the complement of x
Axiom 6 (Cardinality):
There are at least two elements x, y ∈ B such that x ≠ y
4.4.1 Two-valued Boolean algebra Properties (Laws)
Two-valued Boolean algebra (duality) satisfies Huntington axioms.
Duality: Every Boolean law has two forms: AND form and OR form as shown in the following table 4.3.
These are obtained by changing every AND (·) to OR (+), every OR (+) to AND (·) and all 1’s to 0’s and
vice- versa. This is known as duality.
Example: If X + 1 = 1 then X ∙ 0 = 0 by the duality principle.
Table-4.3
AND Relation (∙) OR Relation (+)
x · y = f1 x + y = f2
0·0=0 0+0=0
1·0=0 1+0=1
0·1=0 0+1=1
1·1=1 1+1=1
1·1·1=1 1+1+1=1

Axiom 1 (Closure Property):

10
Basic Electronics (BBEE103/203)

Let binary value (0, 1) ∈ set B. From table-4.3, when AND operation is applied to x and y binary variables,
the output variable f1 produce the result of either 0 or 1. This operation is said to have closure. Similarly,
when OR operation is applied to x and y binary variables, the output variable f2 produce the result of either
0 or 1, then this operation is said to have closure. Because, the result of f1 or f2 is binary (0, 1) ∈ set B.
Axiom 2 (Identity Element):
The identity elements are 0 for the operator + and 1 for the operator (∙). From the table-4.3
we see that:
0+0=0
0 + 1 = 1 for the OR operator (+) the element 0 does not change the value, hence 0 is an identity of OR
1+0=1
1 ∙ 1 = 1 for the AND operator (·) the element 1 does not change the value, hence 1 is an identity of
AND
Axiom 3 (Commutative Property):
Binary operator ( ∙ ) and (+) are commutative on set B. That means, the commutative laws follow from the
symmetry of the AND/OR operators as shown in the table-4.4.
Table 4.4
AND form (x · y = y · x) OR form (x + y = y + x)
xy
x·y= y·x= x+y= y+x=
00 0·0=0 0·0=0 0+0=0 0+0=0
01
10
0·1=0
1·0=0 EASWARA
1·0=0
0·1=0
0+1=1
1+0=1
1+0=1
0+1=1
11 1·1=1 1·1=1 1+1=1 1+1=1

M
From the table-4.4, left hand and right hand terms of both AND form and OR form are verified.

Axiom 4 (Distributive Property):


The distributive law of operator (∙) over (+) and vice versa can be demonstrated by checking both sides of
the equation as in the table-4.5.
Table 4.5
LHS = x· (y + z) RHS = x·y+x·z
xyz x·y+x·z
(y + z) x· (y + z) x·y x·z
000 0 0 0 0 0
001 1 0 0 0 0
010 1 0 0 0 0
011 1 0 0 0 0
100 0 0 0 0 0
101 1 1 0 1 1
110 1 1 1 0 1
111 1 1 1 1 1

From the table-4.5, left hand and right hand terms of both AND form and OR form are verified.
Axiom 5 (Complement):
Binary 0 and 1 are complements of each other, since 0 + 0′ = 0 + 1 = 1 and 1 + 1′ = 1 + 0 = 1; furthermore,
0 ∙ 0′ = 0 ∙ 1 = 0 and 1 ∙ 1′ = 1 ∙ 0 = 0.

11
Basic Electronics (BBEE103/203)

Axiom 6 (Cardinality):
The cardinality axiom is satisfied, since this two-valued Boolean algebra has two distinct elements, 1 and
0, and 1 ≠ 0.
4.4.2 DEMORGAN’S THEOREMS
Theorem-1 Theorem-2
The compliment of the product of variables is equal The compliment of the sum of variables is equal to
to the sum of the compliment of each variable. the product of the compliment of each variable.
(x · y)' = x'+ y' (x + y)' = x'· y'
Proof: Proof:
x y x·y (x· y)' x' y' x'+y' x y x+y (x+y)' x' y' x'· y'
0 0 0 1 1 1 1 0 0 0 1 1 1 1
0 1 0 1 1 0 1 0 1 1 0 1 0 0
1 0 0 1 0 1 1 1 0 1 0 0 1 0
1 1 1 0 0 0 0 1 1 1 0 0 0 0

Verification of De-Morgan’s theorems using Basic logic gates

AND+NOT = NAND
EASWARA BUBBLED OR
(x · y)' = x'+ y'

OR+NOT = NOR BUBBLED AND


(x + y)' = x'· y'

4.5 BOOLEAN ALGEBRAIC OPERATIONS

Boolean Function: It is a logical outcome (result) represented by a single variable in the left hand side of a
Boolean expression. For a given combination of values of the variables, the Boolean function can be either
1 or 0. It can be transformed from an algebraic expression into a logic diagram composed of different gates.

Boolean Expression: A Boolean expression consists of Boolean constants (1 and 0), logical operation
symbols (· and +) and binary variables. Each Boolean expression represents a Boolean function.

Example: F(A, B, C) = A · B +A’· C


Boolean Function Boolean Expression

12
Basic Electronics (BBEE103/203)

There are many Boolean laws and theorems that can be used to simplify Boolean expressions so as to
optimize calculations as well as improve the working and simplifying digital circuits. The operator
precedence for evaluating Boolean expression:
1. Parentheses
2. NOT
3. AND
4. OR

Example: Evaluate expression F = (x + x· y)′ + x, for x = 1 and y = 0:

F = (1 + 1∙ 0)′ + 1 within parentheses


= (1 + 0)′ + 1 AND operation (0·1= 0) within parentheses
= (1)′ + 1 OR operation (1+0 = 1) within parentheses
=0+1 NOT operation (1′= 0) within parentheses followed by OR operation (0+1
F=1 =1).

Theorems of Boolean Algebra

Theorem OR (+) form AND (∙) form


1. Idempotency x+x=x x∙x=x
2. Null law EASWARA
x+1=1 x∙0=0
3. Absorption y∙x+x=x (y + x)· x = x
4. Involution
5. Associativity
M
(x′)′ = x
(x + y) + z = x + (y + z) x(y ∙ z) = (x ∙ y)z
6. De Morgan’s Law (x + y)′ = x′ ∙ y′ (x ∙ y)′ = x′ + y′
7. Distributivity x · (y + z) = (x · y) + (x · z) x + (y · z) = (x + y)(x + z)
8. Absorption x + x′∙ y = x + y x (x′+ y) = x ∙ y

Simplify the following Boolean Expressions


Example:1 A + AB = A Example: 6 A + A'B = A + B
A + AB = A( 1 + B) Factoring (distributive law) LHS = (A + AB) + A'B
=A.l (1 + B) = 1 i.e, A can be treat as A = A +
=A A.1=A AB
= A + AB + A'B
Example: 2 F=AB+ BC + B′C =A +B (A +A') A +A' = 1
Solution. F = AB + BC + B′C = (A + B)·1
= AB + C(B + B′) =A+B drop the 1
= AB + C
Example: 3 Show that (A + B)(A + C) = A + BC Example: 7 F = A.B + A.B’ +
= (A + B)(A + C) B.C
= AA + AC + AB + BC = A. (B + B’) + B.C
= A.1 + B.C

13
Basic Electronics (BBEE103/203)

= A +AC+AB + BC = A + B.C
= A +AB +AC+BC = A(1 +B) +AC+BC
= A + AC + BC Example: 8 F = A + A′B.
= A(1 + C) + BC Given, F = A+ A′B
= A + BC = (A + A′) (A + B)
=A+B
Example: 4 F= A′B′C + A′BC + AB′
Example: 9
Given, F = A′B′C + A′BC + AB′
F= AB + A(B + C) + B(B + C)
= A′C (B′+B) + AB′
= AB + AB + AC + BB + BC
= A′C + AB′
= AB + AB + AC + B + BC
Example: 5 F = AB + (AC)′ + AB′C(AB + C). = AB + AC + B + BC
Given, F = AB + (AC)′ + AB′C(AB + C) = AB + AC + B
= AB + A′ + C′+ AB′[Link] + AB′C.C = B+AC
= AB + A′ + C′ + 0 + AB′C (B.B′ = 0 and C.C = C)
= ABC + ABC′ + A′ + C′ + AB′C (AB = AB(C + C′)= ABC + ABC′)
= AC(B + B′) + C′(AB + 1) + A′
= AC + C′+A′ (B + B′ = 1 and AB + 1 = 1)
= AC + (AC)′ = 1
4.6 CANONICAL AND STANDARD FORMS
Variables are the different symbols in a Boolean expression. They may take on the binary value 0 or 1.

EASWARA
Each occurrence of a variable or its complement is called a literal.
Example: F = x + y · x + y'
In the above Boolean function F, two variable (x and y) and four literals can be found. A term is formed by

M
literals. Say for the above expression x, yx and y’are the three terms.
Sum of Products (SOP)
A sum-of-products (SOP) expression contains the sum of different terms, with each term being either a
single literal or a product of more than one literal. It can be obtained directly from the truth table by
considering each terms produce a logic 1 at the output. Sum of products expression is also known as a min-
term expression. Boolean min-terms, max-terms and its designation is shown in table-4.6.
Table-4.6
min-terms max-terms
xyz
terms designation terms designation
000 x' y' z' m0 x + y+ z M0
001 x' y' z m1 x + y+ z' M1
010 x' y z' m2 x + y'+ z M2
011 x' y z m3 x + y'+ z' M3
100 x y' z' m4 x' + y+ z M4
101 x y' z m5 x' + y+ z' M5
110 x y z' m6 x' + y'+ z M6
111 xyz m7 x' + y'+ z' M7

Example: F = x' y' z + x y' z'+ x y z', is an SOP expression containing three min-terms (m1, m3, m6).
Products of Sum (POS)

14
Basic Electronics (BBEE103/203)

A product of sums (POS) expression contains the product of different terms, with each term being either a
single literal or a sum of more than one literal. It can be obtained directly from the truth table by
considering each terms produce a logic 0 at the output. Product of sum expression is also known as a max-
term expression.
Example: F = (x + y'+ z)(x' + y+ z')(x' +y' +z'), is a POS expression containing 3 maxterms (M2, M5, M7)
Standard form
For example, F(A,B,C) = A’B’C’ + A B’C’ + A B C, is a Boolean function of three variables expressed in
canonical form. This function after simplification reduces to F = B’C’+ A B C and loses its canonical form so
that it retains in standard form. That means, when a Boolean function is expressed as the sum of all the
min-terms from the rows of a truth table, for which the output is 1, it is referred to as the canonical SOP.
On the other hand, when a Boolean function is expressed as the product of all the max-terms from the
rows of a truth table, for which the output is 0, it is referred to as the canonical POS.
The examples, like Y = AB + BC + AC
or Y = (A + B + C) (A + B′ + C) (A + B + C′) are the standard forms.
However, Boolean functions are also sometimes expressed in non-standard forms like
F = (AB + CD) (A′B′ + C′D′),
which is neither a sum of products form nor a product of sums form. However, the same expression can be
converted to a standard form with help of various Boolean properties, as:
F = (AB + CD) (A′B′ + C′D′) = A′B′CD + ABC′D′ F is now in SOP standard form.
Canonical sum of min-terms
EASWARA
For example, if the canonical SOP form of a three-variable logic function F has the min-terms A′BC,
AB′C, and ABC′ (extracted directly from the output of truth table having logic 1) this can be expressed

F (A, B, C) = (3, 5, 6)
= m 3 + m5 + m 6
M
as the sum of the decimal codes corresponding to these min-terms as:

= A′BC + AB′C + ABC’

Steps to convert Canonical to standard form


1) Identify the total number of variables in the given Boolean function
2) Find the missing literals of each term
3) Introduce identity elements (Boolean postulates) in place of missing literals.

Example: 11– Express the Boolean canonical function F = A + B'C as standard sum of min-terms.
Solution – step1: Total number of variables: 3
Step2: Missing literals: BC in first term and A in the second term
Step3: To fill B in the first term: A = A(B + B') = AB + AB' since, B + B' = 1
To fill C in the first term, A = AB(C + C') + AB'(C + C') since, C + C' = 1
= ABC + ABC'+ AB'C + AB'C' …..… (1)
The second term B'C is missing variable A; hence,
B'C = B'C (A + A') since, A + A' = 1
= AB'C + A'B'C …… (2)
Combining equations (1) and (2), we have
F = A + B'C = ABC + ABC' + AB'C + AB'C' + AB'C + A'B'C ……..(3)
In equation (3), AB'C appears twice and we know that (x + x = x).

15
Basic Electronics (BBEE103/203)

Rearranging the min-terms in ascending order, finally function, F is


F = A'B'C + AB'C' + AB'C + ABC' + ABC
= m1 + m4 + m5 + m6 + m7
SOP is represented as F(x, y, z) = ∑(1, 4, 5, 6, 7)

Canonical product of max-terms


For example, if the canonical POS form of a three-variable logic function F has the max-terms A + B +
C, A + B′ + C, and A′ + B + C′, (extracted directly from the output of truth table having logic 0) this can
be expressed as the product of the decimal codes corresponding to these max-terms as:
F (A,B,C) = Π (0, 2, 5)
= M0 · M2 · M5
= (A + B + C) (A + B′ + C) (A′ + B + C′)
Example:12- Obtain the canonical product of the sum form of the following function.
F (A, B, C) = (A + B′) (B + C) (A + C′)

Solution- In the above three-variable POS function, C is missing from the first term, A is
missing from the second term, and B is missing from the third term. Therefore, CC′, AA′
and BB′ is to be added with the respective terms, is as shown below.

F (A, B, C) = (A + B′) (B + C) (A + C′)

EASWARA
= (A + B′ + 0) (B + C + 0) (A + C′ + 0)
= (A + B′ + CC′) (B + C + AA′) (A + C′ + BB′)
since, AA’= BB’= CC’= 0

= (A + B′ + C) (A + B′ + C′) (A + B + C) (A′ + B + C) (A + B + C′) (A + B′ + C′)


Using the distributive property, as
M x + yz = (x + y) (x + z)
= (A + B′ + C) (A + B′ + C′) (A + B + C) (A′ + B + C) (A + B + C′)
Repeated terms (A + B′ + C′) (A + B′ + C′) = A + B′ + C′
Hence the canonical product of the sum expression for the given function after
arranging is
F (A, B, C) = (A + B + C) (A + B + C′) (A + B′ + C) (A + B′ + C′) (A′ + B + C)

F (A,B,C) = Π (0, 1, 2, 3, 4)
= M0 · M1 · M2 · M3 · M4

Example :13– Express the Boolean function F = xy + x'z as a product of max-terms

Solution – Converting given function into OR terms using distributive law


F = xy + x’z
= (xy + x’) (xy + z)
= (x + x’) (y + x’) (x + z) (y + z) since, x + x’=1
= (x’ + y) (x + z) (y + z) each OR term is missing one variable
x’ + y = x’ + y + zz’ = (x’+ y + z) (x’ + y + z’) since, zz’= yy’=x x’=0
x + z = x + z + yy’ = (x + y + z) (x + y’ + z)
y + z = y + z + xx’ = (x + y + z) (x’ + y + z) dropping repeated terms

16
Basic Electronics (BBEE103/203)

F = (x + y + z) (x + y’ + z) (x’ + y + z) (x’ + y + z’)


= M0 · M2 · M4 · M5
POS is represented as F(x, y, z) = Π (0, 2, 4, 5)

Example:14 – Convert Boolean expression in standard form F= y’ + xz’ + xyz

Solution – F = (x+x’)y'(z+z’) + x(y+y’)z’ + xyz


= xy’z + xy’z’ + x’y’z + x’y’z’+ xyz’ + xy’z’ + xyz
Arranging in order F = x’y’z’+ x’y’z + xy’z’+ xy’z + xyz’+ xyz
= m0 + m1 + m3 + m5 + m6 + m7
SOP is represented as F(x, y, z) = ∑(0, 1, 3, 5, 6, 7)

4.6.1 CONVERSION BETWEEN CANONICAL FORMS

i) Conversion of min-terms form to max-terms form


To convert the min-terms form into max-terms form, first change Σ to Π and then write the numeric
indexes of missing variables of the given Boolean function.

Example:15- Convert the SOP function F (A, B, C) = ∑ (0, 2, 3, 5, 7) into POS function.

EASWARA
Solution- F (A, B, C) = ∑ (0, 2, 3, 5, 7) = A’ B’ C’ + A B’ C’ + A B’ C + ABC’ + ABC

Step 1: changing the operational sign to Π


M
Step 2: writing the missing indexes of the terms, ∑ (1, 4, 6) = 001, 100 and 110

Now write the sum form for these terms


001 = (A + B + C)
100 = (A + B’ + C’)
110 = (A + B’ + C’)
Writing down the new equation in the form of POS form,
F (A, B, C) = Π (1, 4, 6) = (A + B + C) (A + B’ + C’) (A + B’ + C’)
= M1 · M4 · M6
ii) Conversion of POS form to SOP form
To convert the POS form into SOP form, first we should change the Π to Σ and then write the numeric
indexes of missing variables of the given Boolean function.
Example:16- Convert the POS function F (A, B, C) = Π (2, 3, 5) into SOP function.

Solution- F (A, B, C) = Π (2, 3, 5)


= A B’ C’ + A B’ C + ABC’ is written in SOP form by
Step 1: changing the operational sign to Σ
Step 2: writing the missing indexes of the terms, Π (0, 1, 4, 6, 7) = 000, 001, 100, 110, and 111
Now write the product form for these noted terms.
000 = A’B’C’
001 = A’B’C

17
Basic Electronics (BBEE103/203)

100 = AB’C’
110 = AB C’
111 = AB C
Writing down the new equation in the form of SOP form,
F(A, B, C) = Σ (0, 1, 4, 6, 7)
= A’B’C’ + A’B’C + AB’C’ + ABC’ + ABC
= m0 + m1 + m4 + m6 + m7

4.7 LOGIC GATES

Logic gate is a basic building block of digital circuit designed to produce the basic logic functions, AND,
OR, NOT. Logic gates are primarily implemented using diodes or transistors acting as electronic switches,
having one or more than one input and only one output. In a circuit, logic gates will make decisions based
on a combination of digital signals coming from its inputs. Inputs of any gate are driven by voltage levels
0V and 5V representing logic 0 and logic 1, respectively. Logic systems consist of gates and flip-flops.
Flip-flops are memory devices capable of storing logic values (0 or 1).
A logic gate can be thought of like a two mode switch, wherein one position the output is off – logic 0, and
in another, it is on – logic 1. Logic gates are commonly used in integrated circuits.

Buffers

EASWARA
 Buffers do not affect the logical state of a digital signal. A
logic 1 input results in a logic 1 output whereas a logic 0
input results in a logic 0 output. Buffers are used to

Inverters M
provide extra current drive at the output.

 Inverters are used to complement the logical state.


Boolean function : F = x

 A logic 1 input results in a logic 0 output and vice versa.


The Boolean function F, of an inverter with an input, x, is:
F = x'
AND gates
 AND gates will only produce a logic 1, if both inputs are
logic 1, Otherwise output is logic 0.
The Boolean expression for the output, F = x ∙ y

OR gates
 OR gates will produce a logic 0 if both inputs are LOW,
Otherwise output is logic 1.
 The Boolean expression for the output, F = x + y

NAND gates

18
Basic Electronics (BBEE103/203)

 NAND (NOT-AND) gates will produce a logic 0 output,


only if all inputs are at logic 1. Otherwise, it produces logic
1 output. The circle shown at the output denotes inversion.
The Boolean expression for the output: F = x· y

NOR gates
 NOR (NOT-OR) gates will produce a logic 1 output, only
if all inputs are at logic 0. Otherwise, it produces a logic 0
output. The Boolean expression for the output,
F = (x + y)'

Exclusive OR Gates
 EX-OR gates will produce output logic 1, if both inputs are
different. Otherwise, output is logic 0, if both inputs are
same. The Boolean expression for the output
F = x’· y +x · y’

Exclusive NOR Gates

EASWARA
EX-NOR gates will produce output logic 1, if both inputs
are same. Otherwise, output is logic 0, if both inputs are
different.
 The Boolean expression for the output
F = x’· y’ +x · y
M
4.8 IMPLEMENTATION OF BOOLEAN FUNCTION WITH LOGIC GATES
Any Boolean function can be implemented by using basic logic gates by properly interconnecting them.
The simplest way to convert a given Boolean expression into a logical circuit is to start from the output of
the Boolean expression and reach towards the input.
Example:17- Implement a logic circuit for the Boolean function F= (BC)’ + A + (A+C)’
Solution: Step-1: Given Boolean function
F is the summation of three terms (BC)’,
A and (A+C)’, thus a 3-input OR gate
need to be used as shown in the fig.4.2.
Fig.4.2
Step-2: Note down (BC)’ and (A + C)’
are complemented terms, hence two
NOT gates are used by inverting the
input BC and (A + C), as shown in the Fig.4.3
fig.4.3.
Step-3: BC will be output of 2-input AND gate, (A + C) will be output of 2-input OR gate and A
will be a direct input as shown in the fig.4.4.

19
Basic Electronics (BBEE103/203)

Fig.4.4

Example:18- Implement a logic circuit for the Boolean function F= ABC +A(B’+C’)

Solution: See fig 4.5.

EASWARA Fig.4.5

4.9 DATA REPRESENTATION, DATA TYPES AND DATA STORAGE

Data
M
refers to the symbols that represent people, events, things and ideas. Data can be a text, a name, a
number, the colors in a photograph, or the notes in a musical composition. Data Representation refers to the
form in which data is stored, processed and transmitted using digital devices. Devices such as smart phones
and computers store data in binary bit formats that can be handled by digital circuitry.
The decimal number system is used in general communication. Computers use binary number system (base
2); they can store and process the data in terms of 0s and 1s only. Binary numbers particularly large group
of bits are not very convenient to handle. To make numbers easier to handle, we often convert binary
numbers to hexadecimal (base 16).
Nibble: group of four bits (or single hexadecimal character) Ex: 1001, 1101, etc…
Byte: group of eight bits (Represented by 2 hexadecimal characters). Ex: 11101011, 01101100, etc…
Word: A group of 16 bits can be represented by four hex characters, 32 bits (a double word by eight hex
characters, and so on).
Table 4.6: Data types

Data type Bits Range of Values Binary representation

Unsigned byte 8 0 to 255 0000 0000 - 1111 1111

Signed byte 8 -128 to + 127 1000 0000 - 0111 1111

Unsigned word 16 0 to 65,535 0000 0000 0000 0000 - 1111 1111 1111 1111

Signed word 16 - 32,768 to +32,767 1000 0000 0000 0000 - 0111 1111 1111 1111

20
Basic Electronics (BBEE103/203)

Data types: A byte of data can be stored at each address within the total memory space of microprocessor
systems. Different data types are listed in table 4.6.
Hence one byte can be stored (216 = 65,536) at each of the 65,536 memory locations within microprocessor
systems having a 16-bit address bus. Individual bits within a byte are numbered from 0 (least significant bit
- LSB) to 7 (most significant bit - MSB). In the case of 16-bit words, the bits are numbered from 0-LSB to
15-MSB. The value of a byte expressed in binary can be easily converted to hex by arranging the bits in
groups of four.
Negative (or signed) numbers can be represented using 2’s complement notation where the leading (MSB)
bit indicates the sign of the number (1 = negative, 0 = positive).
For example, the signed 8-bit number “10000001” represents the decimal number “1”.

Data storage: When expressing the amount of data storage provided by a memory device, usually use
Kilobytes (Kbyte = KB). It is important to note that a Kilobyte of memory is actually 1,024 bytes (not
1,000 bytes). The reason for choosing is that 1,024 happen to be the nearest power of 2 (note that 2 10 =
1,024).
Computer memory is of two basic types – Primary memory (RAM and ROM) and Secondary memory
(hard drive, CD, etc). The capacity of ROM is usually specified in terms of an address range and the data
stored at each address.
For example, 1 K X 8 bits (capacity 1 KB = 210 = 1024), 1MB = 220
2 K X 8 bits (capacity 2 KB = 211 = 2048),
EASWARA
4 K X 8 bits (capacity 4 KB = 212 = 4096) and so on.
Difference between RAM and ROM is given in the below table-4.7.
1GB = 230

Table-4.7

Sl.
No.
Utility
M
RAM ROM

1 Definition Random Access Memory Read Only Memory.


Data RAM data is volatile. Data is present till ROM data is permanent. Data remains
2
Retention power supply is present. even after power supply is not present.
RAM data can be read, erased or
3 Data access ROM data is read only.
modified.
RAM is used to store data that CPU ROM is used to store data that is needed
4 Usage
needs for current instruction processing. to bootstrap the computer.
5 Speed Fast. Slower than RAM.
CPU Data to be copied from ROM to RAM so
6 CPU can access data stored on RAM.
Access that CPU can access its data.
RAM memory is large and high ROM is generally small and of low
7 Capacity
capacity. capacity
RAM is used as CPU Cache, Primary ROM is used as firmware by
8 Usage
Memory. microcontrollers (secondary memory).

4.10 COMBINATIONAL LOGIC CIRCUITS

21
Basic Electronics (BBEE103/203)

A combinational circuit is the digital logic circuit in which the output depends on the combination of inputs
at that point of time. The digital logic gate is the building block of combinational circuits. The function
implemented by combinational circuit is depending upon the type of Boolean function. On the other hand,
sequential logic circuits consist of both logic gates and memory elements such as flip-flops. The
combinational circuit having n input variables, logic circuit and m output variables as shown in the fig.4.6.

Fig. 4.6 Block diagram of combinational circuit

Logic gates receive external n input signals and process to produce the required m outputs. For n inputs
there are 2n possible combinations of binary input values. For each possible input combination, there is one
and only one possible output combination. Each output function is expressed in terms of the n input variables.
By using a standard range of logic levels (i.e. voltage levels used to represent the logic 1 and logic 0 states)
logic circuits can be combined in order to solve complex logic functions.

4.10.1 DESIGN PROCEDURE

EASWARA
Analysis and design of any type of combinational circuit depends on the output defined by the logic state
(0 or 1) and it is further depends only on the present input binary states. The following are the basic steps
to design a combinational circuit.

1.
2.
M
Understand the problem statement (realize how the output of the circuit depend on the inputs)
For the number of available input variables and required output variables is determined.
3. Assign letter symbols to the inputs and the outputs. (say, A, B, C inputs and S and C as outputs)
4. Get the relationship between input and output from the truth table.
5. Simplify the Boolean expression to minimize the number of logic gates.
6. Draw the logic diagram using gates.

4.10.2 ADDERS

The most basic operation in digital computer and other types of processors is binary addition. Binary
addition is used to calculate addresses, addition, multiplication, bit-shifting operations and table indices in
the ALU.
Adders are classified into two types:
(1) Half Adder and (2) Full Adder

HALF ADDER

The half adder circuit is a digital circuit capable of adding only two binary bits at a time and produces carry
and sum. This process follows the binary addition rules.
Design procedure:
1) Problem statement: Half adder circuit adds two binary inputs and produces two outputs by following
the binary addition rules.

22
Basic Electronics (BBEE103/203)

Binary Addition Rules:


i) 0 + 0 = sum is 0 (no carry)
ii) 0 + 1 = sum is 1 (no carry)
iii) 1 + 0 = sum is 1 (no carry)
iv) 1 + 1 = sum is 0 (carry is 1)
2) Assigning input-output variables: Let A and B are the input variables and S for sum and C for carry as
output variables.
3) Tabulate the truth table-4.7. Table-4.7

Inputs Outputs Min-terms Max-terms


A B Sum (S) Carry (C) S C S C
0 0 0 0 A+B A+ B
0 1 1 0 A’B A+ B’
1 0 1 0 AB’ A’+B
1 1 0 1 AB A’+B’

EASWARA
4) Extracting Boolean min-terms and max-terms for the output variables:
Min-terms (SOP) Max-terms (POS)
Sum, S = A’B+AB’ Sum, S = (A+B)(A’+B’)
Carry, C = AB
M Carry, C = (A+B)(A+B’)(A’+B)
5) Logic circuit: For the Boolean min-terms, an half adder circuit can be implemented using
i) one XOR gate (for sum) and one AND gate (for carry) as shown in the fig.4.7(a).
ii) two NOT gates, two AND gates and one OR for Sum; one AND for Carry as shown in the
fig.4.7(b).

Fig.4.7 (a) Implementation of half adder using EXOR & AND gates (b) Basic gates

For the Boolean max-terms, the half adder circuit is implemented after simplification of carry term (C).
C = (A+B)(A+B’)(A’+B) transferring POS to SOP we write,
C = A’B’+A’B+AB’
=A’(B’+B)+AB’ B’+B=1

23
Basic Electronics (BBEE103/203)

C= A’+AB’ again transferring SOP to POS we write


C = A(A’+B) =AA’+AB AA’ =0
C = AB Finally to write in POS form use DeMorgan’s theorem
C’ = (AB)’ = A’+B’
(C’)’ = C = (A’+B’)’
Sum and carry outputs of the half adder for max-terms is as shown in the fig.4.8.

Fig.4.8 Implementation of half adder using max-terms

Limitation of half adder: Half Adder circuit cannot receive a carry input bit.

Full Adder

EASWARA
The full-adder circuit is a digital circuit capable of adding three bit binary numbers. This circuit consists of
three inputs and two outputs (2 bits: x and y and one bit previous carry z). It adds these three input bits (x, y
and z) at a time and produce a carry (C) and sum (S) by following the binary addition rules. It can be

M
constructed using two half adders that consists of 2 ANDs, 2 XORs, and one OR gate as shown in the fig
4.9.

Truth table of full adder is tabulated in the table-4.8.


Table-4.8

Inputs Outputs Boolean min-terms


x y z Sum (S) Carry (C) Sum (S) Carry (C)
0 0 0 0 0
0 0 1 1 0 x'y'z
0 1 0 1 0 x'yz'
0 1 1 0 1 x'yz
1 0 0 1 0 xy'z'
1 0 1 0 1 xy'z
1 1 0 0 1 xyz'
1 1 1 1 1 xyz xyz

24
Basic Electronics (BBEE103/203)
=

From the truth table it is observes that,


(i) sum (S) output is equal to 1, when only one input is equal to1 or when all three inputs are equal
to1. For this Boolean min-terms can be written as
S = x'y'z+ x'yz'+ xy'z'+ xyz = x'(y'z+ yz') + x (y'z'+ yz) = x'(y⊕z) + x(y⊕z)' = x ⊕ y ⊕ z
(ii) output has a carry is equal to 1, if two or three inputs are equal to1. For this Boolean min-
terms can be written as
C = x'yz+ xy'z+ xyz'+ xyz

= x'yz+ xy'z +xy(z'+z) z'+z=1


= xy+x'yz+xy'z
= y(x+ x'z)+ xy'z using absorption law (x+ x'z) = x+z
= y(x+z) + xy'z
= xy +yz + xy'z using absorption law (y+ y'x) = y+x
= xy + z(y+ y'x)
= xy +z(y+x)
C = xy + yz + zx

EASWARA
M
Fig.4.9 Circuit diagram of Full Adder using two half adders
Implementation of full adder circuit using basic logic gates (NOT, AND and OR) is shown in the fig.4.10.

25
Basic Electronics (BBEE103/203)

EASWARA
Fig.4.10 Implementation of full adder circuit using basic gates
M
SOLVED EXAMPLES

NUMBER SYSTEMS
1. Convert the following numbers with the indicated bases to decimal: (a) (4310)5 b) (198)12 (c) (735)8 (d) (5251)6
3 2 1 0
Solution: (a) (4310)5 = 4 x5 + 3 x 5 + 1 x 5 + 0 x 5 = (580)10
2 1 0
(b) (198)12 = 1 x 12 + 9 x 12 + 8 x 12 = (260)10
2 1 0
(c) (735)8 = 7 x 8 + 3 x 8 + 5 x 8 = (477)10
2 1 0
(d) (525)6 = 5 x 6 + 2 x 6 + 5 x 6 = (197)10

2. Convert the following numbers with the indicated bases:


a) (673.6)8 =( )2 = ( )16 b) (E7C.B)16 =( )2=( )8 c) (310.2)4 =( )2=( )8

Solution: (a) (673.6)8 = (110 111 011.110)2 = (1BB.C)16


(b) (E7C.B)16 = (1110 0111 1100.1011)2 = (7174.54)8
(c) (310.2)4 = (11 01 00.10)2 = (64.4)8

3. Express the following numbers in decimal: (a) (10110.0101)2 b) (l6.5)16 (c) (26.24)8 d) (FAFA.B)16 (e)
(1010.1010)2

26
Basic Electronics (BBEE103/203)

Solution: (a) (10110.0101)2 = 16 + 4 + 2 + .25 + .0625 = (22.3125)10

(b) (16.5)16 = 16 + 6 + 5x (.0615) = (22.3125)10

(c) (26.24)8 = 2 x 8 + 6 + 2/8 + 4/64 = (22.3125)10

3 2 1 0
(d) (FAFA.B)16 = 15x16 + 10x16 + 15x16 + 10x16 + 11/16 = (64,250.6875)10

(e) (1010.1010)2 = 8 + 2 + .5 + .125 = (10.625)10

4. Perform subtraction on the given unsigned decimal number using the 10's complement and 9’s complement.
Verify your answers by straight subtraction. (a) 6,428 – 3,409 (b) 125 – 1,800 c) 2,043 – 6,152 (d) 1,631
– 745
Solution: (a) 3409 → 03409 → (99999-03409) = 96590 (9’s complement) 96590+1 = 96591 (10’s

complement)

06428 – 03409 = 06428 + 96590 = 03018 (9’s complement result)

06428 – 03409 = 06428 + 96591 = 03019 (10’s complement result)

(b) 1800 → 01800 → (99999-01800) = 98199 (9’s complement) 98199+1 = 98200 (10’s
complement)

EASWARA
125 – 1800 = 00125 + 98200 = 98325 (negative)

Magnitude: 99999-98325 = -1675 Verification Result: 125 – 1800 = -1675

M
(c) 6152 → 06152 → 93847 (9’s complement) 93847+1= 93848 (10’s complement)

2043 – 6152 = 02043 + 93848 = 95891 (Negative) Magnitude: 4109 Result: 2043 – 6152 = -4109

(d) 745 → 00745 → 99254 (9’s complement) 99254+1= 99255 (10’s complement)

1631 -745 = 01631 + 99255 = 0886 (Positive) Result: 1631 – 745 = 886

BOOLEAN ALGEBRA
5. Prove the following theorems: i) x + x = x, ii) x · x = x iii) x + 1 = 1 iv) x + xy = x

To Prove i): x +x = x. ii): x · x = x

x + x = (x + x)·1 x·x=xx+0
= (x + x) (x + x’) = x x + x x’

= x + xx’ = x(x + x’)

= x +0 =x
=x

iii): x + 1 = 1 iv): x + xy = x
x+1=1 (x + 1) x + xy = x · 1 + xy

= (x + x) (x + 1) = x(1 + y)

= x+x’·1 = x(y + 1)

27
Basic Electronics (BBEE103/203)

= x + x’ =x·1

=1 =x

6. Simplify the following Boolean functions to a minimum number of literals.

Solution: (a) xy + xy' (b) (x + y)(x + y’)


xy + xy' = x(y + y') (x + y)(x + y') = x(x +y') + y(x + y')

=x = xx + xy' + xy + yy' yy'=0

(c) xyz + xy + xyz' = x +xy + xy’

xyz + x'y + xyz' = xy(z + z') + x'y = x (1+y+y’) 1+y+y’=1


= xy + x'y =x

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

(e) A'C' + ABC + AC' (A + B)'(A' + B') = (A'B')(A B)


A'C' + ABC + AC' = C' + ABC = (A'B')(BA)

= (C + C')(C' + AB) = A'(B'BA) = 0

= AB + C'

b)
EASWARA
7. Reduce the following Boolean expressions to the required number of literals.
a) (x'y' + z)' + z + xy + wz to three literals
A'B(D' + C'D) + B(A + A'CD) to one literal
c) (A' + C)(A' + C')(A + B + C'D) to four literals
d) M
ABCD + A'BD + ABC'D to two literals
Solution: (a) (x'y'+z)’+ z + xy + wz to three literals (b) A'B(D' + C'D) + B(A + A'CD) to one literal
= (x'y')'z' + z + xy + wz = B(A'D' + A'C'D + A + A'CD)
= [ (x + y) z' + z] + xy + wz
= B(A'D' + A + A'D(C + C')
= (z + z')(z + x + y) + xy + wz
= B(A + A'(D' + D))
= z + wz + x + xy + y
= B(A + A')
= z(1 + w) + x(1 + y) + y
=B
=x+y+z
(d) ABCD + A'BD + ABC'D to two literals
(c) (A' + C)(A' + C')(A + B + C'D) to four literals
= ABCD + A'BD + ABC'D
= (A' + CC')(A + B + C'D)
= ABD(C+C’) + A'BD
= A'(A + B + C'D)
= BD(A+A’)
= AA' + A'B + A'C'D
= BD
= A'(B + C'D)

8. Simplify the following Boolean expressions:


(a) x'yz + xz (b) (x + y)'(x' + y') (c) xy + x(wz + wz') (d) (BC' + A'D)(AB' + CD') (e) (x + y' + z')(x' + z')

solution: (a) x'yz + xz = (x'y + x)z = z(x + x')(x + y) = z(x + y)

(b) (x + y)'(x' + y') = x'y'(x' + y') = x'y'

28
Basic Electronics (BBEE103/203)

(c) xy + x(wz + wz') = x(y +wz + wz') = x(w + y)

(d) (BC' + A'D)(AB' + CD') = BC'AB' + BC'CD' + A'DAB' + A'DCD' = 0

(e) (x + y' + z')(x' + z') =xx' + xz' + x'y' + y'z' + x'z' + z'z' = z' + y'(x' + z') = z' + x'y'

9. Find the complement of the following Boolean functions and reduce them to the minimum number of literals.
(a) xy’+x’y (b) A’B+CD)E’+E (c) (x’+y+z’)(x+y’)(x+z)

Solution: (a) xy’+x’y Let F = (b) F= A’B+CD)E’+E (c) F = (x’+y+z’)(x+y’)(x+z)

xy’+x’y F' = [(A'B + CD)E' + E]' F' = [(x' + y + z')(x + y')(x + z)]'

F' = (xy' + x'y)' = [(A'B + CD) E' + E]' = (x' + y + z')' + (x + y')' + (x + z)'
= (xy')'(x'y)' = [(A'B + CD)'· E] · E' = F' = xy'z + x'y + x'z'
= (x' + y)(x + y') = [(A'B)'·(CD)'+E] E'

= xy + x'y' = (A + B')(C' + D')E'

= AC'E' + A D'E' + B'C'E' + B'D'E'

10. Convert each of the following expression into SOP & POS: (a) (AB + C)(B + C'D) (b) x' + x(x + y')(y + z')

Solution: (a) (AB + C)(B + C'D) b) x' + x(x + y')(y + z')

= AB + BC + ABC'D + CC'D = AB(1 + C'D) + BC = (x' + x)[x' + (x + y')(y + z')]


= AB + BC (SOP form)

= B(A + C) (POS form)


EASWARA = (x' + x + y')(x' + y + z')
= x’ + y + z’

Solution: given, F = xy + xy’ + y’z


M
11. Obtain the truth table of the following Boolean function: F = xy + xy’ + y'z

introducing missing terms

F = xy(z+z’) + xy’(z+z’) +(x+x’) y'z simplifying and arranging the SOP terms
F = x’y’z + xy’z’ + xy’z + xyz’ + xyz

Obtaining the truth table for min-terms in the Boolean function F,

xyz F min-terms
000 0
001 1 x’y’z
010 0
011 0
100 1 xy’z’
101 1 xy’z
110 1 xyz’
111 1 xyz

12. Draw the logic diagram corresponding to the following Boolean expressions without simplifying them:
(a) Y= A+B+B’(A+C’) (b) Y = (A’+B’) (C+D’)
Solution: (a) Y= A+B+B’(A+C’) (b) Y = (A’+B’) (C+D’)

29
Basic Electronics (BBEE103/203)

13. Implement the Boolean functions: F = xy + x'y' + y'z


(a) with AND, OR and NOT gates (b) with only OR and NOT gates (c) with only AND and NOT gates

EASWARA
M

REVIEW QUESTIONS

NUMBER SYSTEM
1. Convert the following: i) (101101)2 to base 10 ii) (0.375)10 into binary number iii) (1101)16 to base
2 and base 10 (1010110101)2 to base 16
2. Write the equivalent decimal numbers by representing the following signed 8-bit and unsigned 8-bit
binary numbers: i) (10001101)2 ii) (01010101)2 iii) (10110101)2 iv) (10101100)2.
3. Distinguish between RAM and ROM memory systems.
4. Write a note on different data types mentioning the bit size and range of values supported.
5. What is a logic gate? Explain the following logic gates: i) NAND ii) NOR and iii) EXOR

30
Basic Electronics (BBEE103/203)

6. Construct an exclusive-OR gate using only (AND, OR and NOT) basic gates.
7. Design a logic circuit using basic logic gates with three inputs ABC and output Y that goes logic 1 only
in two cases: i) A = 1, and B = 0 and C = 1 and ii) A = 0, and B = 1 and C = 0.
8. Construct a logic circuit that will produce a logic 1 output whenever two or more of its inputs are at
logic 1.
9. Realize basic logic gates from NOR and NAND gates.
DATA TYPE DATA REPRESENTATION
10. Perform subtraction on the given unsigned decimal number using the 2's and 1’s complement. Verify
the answers by straight subtraction: a) 11010 - 1101 (b) 11010 - 1000 c) 1001- 10011 d) 10000 – 110

ADDERS
11. Design an half adder circuit and implement the circuit using basic logic gates.
12. Explain full adder circuit and construct its logic circuit using two half adders and one OR gate.
BOOLEAN ALGEBRA

13. Simplify the following Boolean functions to a minimum number of literals.


(a) xy + xy' (b) (x + y)(x + y) (c) xyz + xy + xyz' (d) zx + zx'y (e) (A + B)'(A' + B')' (f) y(wz' + wz) +
xy
14. Reduce the following Boolean expressions to the required number of literals.

EASWARA
(a) ABC+ A'B'C + A'BC + ABC' + A'B'C' to five literals
(b) BC + AC' + AB + BCD to four literals
(c) [(CD)' + A' + A + CD + AB to three literals
M
(d) (A + C + D)(A + C + D')(A + C' + D)(A + B') to four literals
15. Find the complement of the following Boolean functions and reduce to a minimum number of literals.
(a) (BC' + A'D)(AB' + CD') (b) B'D+ A'BC' + ACD + A'BC (c) [(AB) A][(AB) B] (d) AB'+ C'D'
16. Express the following functions in a sum of min-terms and a product of max-terms.
(a) F(A, B, C, D) = D(A' + B) + B'D (b) F(w, x, y, z) = y'z + wxy' + wxz' + w'x'z
(c) F(A, B, C, D) = (A + B' + C)(A + B)(A + C' + D') (A' + B + C + D')(B+ C' + D')
(d) F(A, B, C) = (A' + B)(B' + C) (e) F(x, y, z) = 1 (f) F(x, y, z) = (xy + z)(y + xz)
17. Convert the following to the other canonical form.
(a) F(x, y, z) = ∑(1, 3, 7) (b) F(A, B, C, D) = ∑(0, 2, 6, 11, 13, 14) (c) F(x, y, z) = π(0, 3, 6, 7)
(d) F(A, B, C, D) = π(0, 1, 2, 3, 4, 6, 12)

31

You might also like