You are on page 1of 218

UNIT 1

BASE CONVERSION AND BOOLEAN ALGEBRA


I. Number System
• Number system is a system for expressing the number of a specific type such as Decimal, Octal,
hexadecimal and Binary.
• The number systems are used quite frequently in the field of digital electronics and computers.
However the type of number system used in computers could be different at different stages of the
usage.
• For example, when a user key-in some data into the computer, he/she will do it using decimal
number system i.e. the system we all have used for several years for doing arithmetic problems.
• But when the information goes inside the computer, it needs to be converted to a form suitable for
processing data by the digital circuitry.
• Example for number system:
–There are several systems for representing the counting numbers.
– These include the usual base “10” or decimal system : 1,2,3
,…..10,11,12,..99,100,…
Common Number System
Used by Used in
System Base Symbols humans? computers?
Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa- 16 0, 1, … 9, No No
decimal A, B, … F

3
Counting

Decimal Binary Octal Hexa- decimal


0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
Counting
Decimal Binary Octal Hexa- decimal

8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Conversion Among Bases

Decimal Octal

Binary Hexadecimal
Conversion Table
Conversion Binary Decimal Octal Hexadecimal
Procedure
Binary - Position Weight Group by 3 Bits Group By 4 Bits
Method (Base = 2)
Decimal Successive Division Successive Division Successive Division
and Multiplication - and Multiplication and Multiplication
Method Method Method

Octal Represent the Binary Position Weight Convert Octal to


Equivalent in 3 Bits Method (Base = 8) Binary. Group Binary
- Equivalent by 4 Bits
and Represent as
Hexadecimal
Hexadecimal Represent the Binary Position Weight Convert Hexadecimal
Equivalent in 4 Bits Method (Base = 16) to Binary. Group
Binary Equivalent by -
3 Bits and Represent
as Octal
Binary to Decimal Conversion (Position Weight Method)

Position Weight Method (Binary):


Multiplying each binary digit by its Position weight and summing.

Example: 1011.112 = ?10


1 0 1 1. 1 1
Method 2
1x2-2 = 0.25
1x2-1 = 0.5
1x20 = 1 OR
1x21 = 2
0x22 = 0
1x23 = 8
----------
Method 1 11.7510

(1011.11)2 = 11.7510
Octal to Decimal Conversion (Position Weight Method)

Position Weight Method (Octal):


Multiplying each Octal digit by its Position weight and summing.

Example: 1217.438 = ?10


1 2 1 7. 4 3
Method 2
3x8-2 = 0.0468
4x8-1 = 0.5
7x80 = 7 1217.438 = (1x83) + (2x82) + (1x81) + (7x80) + (4x8-1) + (3x8-2)
1x81 = 8 = 512+ 128+ 8+ 7+ 0.5+ 0.0468
2x82 = 128
OR
1x83
= 655.54610
= 512
----------
Method 1 655.54610

(1217.43)8 = 655.54610
Hexadecimal to Decimal Conversion (Position Weight Method)

NOTE:
Position Weight Method (Hexadecimal) A-10
B-11
Multiplying each Hexadecimal digit by its Position weight and summing. C-12
D-13
Example: (A2F7.EB)16 = ?10 E-14
F-15
A 2 F 7. E B
11x16-2 = 0.042
14x16-1 = 0.875
7x160 = 7
15x161 = 240 A2F7.EB16 = (10x163) + (2x162) + (15x161) + (7x160) + (14x16-1) + (11x16-2)
2x162 = 512 = 40960+512+ 240+7+ 0.875+ 0.042
10x163 = 40960 = 41719.91710
----------------
41719.91710

(A2F7.EB)16 = 41719.91710
Decimal to Binary Conversion
(Successive Division and Multiplication Method)
• Integers are Divided by 2 until the Quotient is Zero. • Fractions are Multiplied by 2 until the Product
The last Remainder is the MSB. get Zero. The First Integer obtained is the
• Remainder Read from Bottom to Top MSB.
Example: 527.12510 = (?)2 • Integer Read from Top to Bottom
• Example: 527.12510 = (?)2
0.125 x 2 = 0.25 - 0
2 527 0.25 x 2 = 0.5 - 0
2 263 - 1
2 131 - 1 0.5 x 2 = 1.0 - 1
2 65 - 1 0.0 x 2 = 0.0 - 0
2 32 - 1
2 16 - 0
2 8 - 0
2 4 - 0 0.12510 = 0.00102
2 2 - 0
1 - 0
Therefore,

52710 = 10000011112
527.12510 = 1000001111.00102
Decimal to Octal Conversion
(Successive Division and Multiplication Method)
• Integers are Divided by 8 until the Quotient is Zero. • Fraction are Multiplied by 8 until the Product
The last Remainder is the MSB. get Zero or till the required accuracy is
obtained. The First Integer obtained is the
• Remainder Read from Bottom to Top MSB.
• Example: 1180.12010 = (?)8 • Integer Read from Top to Bottom
• Example: 1180.12010 = (?)8
0.120 x 8 = 0.96 - 0
8 1180 0.96 x 8 = 7.68 - 7
8 147 - 4
8 18 - 3 0.68 x 8 = 5.44 - 5
2 - 2 0.44 x 8 = 3.52 - 3

118010 = 22348 0.12010 = 0.07532

Therefore,
1180.12010 = 2234.07532
Decimal to Hexadecimal Conversion
(Successive Division and Multiplication Method)
• Integers are Divided by 16 until the Quotient is • Fraction are Multiplied by 16 until the
Zero. The last Remainder is the MSB. Product get Zero or till the required accuracy
• Remainder Read from Bottom to Top is obtained. The First Integer obtained is the
MSB.
• Example: 2789.2510 = (?)16
• Integer Read from Top to Bottom
NOTE:
A-10
• Example: 2789.2510 = (?)16
16 2789 B-11 0.25 x 16 = 4.0 - 4
16 174 - 5 C-12
0.0 x 16 = 0.0 - 0
1 - 14 D-13
E-14
F-15 0.2510 = 0. 4016

Therefore,
278910 = 1E516
2789.2510 = 1E5.4016
Binary to Octal Conversion
• Group by 3 bits from LSB.
• If the number of bits is not evenly divisible by 3, then add 0's at the
MSB (0xx.yy0)
• Represent 1 octal digit for each group
Example: (1010101.11)2 to ( )8
001 010 101 . 110
1 2 5 . 6

(1010101)2 = 125.68
Binary to Hexadecimal Conversion
• Group by 4 bits from LSB.
• If the number of bits is not evenly divisible by 4, then add 0's at the
MSB (00xx.yy00)
• Represent 1 Hexadecimal digit for each group NOTE:
1000 - 12 NOTE:
Example: (10110100010111.11001)2 to ( )16 1101 - 13 A-10
B-11
C-12
0010 1101 0001 0111 . 1100 1000 D-13
2 D 1 7 . C 8 E-14
F-15

(10110100010111.11001)2 = 2D17.C816
Octal to Binary Conversion

• For each of the Octal digit write it as 3 bits binary equivalent


Example : (257.26)8 to ( )2

2 5 7 . 2 6
010 101 111 . 010 110

(257.16)8 = (010101111.010110)2
Hexadecimal to Binary Conversion

• For each of the Hexadecimal digit write it as 4 bits binary


equivalent
NOTE:
• Example : (A9F.2D)16 to ( )2 A – 1010
B – 1011
C – 1100
D – 1101
A 9 F . 2 D E – 1110
F - 1111
1010 1001 1111 . 0010 1101

(A9F.2D)16 = (101010011111.00101101)2
Octal to Hexadecimal Conversion
Steps:
1. Convert Octal to Binary
2. Represent Binary to Hexadecimal by Group of 4 bits
Example : (657.26)8 to ( )16
Step 1: Convert Octal to Binary Step 2: Represent Binary to Hexadecimal
6 5 7 . 2 6 0001 1010 1111 . 0101 1000
110 101 111 . 010 110
1 A F . 5 8
(657.26)8 = (010101111.010110)2

(657.26)8 = (1AF.58)16
Hexadecimal to Octal Conversion
Steps:
1. Convert Hexadecimal to Binary
2. Represent Binary to Octal by group of 3.
Example : (1AF.58)16 to ( )8
Step 1: Convert Hexadecimal to Binary Step 2: Represent Binary to Octal

1 A F . 5 8 000 110 101 111 . 010 110 00

0 6 5 7 . 2 6
0001 1010 1111 . 0101 1000
(1AF.58)16 = (657.26)8
(1AF.58)16 = (000110101111.01011000)2

(1AF.58)16 = (657.26)8
Practice Examples:
1. (110010.0011)2 = ?10
2. (527.32)8 = ?10
3. (AE09.DC)16 = ?10
4. (6718.25)10 = ?2
5. (924.675)10 = ?8
6. (7938.55)10 = ?16
7. (1010111.1001)2 = ?8
8. (1110010010011.111101)2 = ?16
9. (1472.327)8 = ?2
10. (ADF9.7B)16 = ?2
11. (1763.567)8 = ?16
12. (D1EB.A9)16 = ?8
II. Binary Arithmetic Rules

Binary Addition Binary Subtraction Binary Multiplication Binary Division

0+0 = 0 0-0 = 0 0x0 = 0

Binary Subtraction and


0+1 = 1 10-1 = 1 0x1 = 0
Binary Multiplication

1+0 =1 1-0 = 1 1x0 = 0

1+1 = 10 (0 with Carry of 1) 1-1 = 0 1x1 = 1


Binary Addition Note: 1+1+1 = 11
1
1
Note: 1+1 = 10
----
Example : Add 1101.101 and 111.011 1
10
1
1
----
-----
10
11
1111 11 Carry

1101.101
Start Adding Note: 1+1+1 + 1 = 100
111.011 from here 1
1
----------------------- ----
10
10101.000 Answer 1
-----
11
1
-----
100
Binary Subtraction
Example : Subtract 1010.010 and 111.111
1 1
0101 10 Borrow

1010.010 Start Subtract Note: 10 – 1 = 1


from here 10
111.111 1
----------------------- ----
1
0010.011 Answer
Binary Multiplication
Multiply the Multiplicand with each bit of multiplier and add the Products
Example : Multiply 1101.11 and 11.01
Note: 1+1 = 10
1 1 0 1 . 1 1 1
1 1 . 0 1 1 Note: 1+1+1 + 1 = 100
---- 1
--------------------------
10 1
1 ----
Carry 10
11 1 1 0 1 1
Note: 1+1+1 = 11 1
1 1 0 1 1 1 1 -----
0 0 0 0 0 0 1 11
---- 1
1 1 0 1 1 1 10 -----
1 1 0 1 1 1 1 100
-----
----------------------------------- 11
1 0 1 1 0 0 .1 0 1 1 Answer
Binary Division
Example : Divide 101101 by 110
1 1 1 . 1 Quotient
1 1 0 1 0 1 1 0 1 0
1 1 0
01 0 1 0
Note: 10 – 1 = 1
1 1 0
10
1 0 0 1 1
1 1 0 ----
1
0 1 1 0
1 1 0
0 0 0 Remainder
Practice Examples

1. 110101.1012 + 101100.0012 = ?2
2. 1000101.112 – 110010.012 = ?2
3. 1001.112 x 11.012 = ?2
4. 10110012 / 1102 = ?2
III. Signed Numbers Methods

Methods for Representation of


Signed Numbers

Sign Magnitude
Complement Form
Form

1’s Complement 2’s Complement


Form Form
Representation of Sign Magnitude Form
Binary Equivalent represented as Magnitude. An Additional Bit is Called a Sign Bit Placed at MSB.

If the Sign Bit is “0”, the Binary Number is Positive.

If the Sign Bit is “1”, the Binary Number is Negative

0 1 0 1 0 0 1 = +41

Sign Bit Magnitude

1 1 0 1 0 0 1 = -41
Methods for Obtaining 1’s & 2’s Complement Complement Form
1’s Complement:
Change all 0’s to 1’s and 1’s to 0’s
Ex:
Binary : 1111
1’s Complement : 0000 (Reverse is called 1’s Complement)

2’s Complement:
1. Change all 0’s to 1’s and 1’s to 0’s
2. Add +1 at the LSB of 1’s Complement Form
Ex:
Binary : 1111
1’s Complement : 0000
2’s Complement : 0001 (Add +1 with the LSB of 1’s Complement)
Representation of 1’s & 2’s Complement Form
If the Number is Positive, then Place 0 at MSB and its called Sign Magnitude Form
But, if the number is Negative, then 1’s or 2’s Complement Method Used.
Example: Represent Binary 0110110 in Sign Magnitude Form, 1’s Complement Form
and 2’s Complement Form
0 1 1 0 1 1 0 = Sign Magnitude (+54)

Sign Bit Magnitude


1 1 1 0 1 1 0 = Sign Magnitude(-54)

1 0 0 1 0 0 1 = 1’s Complement Form (-9)

Add +1 at LSB 1

1 0 0 1 0 1 0 = 2’s Complement Form (-10)


1’s Complement Arithmetic
Example: Add 2510 + 1410 using 8 Bit 1’s Complement Arithmetic
Procedure:
1. Convert 25 and 14 into equivalent Binary
2. Represent the Binary into 8 Bits by Add 0’s in MSB to Match 8 Bits
3. Add the both Binary Equivalent
4. If there is a Carry, Bring the Carry to the LSB and add it.
5. If the Results has MSB is 0 then the Result is Positive and its in True Binary Form
6. If the Results has MSB is 1 then the Result is Negative (Either has Carry or no Carry) and take
1’s Complement of the Results to get the Answer
7. Verify the Answer by adding Decimal Digits (Optional)
Step 1: Convert Decimal to Binary

2 25 2 14
2 12 - 1 2 7 - 0
2 6 - 0 2 3 - 1
2 3 - 0 1 - 1
1 - 1

2510 = 110012 1410 = 11102

Step 2: Represent the Binary into 8 Bits

2510 = 000110012

1410 = 000011102
Step 3: Add both Binary Equivalent
11 Note:
No Need of Complements because
2510 = 00011001 Results is Positive
1410 = 00001110
---------------------
00100111

MSB = 0
Also No Carry

So the Results is Positive and its True Binary Form.

Therefore, 2510 + 1410 = 0 0 1 0 0 1 1 12


1’s Complement Arithmetic
Example: Add (-25)10 + 1410 using 8 Bit 1’s Complement Arithmetic
Procedure:
1. Convert 2510 and 1410 into equivalent Binary
2. Represent the Binary into 8 Bits by Add 0’s in MSB to Match 8 Bits
3. Take 1’s Complements for 2510 to gets (-25)10
4. Add the both Binary Equivalent
5. If there is a Carry, Bring the Carry to the LSB and add it.
6. If the Results has MSB is 0 then the Result is Positive and its in True Binary Form
7. If the Results has MSB is 1 then the Result is Negative (Either has Carry or no Carry) and take
1’s Complement of the Results to get the Answer
8. Verify the Answer by adding Decimal Digits (Optional)
Step 1: Convert Decimal to Binary

2 25 2 14
2 12 - 1 2 7 - 0
2 6 - 0 2 3 - 1
2 3 - 0 1 - 1
1 - 1

2510 = 110012 1410 = 11102

Step 2: Represent the Binary into 8 Bits

2510 = 000110012

1410 = 000011102
Step 3: Take 1’s Complements of (25)10
(25)10 = 0 0 0 1 1 0 0 1 Note:
1’s Complement of (25)10 : No Need of Complements because
Results is Positive
(-25)10 = 1 1 1 0 0 1 1 0

Step 4: Add both Binary Equivalent


111111
-2510 = 11100110
1410 = 00001110
MSB =1
---------------------
No Carry 11110100

So the Results is Negative and its Complementary Form.


1’s Complement of 11110100 = 00001011
Therefore, (-25)10 + 1410 = 0 0 0 0 1 0 1 12
2’s Complement Arithmetic
Example: Add 2510 + (-14)10 using 8 Bit 2’s Complement Arithmetic
Procedure:
1. Convert 25 and 14 into equivalent Binary
2. Represent the Binary into 8 Bits by Add 0’s in MSB to Match 8 Bits
3. Take 2’s Complements for 14 to get -14
4. Add the both Binary Equivalent
5. If there is a Carry, Ignore the carry.
6. If the Results has MSB is 0 then the Result is Positive and its in True Binary Form
7. If the Results has MSB is 1 then the Result is Negative (Either has Carry or no Carry) and take
2’s Complement of the Results to get the Answer
8. Verify the Answer by adding Decimal Digits (Optional)
Step 1: Convert Decimal to Binary

2 25 2 14
2 12 - 1 2 7 - 0
2 6 - 0 2 3 - 1
2 3 - 0 1 - 1
1 - 1

2510 = 110012 1410 = 11102

Step 2: Represent the Binary into 8 Bits

2510 = 000110012

1410 = 000011102
Step 3: Take 2’s Complements of (14)10
(14)10 = 0 0 0 0 1 1 1 0
1’s Complement of (14)10 : Note:
No Need of Complements because
1’s Complement of 14 = 1 1 1 1 0 0 0 1
Results is Positive
2’s Complement 0f 14 = 1 1 1 1 0 0 1 0 = (-14)

Step 4: Add both Binary Equivalent


111
2510 = 00011001
-1410 = 11110010
---------------------
Carry =1
Ignore the Carry 100001011
-----------------------
MSB = 0 00001011

So the Results is Positive and its True Binary Form.

Therefore, (25)10 + (-14)10 = 0 0 0 0 1 0 1 12


2’s Complement Arithmetic
Example: Add (-25)10 + (-14)10 using 8 Bit 2’s Complement Arithmetic
Procedure:
1. Convert 25 and 14 into equivalent Binary
2. Represent the Binary into 8 Bits by Add 0’s in MSB to Match 8 Bits
3. Take 2’s Complements for 14 to get -14 and 25 to get -25.
4. Add the both Binary Equivalent
5. If there is a Carry, Ignore it.
6. If the Results has MSB is 0 then the Result is Positive and its in True Binary Form
7. If the Results has MSB is 1 then the Result is Negative (Either has Carry or no Carry) and take
2’s Complement of the Results to get the Answer
8. Verify the Answer by adding Decimal Digits (Optional)
Step 1: Convert Decimal to Binary

2 25 2 14
2 12 - 1 2 7 - 0
2 6 - 0 2 3 - 1
2 3 - 0 1 - 1
1 - 1

2510 = 110012 1410 = 11102

Step 2: Represent the Binary into 8 Bits

2510 = 000110012

1410 = 000011102
Step 3: Take Complements of (14)10 Take Complements of (25)10
(14)10 = 0 0 0 0 1 1 1 0 (25)10 = 0 0 0 1 1 0 0 1
1’s Complement of 14 = 1 1 1 1 0 0 0 1 1’s Complement of 25 = 1 1 1 0 0 1 1 0
2’s Complement 0f 14 = 1 1 1 1 0 0 1 0 = (-14) 2’s Complement 0f 25 = 1 1 1 0 0 1 1 1 = (-14)

Step 4: Add both Binary Equivalent


11
-2510 = 11100111
-1410 = 11110010
---------------------
Carry =1
111011001
Ignore the Carry
-----------------------
11011001
MSB = 1

So the Results is Negative and its Complementary Form.

.
Step 5: Take 1’s Complements of the Results
Results: 11011001
1’s Complements : 00100110

Step 6: Take 2’s Complements of above 1’s Complements

1’s Complements : 00100110


Add +1 1
--------------------
2’s Complements: 00100111 Answer

---------------------
Therefore, (-25)10 + (-14)10 = 0 0 1 0 0 1 1 12
Practice Examples

1. Represent 1011011012 into Following


i) Sign Magnitude Form
ii) 1’s Complement Form
iii) 2’s Complement Form
2. Add (-17)10 + (-33)10 using 8 Bit 1’s Complement Arithmetic
3. Add -31.510 to -93.12510 Using the 12 bit 2’s Complement
Arithmetic
IV. Floating Point Numbers
• Word Length in Computer is Fixed
Example:
8 Bit Computer, Word Length is 8 Bits
i.e -28-1 to 28-1 -1
-256 to +255

Similarly for 16 Bit Computer, Word Length is 16 Bits

i.e -216-1 to 216-1 -1


-32,768 to +32767
Floating Point Numbers
In Decimal, Large and Small Numbers Represented as
Very Large Numbers : 4.69 x 1023
Gate Exam Question
Very Small Numbers : 1.601 x 10-19

In Binary Floating Point Numbers Represented as Two Parts


1. Mantissa – Signed & Fixed Point Numbers
2. Exponent – Position of Binary
Representation of Floating Point Numbers

A floating-point number F is represented by a double <M,E> :


F=MxBE
B - exponent base (usually 2)
M - mantissa
E – exponent
M is usually represented in 2’s complement form, with an implied decimal point before it.

For example,
In decimal,
0.235 x 106
In binary,
0.101011 x 20110
V. Binary Codes
• Codes are used to represent Binary Information which are received
from any Symbols, Characters and Numbers, etc.
• Codes are used send and receive Information from and to the
Computers.
• Codes are Received information in the Form of Numeric, Special
Characters, Symbols, etc and process the data with in the Computer
and send the Output in the form Received input Format.
Types of Codes

Codes

Weighted Error
Binary Codes Non-Weighted Error Alphanumeric
Detecting Correcting
Codes Codes
Codes Codes
1. BCDCode(8421)
2. 5421&2421Code 1. Excess–3 Code 1. ASCII code
3. Reflective Code 2. Gray Code 1. Parity Check 2. EBCDIC Code
1. Hamming Code
4. Sequential Code 2. Check sum
Decimal Binary BCD (8421) 5421 2421
0 0000 0000 0000 0000
1 0001 0001 0001 0001
3
2 0010 0010 0010 0010
3 0011 0011 0011 0011
Weighted Binary Code 4 0100 0100 0100 0100
5 0101 0101 1000 1011
6 0110 0110 1001 1100
Weighted Binary Codes are
follow Position Weight Methods. 7 0111 0111 1010 1101
8 1000 1000 1011 1110
BCD (8421), 2421, 5421 and
9 1001 1001 1100 1111
5211 are Weighted Binary Codes.
10 1010 0001 0000
11 1011 0001 0001
12 1100 0001 0010
13 1101 0001 0011
14 1110 0001 0100
15 1111 0001 0101
BCD (8421) Codes
BCD – Binary Coded Decimal
• It has Group of 4 Bits.
• It is also called 8421 Code
• The Weights of this code are 8, 4, 2, 1.
• The code has all positive weights such as 0, 1, 2, 3.
Representation of BCD Digits
Example: 1210
Binary : 1100
But in BCD, 1210 represented as
0001 0010
------ ------
1 2
1210 = 0001 0010 (BCD)
Example: Add 678 + 536 in BCD Code
Step 1 : Convert Decimal to BCD
678 = 0110 0111 1000
536 = 0101 0011 0110

Step 3: Add Both BCD Codes Values


0110 0111 1000
0101 0011 0110
------------------------------
1011 1010 1110 All are Illegal Codes
+0110 +0110 +0110
-----------------------------
10001 10000 10100
1 1 1
-----------------------------------------------
0001 0010 0001 0100
1 2 1 6
2421 Code
The Weights of this code are 2, 4, 2 and 1.
2421 Code is an Positively Weighted Code such as 21, 22, 21, 20
Binary Number 5,6,7,8,9 & 10 are not Exists

Ex: 0111 represent in 2421 Code


Binary: 0 1 1 1
2421 Code: 2 4 2 1 =(0x2)+(1x4)+(1x2)+(1x1)
=4+2+1 = 7
Also 1101 = 7 in 2421 Code
2421 Code: 1 1 0 1
2 4 2 1 =(1x2)+(1x4)+(0x2)+(1x1)
=2+4+0+1 = 7 (BCD) = 0111

Note: 5421 Code also Same Procedure like 2421 Code (Refer Table)
Reflective Codes
Reflective Code:

9’s Complement of 3 is 9’s Complement of 8 is


A code is said to be 9 9
Reflective if its 9’s -3 -8
Complement of (0,9), (1,8), ------ ------
(2,7), (3,6), (4,5) are Same 6 1

2421, 5211 and Excess-3


Codes are Reflective Codes.
9’s Complement of 6 is 9’s Complement of 1 is
9 9
-6 -1
------ ------
3 8
Sequential Codes
Sequential Code:
Decimal Binary
Codes Codes
A code is said to be 0 0000
Sequential Code if its
Succeeding Code grater than 1 0001
Preceding Code. 2 0010
3 0011
8421 and Excess-3 Codes are 4 0100
Sequential Codes.
0001 > 0000

0010 > 0001

0011 > 0010

0100 > 0011


Non-Weighted Binary Code: Non-Weighted Binary Codes are not Position Weight Methods.

Excess-3 and Gray Code are Non-Weighted Binary Codes. Decimal Binary Gray Code
0 0000 0000
1 0001 0001
2 0010 0011
Decimal BCD (8421) Code Excess-3 Code 3 0011 0010
0 0000 0011 4 0100 0110
1 0001 0100 5 0101 0111
2 0010 0101 6 0110 0101
3 0011 0110 7 0111 0100
4 0100 0111 8 1000 1100
5 0101 1000 9 1001 1101
6 0110 1001 10 1010 1111
7 0111 1010 11 1011 1110
8 1000 1011 12 1100 1010
9 1001 1100 13 1101 1011
14 1110 1001
15 1111 1000
Excess-3 Code
• Adding 3 to the Decimal Number Called Excess-3 Code
• Excess-3 Code is an Self-Complementing and Reflective Codes
• It has 6 Invalid Groups such as 0000, 0001, 0010, 1101,1110 and 1111.
Example: Convert 24610 into Excess-3 Code
2 4 6
+3 +3 +3
---------------------------
5 7 9

0101 0111 1001

24610 = 0101011110012
Example: Add 37 + 28 in Excess-3 Code
Solution
Step 1 : Convert Decimal to BCD
37 = 0011 0111
28 = 0010 1000
Step 2: Convert BCD to Excess-3 (Add +3)
37 = 0011 0111 28 = 0010 1000
0011 0011 0011 0011
-------------- --------------
0110 1010 0101 1011

Step 3: Add Both Excess-3 Values


0110 1010
0101 1011
------------------------
1011 10101
1
-------------------
1100 0101
-0011 +0011
--------------------
1001 1000 = 65
Gray Code
• Gray Code is and Non-Weighted Code and Reflective Code.
• It is not Suitable for Arithmetic Operation but used in ADC.
• It is also Called Unit Distance Code because of two adjacent Numbers that Differ by Only One Bit.

Binary to Gray Code Conversion Procedure:


1. Gray Code 1st Bit = Binary Code 1st Bit 1 0 0 1
2. Gray Code 2nd Bit = Binary 1st Bit + Binary 2nd Bit 1st Bit 2nd Bit 3rd Bit 4th Bit
3. Gray Code 3rd Bit = Binary 2nd Bit + Binary 3rd Bit
4. Gray Code 4th Bit = Binary 3rd Bit + Binary 4th Bit
Example: Convert 10012 to Gray Code
Solution:
Step 1: Gray Code 1st Bit = Binary Code 1st Bit
Binary : 1 0 0 1

Gray Code: 1

Step 2: Gray Code 2nd Bit = Binary 1st Bit + Binary 2nd Bit
Binary : 1 + 0 0 1
Gray Code: 1 1

Step 3: Gray Code 3rd Bit = Binary 2nd Bit + Binary 3rd Bit
Binary : 1 0 + 0 1
Gray Code: 1 1 0

Step 3: Gray Code 4th Bit = Binary 3rd Bit + Binary 4th Bit
Binary : 1 0 0 + 1
Gray Code: 1 1 0 1
Gray to Binary Code Conversion Procedure:
1. Binary Code 1st Bit = Gray Code 1st Bit
2. Binary Code 2nd Bit = Gray 2nd Bit + Binary 1st Bit
3. Binary Code 3rd Bit = Gray 3rd Bit + Binary 2nd Bit
4. Binary Code 4th Bit = Gray 4th Bit + Binary 3rd Bit
Example: Convert Gray Code 10102 to Binary Code
Solution:
Gray Code: 1 0 1 0
+ + +
Binary Code: 1 1 0 0

Answer:
Binary Code = 11002
Error Detecting Code
While Binary Data Transmission, Sometime Error Occurred. There are two methos used to detect and
Correct Errors. That are,
1. Error Detecting Method 2. Error Correcting Method

1. Error Detecting Methods:


❖ Parity Check Method used to detect Errors.
❖ Parity Check – An Extra bit is added with the Binary Information to make total no. of 1’s either
in even or odd
❖Parity Check Method classified as Even Parity and Odd Parity
❖Even Parity: Total no of 1’s in the Binary Information must be even Number
❖Odd Parity: Total no of 1’s in the Binary Information must be odd Number
❖Parity bit added at end of the Binary Information
❖Total No of 1’s in the Binary Information is even means ie. 0, 2, 4, 6, … Even Parity is 0 and
Odd Parity is 1.
❖Total No of 1’s in the Binary Information is odd means ie. 1, 3, 5, 7, … Even Parity is 1 and Odd
Parity is 0.
Odd & Even Parity
Decimal BCD Code Odd Parity Even Parity
0 0000 1 0
1 0001 0 1
2 0010 0 1
3 0011 1 0
4 0100 0 1
5 0101 1 0
6 0110 1 0
7 0111 0 1
8 1000 0 1
9 1001 1 0
Examples: In an Even Parity Scheme, which of the following words Contain an Error?
1. 10101010
Total Number of 1’s = 4
So it is Even Parity and No Error in this Binary Information
2. 10111001
Total Number of 1’s = 5
So it is Odd Parity and it has Error in this Binary Information

Examples: In an Odd Parity Scheme, which of the following words Contain an Error?
1. 10110111
Total Number of 1’s = 6
So it is Even Parity and it has Error in this Binary Information
2. 11101010
Total Number of 1’s = 5
So it is Odd Parity and No Error in this Binary Information
Check Sum Method:
• Parity Check Method Used to detect an Single Bit Errors in the Binary Information.
• To detect double Error, Check sum Methods are Used.

Example: Consider there are 5 Binary Information


A = 000, B = 001, C = 010, D=011, E = 100
A + B + C + D + E = Receiver End
E + D + C + B + A = Transmitter End

If Both the Transmitter and Receiver End data are Same, then there is no Error.
If there is a Mismatch then the Information received and Transmitted has Some Errors.
Error Correcting Codes
• Hamming Code Method used to Correct the Error on Binary Information.
• Adding one or more Parity Bits to the Binary Information to detect and correct errors.
• 7-Bit Hamming Code Represented as
P1 P2 D3 P4 D5 D6 D7
P1, P2, P4 – Parity Bits
D3, D5, D6, D7 – Data Bits
P1 = D3 + D5 + D7
P2 = D3 + D6 + D7
P4 = D5 + D6 + D7
Example: Represent Data Bits 0101 into 7-bit even Parity Hamming Code
Solution:
0 1 0 1
D3 D5 D6 D7

P1 = D3 + D5 + D7 = 0 + 1 + 1=0
P1 = 0

P2 = D3 + D6 + D7 = 0 + 0+ 1=1
P2 = 1

P4 = D5 + D6 + D7 = 1 + 0 + 1=0
P4 = 0

7 Bit Hamming Codes are


P1 P2 D3 P4 D5 D6 D7
0 1 0 0 1 0 1

Answer : 0100101
Example: A 7 Bit Hamming Code Received as 0101101. What is it Correct Code?
Solution:
7 Bit Hamming Codes are
P1 P2 D3 P4 D5 D6 D7
MSB 0 1 0 1 1 0 1

C1 = P1 + D3 + D5 + D7 = 0 + 0 +1 + 1 = 0
C2 = P2 + D3 + D6 + D7 = 1 + 0 +0 + 1 = 0
C4 = P4 + D5 + D6 + D7 = 1 +1 +0 + 1 = 1

C4 C2 C1 = 1 0 0 = 4

4th Bit from MSB need to Complement to Correct the Words.

Answer : 0100101
12-Bit Hamming Code:
12-Bit Hamming Code Represented as
P1 P2 D3 P4 D5 D6 D7 P8 D9 D10 D11 D12
P1, P2, P4, P8 – Parity Bits
D3, D5, D6, D7, D9, D10, D11, D12 – Data Bit

Parity Bits are Calculated by X-OR of Each Data Bits


P1 = {D3, D5, D7, D9, D11}
P2 = {D3, D6, D7, D10, D11}
P4 = {D5, D6, D7, D12}
P8 = {D9, D10, D11, D12}

C1 = {P1, D3, D5, D7, D9, D11}


C2 = {P2, D3, D6, D7, D10, D11}
C4 = {P4, D5, D6, D7, D12}
C8 = {P8, D9, D10, D11, D12}

C8 C4 C2 C1
Alphanumeric Codes
• Code used to represent Numbers, Alphabetic Letters and Special Symbols called Alphanumeric
Codes.
• 26 Lower Case Letters, 26 Upper Case Letters, 10 Numeric Digits and 25 Special Characters such
as +, -, *, /, !, @, etc totally upto 87 Symbols.
• The Representation of 87 Symbols require minimum 7 Bits.
• ASCII Code, EBCDIC Code and Hollerith Code are Alphanumeric Codes.

1. ASCII Code:
ASCII - American Standards Code for Information Interchange
• ASCII Code represents a character with 7-Bits
• ASCII Code Format : X6 X5 X4 X3 X2 X1 X0
Character 7-Bit ASCII Character 7-Bit ASCII Character 7-Bit ASCII
A 100 0001 p 101 0000 0 011 0000
B 100 0010 Q 101 0001 1 011 0001
C 100 0011 R 101 0010 2 011 0010
D 100 0100 S 101 0011 3 011 0011
E 100 0101 T 101 0100 4 011 0100
F 100 0110 U 101 0101 5 011 0101
G 100 0111 V 101 0110 6 011 0110
H 100 1000 W 101 0111 7 011 0111
I 100 1001 X 101 1000 8 011 1000
J 100 1010 Y 101 1001 9 011 1001
K 100 1011 Z 101 1010 : 011 1010
L 100 1100 ; 011 1011
M 100 1101 < 011 1100
N 100 1110 = 011 1101
O 100 1111 > 011 1110
? 011 1111
2. EBCDIC CODE:
• EBCDIC – Extended Binary Coded Decimal Information Code.
• It has 8-Bits for each Characters and 9th bit is Parity Bits.
• It is used to encode all the symbols and control characters found in ASCII

3. Hollerith Code:
• It is used in Punch Cards
• It has 12-bits for each characters
• It has 12 Rows. First 3 Rows called Zone punch and remaining 9 Rows called numeric punch
• Hollerith Code is BCD and its used in Computers.
Practice Examples
1. Represent 37810 in BCD Code.
2. Represent 57820 in Excess-3 Code
3. Convert 1011012 to Gray Code
4. Convert 110112 to Binary Code
5. Find Error in Below Odd Parity Scheme
i) 101011 ii) 110111
6. Find Error in Below Even Parity Scheme
i) 101011 ii) 110111
7. Represent Data Bits 11112 in 7 Bit Hamming Code
8. A 7 Bit Hamming Code Received as 11100112. What is the correct Code?
VI. Logic Gates
✓Logic gates are switches that turn on or off based on the user's actions.
✓They are the fundamental components of how computers operate.
✓When a given condition is true, logic gates turn ON, and when the condition is
false, they turn OFF.
✓They examine if the information they receive meets a given rule.
✓They either spit out true (ON) or false (OFF) as an answer
✓Note this: HIGH = True= ON=1, LOW = False=OFF=0
Logic Gates
Let's look at an example.
▪ Let's imagine a logic gate is tasked
with determining whether two
numbers are equal.
▪ The rule would be “is equal,”
which means that if the two input
numbers are equal, it will turn on,
signifying true.
▪ It will go into its OFF position if
they are not equal, indicating false.
Logic Gates
▪ However, we already knew that
computers only think in terms of
ON and OFF, which they interpret
as 1 and 0.
▪ So a computer wouldn't accept a 5
or 6 as an input; everything has to
be 0s and 1s.
▪ Reminder: The information you
give the logic gate is referred to as
input, and the information it spits
out is referred to as output!
▪ Let's try this example again, this
time remembering the rule!
Logic Gates
How do we explain how gates and circuits behave?
Boolean expression
It is a type of expression that can be used to represent Boolean algebra is a mathematical
notation that is used to express two-valued reasoning.
X = A+B (OR Gate) X = A . B (AND Gate)
Logic diagram
A circuit's graphical representation; each gate has its own symbol.
Truth Table
A table displaying all potential input values as well as the corresponding output values.
Logic Gates
▪ There are six different types of gates such as NOT, AND, OR, XOR, NAND and NOR.
▪ It is easier to implement a Boolean function with these types of gates.
▪ NAND and NOR Gates are Called Universal Gates, Because Both can be used to implement any
gate like AND, OR and NOT Gates.
NOT Gate
• NOT Gate used as Inverter or Complementation.
• It has one Input and one Output.
• A NOT gate takes one input signal (0 or 1) and outputs the opposite signal.
• IC 7404 used as a NOT Gate.
AND Gate
▪ AND Gate performs Logic Multiplication.
▪ It has two or more Input and one Output.
▪ The output of an AND Gate is HIGH only when all the inputs are HIGH.
▪ The Output of an AND Gate is LOW if any one of the inputs is LOW
▪ IC 7408 used for AND Gate Operation
OR Gate
▪ OR Gate performs Logic Addition.
▪ It has two or more Input and one Output.
▪ The output of an OR Gate is HIGH when any one of the inputs are HIGH
▪ The Output of an OR Gate is LOW when both the Inputs are LOW.
▪ IC 7432 used for AND Gate Operation
NAND Gate
▪ NAND Gate = AND – NOT Gate
▪ It has two or more Input and one Output
▪ When all the Inputs are HIGH then the Outputs are LOW.
▪ Also if any one or both the inputs are LOW then the Outputs are HIGH
▪ IC 7400 used for NAND Operation.
NOR Gate
▪ NOR Gate = OR – NOT Gate
▪ It has two or more Input and one Output
▪ When all the Inputs are LOW then the Outputs are HIGH.
▪ Also if any one or both the inputs are HIGH then the Outputs are LOW
▪ IC 7402 used for NOR Operation.
EX – OR Gate
▪ EX-OR Gate = Exclusive OR Gate
▪ It has two or more Input and one Output
▪ When all the Inputs are LOW or HIGH then the Outputs are LOW.
▪ Also if any one of the inputs are HIGH then the Outputs are HIGH
▪ IC 7486 used for EX-OR Operation.

X = AB + AB
EX – NOR Gate
▪ EX-NOR Gate = EX-OR Gate – NOT Gate
▪ It has two or more Input and one Output
▪ When all the Inputs are LOW or HIGH then the Outputs are HIGH.
▪ Also if any one of the inputs are HIGH then the Outputs are LOW
▪ IC 74266 used for EX-NOR Operation.

Boolean Expression Logic Diagram Truth Table

Out = AB + AB A B Out
0 0 1
OR
0 1 0
Out = A . B 1 0 0
1 1 1
VI. Boolean Algebra
Representation of Variables in Binary

1 Variables 2 Variables 3 Variables 4 Variables


(2 Combination) (4 Combination) (8 Combination) (16 Combination)

A AB ABC ABCD
0 00 000
0000 1000
1 01 001
0001 1001
010
10 0010 1010
011
11 0011 1011
100
0100 1100
101
0101 1101
110 0110 1110
111 0111 1111
Minimization Techniques
1. Boolean Algebra:
• Boolean Algebra used to simplify the logic circuits.
• Due to Lengthy Mathematical Operation, Boolean Algebra difficult to use for more than 3
Variables.

2. Karnaugh Method ( K-Map):


• K-Map method used to Simply the Boolean Expression upto four Variable.
• If it is More than 4 Variable its difficult to minimize the logic Circuits.

3. Quine – McCluskey Method (Tabular Method):


• Quine – McCluskey method used to minimize the Logic Circuits for more than 4 Variables.
Rules of Boolean Expressions

Boolean Addition Rules Boolean Multiplication Rules Boolean


(OR Operation) (AND Operation) Complement Rules
(NOT Operation)
0+0=0 0.0=0
0+1=1 0.1=0 0=1
1+0=1 1.0=0
1+1=1 1.1=1 1=0
Laws of Boolean Expressions
1. Complementation Laws: 2. AND Laws: 2. OR Laws:

0=1 A.0=0 A+0=A

1=0 A. 1 =A A+1=1

If A = 0 then A = 1 A.A=A A+A=A

If A = 1 then A = 0 A.A=0 A+A= 1

A=A
5. Commutative Laws:

A+B=B+A

A B A+B B+A A
A+B
B
0 0 0 0
0 1 1 1 B
B+A
1 0 1 1 A
1 1 1 1

A. B =B .A

A B A.B B.A A
A.B
B
0 0 0 0
0 1 0 0
B
B.A
1 0 0 0 A
1 1 1 1
6. Associative Laws:
Law 1: A + (B + C) = (A + B) + C Law 2 : A . (B . C) = (A . B) . C

A B C B+C A + (B + C) A+B A + (B + C) A B C B.C A . (B . C) A.B A . (B . C)

0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 1 0 0 1 0 0 0 0
0 1 0 1 1 1 1 0 1 0 0 0 0 0
0 1 1 1 1 1 1 0 1 1 1 0 0 0
1 0 0 0 1 1 1 1 0 0 0 0 0 0
1 0 1 1 1 1 1 1 0 1 0 0 0 0
1 1 0 1 1 1 1 1 1 0 0 0 1 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1

B B+C B B.C
C A + (B + C) C A . (B . C)
A A
A A+B A A.B
B (A + B) + C B (A . B) . C
C C
7. Distributive Laws:
Law 1: A + BC = (A + B) . (A + C)

A B C BC A + BC A+B A+C (A + B) . (A + C) A + BC = (A + B) . (A + C)
(LHS) (RHS)
0 0 0 0 0 0 0 0 LHS = A + BC (A . 1 = A)
0 0 1 0 0 0 1 0 = A . 1 + BC (1 + B = 1)
= A . (1 + B) + BC
0 1 0 0 0 1 0 0 = A . 1 + AB + BC (1 + C =1)
0 1 1 1 1 1 1 1 = A . (1 + C) + AB + BC
= A . 1 + AC + AB +BC
1 0 0 0 1 1 1 1
= A + AC + AB + BC (A . A = A)
1 0 1 0 1 1 1 1 = A . A + AC + AB + BC
= A (A + C) + B (A + C)
1 1 0 0 1 1 1 1
= (A + B) (A + C) = RHS
1 1 1 1 1 1 1 1

B BC A+B
A
C A + BC B (A + B) . (A + C)
A
A
C A+C
7. Distributive Laws:
Law 2: A . (B + C) = AB + AC

A B C B+C A . (B + C) AB AC AB + AC
(LHS) (RHS)
0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 1 1 1 0 0 0 0
1 0 0 0 0 0 0 0
1 0 1 1 1 0 1 1
1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 1

B B+C AB
A
C A + BC B AB + AC
A
A
C AC
8. Absorption Laws:
Law 1: A + AB = A
A B AB A + AB A + AB = A
0 0 0 0 A AB A + AB
LHS = A + AB
0 1 0 0 = A (1 + B) (1 + B = 1) B
A
1 0 0 1 =A.1
=A
1 1 1 1

Law 2: A (A + B) = A

A B A+B A . (A + B) A . (A + B) = A
0 0 0 0 A A+B A . (A + B)
LHS = A . (A + B) B
0 1 1 0 = A . A + AB A
1 0 1 1 = A + AB
= A (1 + B) (1 + B = 1)
1 1 1 1
=A
8. Absorption Laws:
Law 3: A + AB = A + B
A B A AB A + AB A+B
A + AB = A + B A
A AB
0 0 1 0 0 0 LHS = A + AB A + AB
= (A + A) (A + B) A
0 1 1 1 1 1
= 1 . (A + B)
1 0 0 0 1 1 = A + B = RHS A A+B
1 1 0 0 1 1 Note : Distributive Law B
A + BC = (A + B) . (A + C)
Law 4: A (A + B) = AB

A B A A+B A . (A + B) AB A . (A + B) = AB A . (A + B)
A A+B
0 0 1 1 0 0 A
LHS = A . (A + B)
B A
0 1 1 1 0 0 = A . A + AB
= 0 + AB
1 0 0 0 0 0 = AB = RHS A AB
1 1 0 1 1 1 B
9. Consensus Laws:
Law 1: AB + AC + BC = AB + AC
A
A B C A AB AC BC AB + AC AB + AC + BC B AB + AC + BC
0 0 0 1 0 0 0 0 0 C
A
0 0 1 1 0 1 0 1 1
A
0 1 0 1 0 0 0 0 0
B
0 1 1 1 0 1 1 1 1 C
1 0 0 0 0 0 0 0 0
1 0 1 0 0 0 0 0 0
1 1 0 0 1 0 0 1 1
1 1 1 0 1 0 1 1 1
A
B AB + AC
C
A
A
9. Consensus Laws:
Law 2: (A + B) (A + C) (B + C) = (A + B) (A + C)
A
A B C A A+B A+C B+C (A + B) (A + C) (A+B) (A+C) ( B+C) B
(A+B) (A+C) (B+C)
C
0 0 0 1 0 1 0 0 0 A
0 0 1 1 0 1 1 1 1 A
0 1 0 1 1 1 1 1 1
B
0 1 1 1 1 1 1 1 1 C
1 0 0 0 1 0 0 0 0
1 0 1 0 1 1 1 1 1
A
1 1 0 0 1 0 1 0 0 B
1 1 1 0 1 1 1 1 1 (A+B) (A+C)
C
A
A
10. DeMorgan’s Theorems:
Theorem 1: AB = A + B Theorem 2: A + B = A . B
Complement of a Product = Sum of Complements Complement of a Sum = Product of Complements

A B AB AB A B A+B A B A+B A+B A B A.B


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

AB
A A+B
B A
B

A A
A A
A+B
A.B
A
A
B
B
Principle of Duality
• Replacing 0 to 1 and 1 to 0
GIVEN EXPRESSION DUAL
• Replacing + to . and . to +
0.0=0 1 + 1 =1
• After Replaced if the condition are
True is called Prince of Duality A.1=A A+0=A

Example: A.B=B.A A+B=B+A


A (A . B) = A . B A + A + B = A +B
0+0=0

For Principle of Duality:


1 . 1 = 1 (Condition is True and its Dual)
BOOLEAN RULES TABLE

A=A
A+0=A A.0=0
A+1=1 A.1=A
A+A=A A.A=A
A+A= 1 A.A= 0
A+B=B+A A.B=B.A
A + (B + C) = (A + B) + C A . (B . C) = (A . B) . C
A + BC = (A + B) . (A + C) A . (B + C) = AB + AC
A + AB = A A (A + B) = A
A + AB = A + B A (A + B) = AB
AB + AC + BC = AB + AC (A + B) (A + C) (B + C) =
(A + B) (A + C)
AB = A + B A+B =A.B
1. Simplify the Expression : AB + AB + AB
Solution:
= B (A + A) + A B [ A + A = 1]
=B . 1+AB [B . 1 = B]
=B +AB [A + AB = A + B]
=B +A

2. Simplify the Expression : X = (A + B)(A + B)


Solution:
= (A + B)(A + B)
= (B + A)(B + A) [A + BC = (A + B)(A + C)]
= B + AA [AA = 0]
=B
3. Simplify the Expression : AB + AC + ABC(AB+C)
Solution:
= AB + AC + ABC(AB+C)
= AB + AC + ABCAB+ABCC [BB = 0] [CC=C]
= AB + AC + 0 + ABC
= AB + A + C + ABC [Take A Outside]
= A (B + BC) + A + C [B + BC = B + C] (Absorption Laws)
= A (B + C) + A + C
= AB + AC + A + C [Rearrange]
= A + AB + C + AC [A + AB = A + B] (Absorption Laws)
=A+ B +C +A [A + A =1]
=1 + B+A [1 + B =1]
=1+A [1 + A = 1]
=1
4. Simplify the Expression : AB + ABC + A(B+AB)
Solution:
= AB + ABC + A(B+AB) [B + BA = B + A]

= AB + ABC + A(B+A) multiply A with B+A

= AB + ABC + AB+AA [AA = A]

= AB + ABC + AB+A

= AB + ABC + A (B + 1) [B + 1 = 1] [Take A Outside]

= A (B + BC) + A .1 [B + BC = B + C]

= A(B + C) + A . 1 [A . 1 = 1] [multiply A Inside]


= AB + AC+ A [A + B = A . B] (DeMorgan Theorm)

= (AB) . AC + A [AB = A + B]

= (A + B) . (A + C) + A [A = A]

= (A + B) . (A + C) + A [A + BC = (A+B).(A+C)]

= A+BC + A [A + A = 1]

= 1 + BC [1 + B = 1]

=1 [1 = 0]

= 0 (Answer)
VIII. SOP & POS Representation

Sum of Products (SOP):


Logical Sum of two or more logical product terms called SOP.
X = ABC + ABC + ABC [SOP Form]
ABC – Product Terms
A Product Term Contain all the Variables in Complemented or uncomplemented Form called Minterm

2 Variable: (A,B)
00 AB
01 AB
10 AB
11 AB
3 Variables (A,B,C) 4 Variables (A,B,C,D)

000 ABC m0 0000 ABCD m0 1000 ABCD m8

001 ABC m1 0001 ABCD m1 1001 ABCD m9

010 ABC m2 0010 ABCD m2 1010 ABCD m10

011 ABC m3 0011 ABCD m3 1011 ABCD m11

100 ABC m4 0100 ABCD m4 1100 ABCD m12

101 ABC m5 0101 ABCD m5 1101 ABCD m13

110 ABC m6 0110 ABCD m6 1110 ABCD m14

111 ABC m7 0111 ABCD m7 1111 ABCD m15

Note:
0 = Complements
Canonical Sum of Products (SOP):
Logical Sum of all the minterms derived from the rows of a truth table, for which the value
of the function is 1. It is Called Canonical SOP.
A=1 A=0
Procedure to Obtain Canonical SOP:
• Identify the missing Logic Variable and multiply (X+X)
• Ignore one of the redundant minterms
Example: X(A,B) = A + B
= A (B + B) + B (A + A)
= AB + AB + AB + AB
= AB + AB + AB
Canonical SOP Symbol: Σm
Example : Σm(0,3,7)
= m0 + m3 + m7
= ABC + ABC + ABC
POS Representation

Products of Sums (POS):


Logical Product of two or more logical Sum terms called POS.
X = (A+B+C) (A+B+C) (A+B+C) [POS Form]
A+B+C – Sum Terms
A sum Term Contain all the Variables in Complemented or uncomplemented Form called Maxterm

2 Variable: (A,B)
00 A+B
01 A+B
10 A+B
11 A+B
3 Variables (A,B,C) 4 Variables (A,B,C,D)

000 A+B+C M0 0000 A+B+C+D M0 1000 A+B+C+D M8

001 A+B+C M1 0001 A+B+C+D M1 1001 A+B+C+D M9

010 A+B+C M2 0010 A+B+C+D M2 1010 A+B+C+D M10

011 A+B+C M3 0011 A+B+C+D M3 1011 A+B+C+D M11

100 A+B+C M4 0100 A+B+C+D M4 1100 A+B+C+D M12

101 A+B+C M5 0101 A+B+C+D M5 1101 A+B+C+D M13

110 A+B+C M6 0110 A+B+C+D M6 1110 A+B+C+D M14

111 A+B+C M7 0111 A+B+C+D M7 1111 A+B+C+D M15

Note:
1 = Complements
Canonical Product of Sum (POS):
Logical Product of all the maxterms derived from the rows of a truth table, for which the value of the
function is 0. It is Called Canonical POS.
0 =A 1 =A
Procedure to Obtain Canonical POS:
• Identify the missing Logic Variable and Add (XX)
• Expand the Expression using Distributive Property [A+BC = (A+B)(A+C)]
• Ignore one of the redundant maxterms
Example: X(A,B,C) = (A + B) (B + C) (A + C)
= (A + B + CC) (B + C + AA) (A + C + BB) [BB = 0]
= (A + B + C) (A + B + C) (A + B + C) (A + B + C) (A + B + C) (A + B + C)
= (A + B + C) (A + B + C) (A + B + C) (A + B + C) (A + B + C)
Canonical POS Symbol: ΠM
ABC Product Terms Sum Terms AB Product Sum
Terms Terms
000 ABC A+B+C
00 AB A+B
001 ABC A+B+C
01 AB A+B
010 ABC A+B+C
10 AB A+B
011 ABC A+B+C
11 AB A+B
100 ABC A+B+C
101 ABC A+B+C
110 ABC A+B+C
111 ABC A+B+C
Example : Find Canonical SOP Form for F(A,B) = A + B
Solution:
Total No of Variables : 2
A + B = A (B+B) + B (A+A) [A+A=1]
= AB + AB +AB +AB [A+A =A]
= AB + AB +AB
= 11 + 10 + 00
= m3 + m2 + m0
= Σm (0,2,3)
Example : Find Canonical POS Form for F(A,B,C) = (A+B)(A+C)
Solution:
Total No of Variables : 3
(A+B)(A+C) = (A+B+CC)(A+C+BB) [BB = 0][Distributive Property]
= (A+B+C) (A+B+C) (A+B+C) (A+B+C) [A.A=A]
= (A+B+C) (A+B+C) (A+B+C)
= 000 . 001 . 010 = M0 . M1 . M2 = ΠM(0,1,2)
IX. (K-Map) - SOP Form

Inputs Outputs X = 001 + 010 + 011 + 110 + 111


A B C X
X = ABC + ABC + ABC + ABC +ABC (SOP Form)
0 0 0 0
0 0 1 1 X = m1 + m2 + m3 + m6 + m7
0 1 0 1
0 1 1 0
X = 000 . 100 . 101
1 0 0 1
1 0 1 0 X = (A+B+C) (A+B+C) (A+B+C) (POS Form)
1 1 0 1
X = M0 . M4 . M5
1 1 1 1
Karnaugh Map (K-Map) (SOP Form)
• Simplification of Expression using Boolean Algebra Method Becomes Complex if Input Variables
are 3 or More.
• K-Map Method used to overcome this Issue.
• In K-Map, Input Variables are Expressed in the form of SOP or POS Form.
• K-Map Tables are represented in the form of cells.
• Cells are filled by given Inputs Variables.
• If there is an n input Variables, then 2n Cells
Input Variables = 2 then Total Cells = 4 (22)
Input Variables = 3 then Total Cells = 8 (23)
Input Variables = 4 then Total Cells = 16 (24)
Input Variables = 5 then Total Cells = 32 (25)

• Cells are Combined by 16, 8, 4, 2 & 1. Cells cannot combined other than this Order
4 - Variable (A,B,C,D) K-Map
2-Variable (A,B) K-Map
A B CD 01 11 10
00
AB
B 0 1
A 0 0 0 1 3 2
00
0 0 1 0 1
1 0 01 4 5 7 6
1 2 3
1 1 12 13 15 14
11

10 8 9 11 10

3 - Variable (A,B,C) K-Map A BC AB CD AB CD

BC
11 10 0 00 00 00 10 00
00 01
A
0 01 00 01 10 01
0 0 1 3 2
0 10 00 10 10 10
1 4 5 7 6 0 11 00 11 10 11
1 00 01 00 11 00
1 01 01 01 11 01
1 10 01 10 11 10
1 11 01 11 11 11
2 – Variable K-Map
1. Identify the Total Input Variables and Construct the K-Map
Ex: Y = AB + AB + AB
= 10 + 01 + 11
Total input Variables = 2, then Construct 2 Variable K-Map
B 0 1
A
0 0 1

1 2 3

2. Place 1 as per the above Inputs


B 0 1
A
0 1

1 1 1
2 – Variable K-Map
3. All Cell Combination on 2-Variable K-Map:

B 0 1
A X = AB + AB + AB + AB
0 1 1
= A (B+B) + A (B+B) [B+B = 1]
1 1 1
= A . 1+ A . 1 [A . 1 =A]

=A+A [A + A = 1]
Y=1 =1

Note:
For 2 Variables, 3 Variables, 4 Variables, etc if all cells are occupied with 1 means the Output also 1
2 – Variable K-Map
4. Two Cell Possible Combinations on 2-Variable K-Map:

B 0 1 B
A A 0 1
AB AB
0 1 1 0 1
00 00
01 10 NOTE:
1 1 1
0X X0 Check A Column has all are 0 or 1:
Output : Y = A Output : Y = B
If A Column has only 0 then it’s A

B B If A Column has only 1 then it’s A


A 0 1 0 1
A
AB AB
0 0 1 If A Column has both 0 and 1 then ignore it
10 01
1 1 11 11
1 1 1
1X X1
Output : Y = A Output : Y = B
2 – Variable K-Map
5. Two Cell Possible Combinations on 2-Variable K-Map:

B 0 1 NOTE:
A
1 1 AB AB
0 Check A Column has all are 0 or 1:
00 01
1 1 01 11
If A Column has only 0 then it’s A
0X X1
If A Column has only 1 then it’s A
Output : Y = A + B
If A Column has both 0 and 1 then ignore it
2 – Variable K-Map
4. One Cell Combinations on 2-Variable K-Map:

B 0 1 B
A A 0 1

0 1 0 1
NOTE:
1 1
It is not possible to group with only 1 Cells
Output : Y = A B Output : Y =A B So write as it is without Simplification.

B 0 1 B
A A 0 1

0 0

1 1 1 1

Output : Y = A B Output : Y = AB
3-Variable K-Map
1. Identify the Total Input Variables and Construct the K-Map
Ex: Y = ABC + ABC + ABC + ABC + ABC
= 110 + 101 + 111 + 011 + 010
Total input Variables = 3, then Construct 3 Variable K-Map
BC
00 01 11 10
A
0

2. Place 1 as per the above Inputs


BC
00 01 11 10
A
0 1 1

1 1 1 1
3-Variable K-Map
3. All Cell Combination: Output is 1
3-Variable (A,B,C) K-Map

BC
00 01 11 10
A
0 1 1 1 1

1 1 1 1 1

Y=1
3-Variable K-Map
4. Four Cell Possible Combinations
000
BC
11 10
BC
11 10 001
A
00 01 001 A
00 01
011
1 1 100 1 1
0 0 101
101
111
1 1 1 ------- 1 1 1
-------
X0X
XX1

Y=B Y=C

011 BC 000
BC 11 10
00 01 11 10 010 00 01
A A 100
1 1 111 1 1 010
0 0
110 110
1 1 1 ------- 1 1 1 -------
X1X XX0

Y=B Y=C
3-Variable K-Map
4. Four Cell Possible Combinations
000 BC
BC 00 01 11 10 100
00 01 11 10 001 A
A
010 101
0 1 1 1 1 0
011 110
------- 1 1 1 1 1 111
1
0XX -------
1XX
Y=A Y=A

011 000 000 000


BC 010 100 BC
11 10 001 010
00 01 11 10 00 01
A 111 010 A
100 100
1 1 1 110 110 0 1 1 1
0 101 110
------- ------- ------- -------
1 1 1 1 X1X XX0 1 1 1 1
X0X XX0

Y=B+C Y=B+C
3-Variable K-Map
5. Two Cell Possible Combinations
000 011
001 010
BC BC
00 01 11 10 ------- 00 01 11 10 -------
A A
1 1 00X 1 1 01X
0 0

1 1 1 111 1 1 1 100
110 101
------- -------
Y = AB + AB 11X Y = AB + AB 10X

111 111
BC 110 BC 110
00 01 11 10 00 01 11 10
A ------- A -------
0 1 1 11X 0 1 1 11X

1 1 1 1 1 1 1
000 100
010 110
------- -------
Y = AC + AB Y = AC + AB 1X0
0X0
3-Variable K-Map
6. One Cell Combinations

BC BC
00 01 11 10 00 01 11 10
A A
1 1 1 1 011
0 0 010
1 1 1 1 1 -------
01X

Y = ABC + ABC + ABC Y = ABC + ABC + AB


4-Variable K-Map
1. Identify the Total Input Variables and Construct 2. Place the 1 on K-Map Table as per the
the K-Map Inputs
Ex: Y = ABCD + ABCD + ABCD
= 1110 + 1001 + 1111
Total input Variables = 4, then Construct 4 Variable K- CD 01 11 10
00
Map AB
00

CD 01 1 1
00 01 11 10
AB
11
1 1
00

10 1
01

11

10
4-Variable K-Map

3. All Cell Combination : Output is 1

CD
AB 00 01 11 10

1 1 1 1
00

01 1 1 1 1

11
1 1 1 1

10 1 1 1 1

Y=1
4-Variable K-Map
4. Eight Cell Possible Combination :
CD 01 11 10
CD 0000 AB 00 0100
AB 00 01 11 10 0001 0101
0010 00 0110
1 1 1 1 0011 0111
00
0100 1 1 1 1 1100
0101 01
01 1 1 1 1 1101
0110 1111
0111 11
1 1 1 1 1110
11 ---------- ----------
0XXX X1XX
10
10
Y=A Y=B

CD 01 10 1100
CD 01 11 10 0000
AB 00 11 AB 00
1101 0001
1111 1 1 1 1 0011
00 00 0010
1110
1000 1000
01 1001 01 1001
1010 1010
1 1 1 1 1011 1011
11 11 ----------
----------
1XXX X0XX
10 1 1 1 1 10 1 1 1 1
Y=A Y=B
4-Variable K-Map
4. Eight Cell Possible Combination :
CD 0001
CD 0000 AB 00 01 11 10 0011
AB 00 01 11 10 0001 0101
0100 1 1 0111
1 1 0101
00
00 1101
1100 1111
1101 01 1 1
01 1 1 1001
1000 1011
1001
11
1 1 ----------
11
1 1 ---------- XXX1
XX0X
10 1 1
10 1 1
Y=D
Y=C
CD 0011 CD 0000
AB 00 01 11 10 0010 AB 00 01 11 10 0010
0111 0100
1 1 0110 1 1 0110
00 00
1111 1100
1 1 1110 1 1 1110
01 1011 01 1000
1010 1010
11
1 1 ---------- 11
1 1 ----------
XX1X XXX0
10 1 1 10 1 1
Y=C
Y=D
4-Variable K-Map
4. Eight Cell Possible Combination :

0000
0000 0001
0100 CD 0011
CD 1100 AB 00 01 11 10 0010
AB 00 01 11 10 1000
1000
0010 1 1 1 1 1001
1 1 00
1011
00 0110
1110 1010
1 1 1010 01 ---------
01 X0XX
---------
XXX0 11
11
1 1
10 1 1 1 1 Y=B
10 1 1
Y=D
4-Variable K-Map
4. Four Cell Possible Combination :
0011 1100
CD
CD AB 00 01 11 10 0010 1101
AB 00 01 11 10 0111 1000
0000 1111 1 1 0110 1001
1 1 00
--------- ----------
00 0001 1110
0100 1011 0X1X 1X0X
01 1 1
01 1 1 0101 1010
--------- ----------
0X0X 1X1X 11
1 1
11
1 1
10 1 1 Y = AC + AC
10 1 1
Y = AC + AC
CD 0101 0000
CD
00 01 11 10 AB 00 01 11 10
AB 0111 0001 0101 0011
1101 0111 0010
0100 1 1
00 1111 0101 00 1101 0111
--------- --------- 1111 0110
1 1 X1X1 0X0X 01 1 1 1 --------- ---------
01 X1X1 0X1X

1 1 1 11
1 1
11

10 1 1 10
Y = AC + BD Y = AC + BD
4-Variable K-Map
4. Four Cell Possible Combination :
0000 1100
CD
CD AB 00 01 11 10 0100 1101
AB 00 01 11 10 0010 1000
0000 1111 1 1 0110 1001
1 1 00
--------- ----------
00 0001 1110
0100 1011 0XX0 1X0X
01 1 1
0101 1010
01
--------- ----------
0X0X 1X1X 11
1 1
11
1 1
10 1 1 Y = AD + AC
10 1 1 1 1
Y = AC + AC
CD 0000 0101 CD
00 01 11 10 AB 00 01 11 10 0000 1101
AB 0010 0111
0100 1111
1000 1101 1 1
1 1 00 0010 1001
00 1010 1111
0110 1011
--------- ---------
1 1 --------- ----------
01 1 1 X0X0 X1X1 01 1XX1
0XX0

1 1 11
1 1
11

10 1 1 10 1 1
Y = BD + BD Y = AD + AD
4-Variable K-Map
4. Four Cell Possible Combination :
0100 1000
CD
CD AB 00 01 11 10 0101 1001
AB 00 01 11 10 0111 1011
0000 1100 0110 1010
1 1 1 1 00
--------- ----------
00 0001 1101
0011 1110 01XX 10XX
01 1 1 1 1
0010 1111
01
--------- ----------
00XX 11XX 11
11
1 1 1 1
10 1 1 1 1 Y = AB + AB
10
Y = AB + AB
CD 0000 0011
CD
00 01 11 10 AB 00 01 11 10
AB 0100 0111 0001 0010
1100 0101 0110
1 1 1111 1 1
00 1000 1011 00 1101 1110
--------- --------- 1001 1010
1 1 XX00 XX11 01 1 1 --------- ---------
01 XX01 XX10

1 1 11
1 1
11

10 1 1 10 1 1
Y = CD + CD Y = CD + CD
4-Variable K-Map
4. Four Cell Possible Combination :

CD 0000 CD
00 01 11 10 0000 AB 00 01 11 10
AB 0100 0001 0001 1000
1100 0011 1 0101 1001
1 1 1 1 00 1101 1011
00 1000 0010
--------- --------- 1001 1010
1 XX00 00XX 01 1 --------- ----------
01 XX01 10XX

1 11
1
11

10 1 10 1 1 1 1
Y = CD + AB Y = CD + AB
4-Variable K-Map
4. Two Cell Possible Combination :
0101 1100
CD
CD AB 00 01 11 10 1101 1101
AB 00 01 11 10 --------- ----------
0000 0111 X101 110X
1 1 00
00 0001 0110
--------- ---------- 1
1 1 000X 011X 01
01

11
1 1
11
10 Y = BCD + ABC
10
Y = ABC + ABC
CD 0011 0000
CD
00 01 11 10 AB 00 01 11 10 0000 0011
AB 1011 1000
0001 0111
1 1 --------- --------- 1 1 1 1 ---------
00 00 0011
X011 X000 0X11
0010
1 ---------
01 01 00XX 0011
1011
11 11 ---------
X011
10 1 1 10 1
Y = BCD + BCD Y = AB + ACD + BCD
4-Variable K-Map
4. One Cell Combination :

CD
AB 00 01 11 10

1
00

01

11
1 1

10

Y = ABCD + ABCD + ABCD


K-Map Minimization Procedure (SOP Form):

Step 1 : Identify the Given Expression contain all Variables. In not find canonical
SOP of the given Expression
Step 2 : Identify the Total Number of Input Variable given in the Expression
Step 3 : Construct K-Map as per the Input Variable
Step 4 : Place the Inputs into K-Map by Place 1 in SOP Form
Step 5 : Start Combine from Highest Order. ie. If its 4 Variable K-Map, then Check
its possible to combine 16 Cells first, then 8 Cells, then 4 Cells, then 2 Cells
& then 1 Cells.
Step 6 : add all the minimized terms
Step 7 : Draw Logic Diagram if Required
Example 1 : Simplify the following Expression : F(A,B) = AB + AB + AB using K-Map

Solution:

Step1 : Identify the Total Input Variables and Construct K-Map


Total Input Variables = 2
Therefore its 2-Variable K-Map

Step2: Place the Inputs into K-Map Step3: Check 4 Cells Combination. If 4 Cell Combination not
possible then check 2 Cell Combination
B 0 1
A B 0 1
A
0 1 1 AB AB
0 1 1
00 01
1 1 01 11
1 1
0X X1

Output : Y = A + B
Example 2 : Simplify the following Expression : F(A,B) = AB + A + B using K-Map

Solution:

Step1 : Find Canonical SOP for the above expression


F(A,B) = AB + A + B
= AB + A (B+B) + B (A+A)
= AB + AB +AB +AB +AB
= AB + AB +AB

Step2 : Identify the Total Input Variables and Construct K-Map


B
Total Input Variables = 2
Therefore its 2-Variable K-Map

Step2: Place the Inputs into K-Map Step3: Check 4 Cells Combination. If 4 Cell Combination not
B possible then check 2 Cell Combination
A 0 1 0 1
A AB AB
0 1 1 1 1 00 01
0
01 11 Output : Y = A + B
1 1 1
1
0X X1
Example 3 : Simplify the following Expression using K-Map Method
Y = m0 + m3 + m4 + m6 + m7

Solution:

Step1 : Identify the Total Input Variables and Construct K-Map


m0 = 000 = A B C
Given upto 7. So there are 3 Inputs
m3 = 011 = A B C
Total Input Variables = 3
m4 = 100 = A B C
Therefore its 3-Variable K-Map
m6 = 110 = A B C
m7 = 111 = A B C
Step2: Place the Inputs into K-Map .

BC
00 01 11 10
A
0 1 1

1 1 1 1
Step 3 : Check 8 Cells Combination. If 8 Cell Combination not possible then check 4 Cell
Combination. If 4 Cell Combination not possible then check 2 Cell Combination. Group 2
Cells. Check any cells are not possible to combine, if so represent as 1 Cells.

BC
00 01 11 10
A 000 011 111
0 1 1 100 111 110
------- ------- -------
1 1 1 1
X00 X11 11X

Y = BC + BC + AB
Example 4 : Simplify the following Expression using K-Map Method

X = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD

Solution:

Step1 : Identify the Total Input Variables and Construct K-Map


Total Input Variables = 4
Therefore its 4-Variable K-Map

Step2: Place the Inputs into K-Map

CD 01 11 10
00
AB
1
00

01 1 1

11
1 1

10 1 1
Step 3 : Check 16 Cells Combination. If 16 Cell Combination not possible then check 8 Cell Combination. If 8 Cell
Combination not possible then check 4 Cell Combination. Group 4 Cells. check any 2 Cell Combination
Check any cells are not possible to combine, if so represent as 1 Cells.

CD 01 11 10
00
AB
1 0101 1101
00 0111 1111
1101 1001
01 1 1 1111 1011
--------- ---------
1 1 X1X1 1XX1 0010
11

10 1 1

X = BD + AD + ABCD
Example 5 : Simplify the following Expression using K-Map Method

X = Σm(0, 2, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15)


Solution:

Step1 : Identify the Total Input Variables and Construct K-Map


Total Input Variables = 4
Therefore its 4-Variable K-Map

Step2: Place the Inputs into K-Map

CD 01 11 10
00
AB
1 1 1
00

01 1 1

11
1 1 1 1

10 1 1 1 1
Step 3 : Check 16 Cells Combination. If 16 Cell Combination not possible then check 8 Cell Combination. If 8 Cell
Combination not possible then check 4 Cell Combination. Group 4 Cells. check any 2 Cell Combination
Check any cells are not possible to combine, if so represent as 1 Cells.

CD 01 11 10
00
AB
1100
1 1 1
00 1101
1111
01 1 1 1110
1000 0101 0011 0000
1001 0111 0010 0010
11
1 1 1 1 1010 1101 1011 1000
1011 1111 1010 1010
10 1 1 1 1 ---------- --------- --------- ---------
1XXX X1X1 X01X X0X0

X = A + BD + BC + BD
Practice Examples (SOP Form)

1. Represent the given Input in K-Map in SOP Form


X = Σm (1,3)
X = Σm (0,2, 4, 6, 7)
X = Σm (1,4,5,7,9,10,13,14,15)

2. Simplify the Given Expression using K-Map: X = Σm (1, 2, 3)

3. Simplify the Given Expression using K-Map: X = Σm (0, 2, 4, 6, 7)

4. Simplify the Given Expression using K-Map: X = Σm (1, 2, 3, 6, 8, 9, 11, 13, 14)
X. (K-Map) - POS Form

Inputs Outputs X = 001 + 010 + 011 + 110 + 111


A B C X
X = ABC + ABC + ABC + ABC +ABC (SOP Form)
0 0 0 0
0 0 1 1 X = m1 + m2 + m3 + m6 + m7
0 1 0 1
0 1 1 0
X = 000 . 100 . 101
1 0 0 1
1 0 1 0 X = (A+B+C) (A+B+C) (A+B+C) (POS Form)
1 1 0 1
X = M0 . M4 . M5
1 1 1 1
Karnaugh Map (K-Map) (POS Form)
• Simplification of Expression using Boolean Algebra Method Becomes Complex if Input Variables
are 3 or More.
• K-Map Method used to overcome this Issue.
• In K-Map, Input Variables are Expressed in the form of SOP or POS Form.
• K-Map Tables are represented in the form of cells.
• Cells are filled by given Inputs Variables.
• If there is an n input Variables, then 2n Cells
Input Variables = 2 then Total Cells = 4 (22)
Input Variables = 3 then Total Cells = 8 (23)
Input Variables = 4 then Total Cells = 16 (24)
Input Variables = 5 then Total Cells = 32 (25)

• Cells are Combined by 16, 8, 4, 2 & 1. Cells cannot combined other than this Order
4 - Variable (A,B,C,D) K-Map
2-Variable (A,B) K-Map
A B CD 01 11 10
00
AB
B 0 1
A 0 0 0 1 3 2
00
0 0 1 0 1
1 0 01 4 5 7 6
1 2 3
1 1 12 13 15 14
11

10 8 9 11 10

3 - Variable (A,B,C) K-Map A BC AB CD AB CD

BC
11 10 0 00 00 00 10 00
00 01
A
0 01 00 01 10 01
0 0 1 3 2
0 10 00 10 10 10
1 4 5 7 6 0 11 00 11 10 11
1 00 01 00 11 00
1 01 01 01 11 01
1 10 01 10 11 10
1 11 01 11 11 11
5 - Variable (A,B,C,D, E) K-Map

DE 01 11 10
00
ABC
0 1 3 2
000

001 4 5 7 6

011
12 13 15 14

010 8 9 11 10

24 25 27 26
110

111 28 29 31 30

101 20 21 23 22

100 16 17 19 18
2 – Variable K-Map
1. Identify the Total Input Variables and Construct the K-Map
Ex: Y = (A+B) . (A+B) . (A+B)
= 10 . 01 . 11
Total input Variables = 2, then Construct 2 Variable K-Map
B 0 1
A
0 0 1

1 2 3

2. Place 0 as per the above Inputs


B 0 1
A
0 0

1 0 0
2 – Variable K-Map
3. All Cell Combination on 2-Variable K-Map:

B 0 1
A X = (A+B) . (A+B) . (A+B) . (A+B)
0 0 0
= (AA + AB + AB + BB) (AA +AB + AB +BB) [BB = 0] [AA = A]
1 0 0
= (A + AB + AB + 0) (A + AB + AB + 0) [Take A and A outside]

= A (1 + B + B) A(1 + B + B) [1 + A = 1]
Y=0 = (A . 1) (A .1)

=A.A

=0

Note: POS Form


For 2 Variables, 3 Variables, 4 Variables, etc if all cells are occupied with 0 means the Output also 0
2 – Variable K-Map
4. Two Cell Possible Combinations on 2-Variable K-Map:

B 0 1 B
A A 0 1
AB AB
0 0 0 0 0
00 00
01 10 NOTE:
1 1 0
0X X0 Check A Column has all are 0 or 1:
Output : Y = A Output : Y = B
If A Column has only 0 then it’s A

B B If A Column has only 1 then it’s A


A 0 1 0 1
A
AB AB
0 0 0 If A Column has both 0 and 1 then ignore it
10 01
0 0 11 11
1 1 0
1X X1
Output : Y = A Output : Y = B
2 – Variable K-Map
5. Two Cell Possible Combinations on 2-Variable K-Map:

B 0 1 NOTE:
A
0 0 AB AB
0 Check A Column has all are 0 or 1:
00 01
1 0 01 11
If A Column has only 0 then it’s A
0X X1
If A Column has only 1 then it’s A
Output : Y = A . B
If A Column has both 0 and 1 then ignore it
2 – Variable K-Map
4. One Cell Combinations on 2-Variable K-Map:

B 0 1 B
A A 0 1
0 0 0
0
NOTE:
1 1
It is not possible to group with only 1 Cells
Output : Y = A + B Output : Y =A + B So write as it is without Simplification.

B 0 1 B
A A 0 1

0 0

1 0 1 0

Output : Y = A + B Output : Y = A + B
3-Variable K-Map
1. Identify the Total Input Variables and Construct the K-Map
Ex: Y = (A+B+C) . (A+B+C) . (A+B+C) . (A+B+C) . (A+B+C)
= 010 . 000 . 101 . 100 . 011
Total input Variables = 3, then Construct 3 Variable K-Map
BC
00 01 11 10
A
0

2. Place 0 as per the above Inputs


BC
00 01 11 10
A
0 0 0 0

1 0 0
3-Variable K-Map
3. All Cell Combination: Output is 0
3-Variable (A,B,C) K-Map

BC
00 01 11 10
A
0 0 0 0 0

1 0 0 0 0

Y=0
3-Variable K-Map
4. Four Cell Possible Combinations
000
BC
11 10
BC
11 10 001
A
00 01 001 A
00 01
011
0 0 100 0 0
0 0 101
101
111
1 0 0 ------- 1 0 0
-------
X0X
XX1

Y=B Y=C

011 BC 000
BC 11 10
00 01 11 10 010 00 01
A A 100
0 0 111 0 0 010
0 0
110 110
1 0 0 ------- 1 0 0 -------
X1X XX0

Y=B Y=C
3-Variable K-Map
4. Four Cell Possible Combinations
000 BC
BC 00 01 11 10 100
00 01 11 10 001 A
A
010 101
0 0 0 0 0 0
011 110
------- 1 0 0 0 0 111
1
0XX -------
1XX
Y=A Y=A

011 000 000 000


BC 010 100 BC
11 10 001 010
00 01 11 10 00 01
A 111 010 A
100 100
0 0 0 110 110 0 0 0 0
0 101 110
------- ------- ------- -------
1 0 0 0 X1X XX0 1 0 0 0
X0X XX0

Y=B.C Y=B.C
3-Variable K-Map
5. Two Cell Possible Combinations
000 011
001 010
BC BC
00 01 11 10 ------- 00 01 11 10 -------
A A
0 0 00X 0 0 01X
0 0

1 0 0 111 1 0 0 100
110 101
------- -------
Y = (A+B) . (A+B) 11X Y = (A+B) . (A+B) 10X

111 111
BC 110 BC 110
00 01 11 10 00 01 11 10
A ------- A -------
0 0 0 11X 0 11X

1 0 0 1 0 0 0
000 100
010 110
------- -------
Y = (A+C) . (A+B) Y = (A+C) . (A+B) 1X0
0X0
3-Variable K-Map
6. One Cell Combinations

BC BC
00 01 11 10 00 01 11 10
A A
0 0 0 0 011
0 0 010
1 0 0 1 0 -------
01X

Y = (A+B+C) . (A+B+C) . (A+B+C) Y = (A+B+C) . (A+B+C) . (A+B)


4-Variable K-Map
1. Identify the Total Input Variables and Construct the K- 2. Place the 0 on K-Map Table as per the
Map Inputs
Ex: Y = (A+B+C+D) . (A+B+C+D) . (A+B+C+D)
= 0101 . 0010 . 0100
Total input Variables = 4, then Construct 4 Variable K- Map CD 01 11 10
00
AB
0
00

CD 01 0 0
00 01 11 10
AB
00 11

10
01

11

10
4-Variable K-Map

3. All Cell Combination : Output is 1

CD
AB 00 01 11 10

0 0 0 0
00

01 0 0 0 0

11
0 0 0 0

10 0 0 0 0

Y=0
4-Variable K-Map
4. Eight Cell Possible Combination :
CD 01 11 10
CD 0000 AB 00 0100
AB 00 01 11 10 0001 0101
0010 00 0110
0 0 0 0 0011 0111
00
0100 0 0 0 0 1100
0101 01
01 0 0 0 0 1101
0110 1111
0111 11
0 0 0 0 1110
11 ---------- ----------
0XXX X1XX
10
10
Y=A Y=B

CD 01 10 1100
CD 01 11 10 0000
AB 00 11 AB 00
1101 0001
1111 0 0 0 0 0011
00 00 0010
1110
1000 1000
01 1001 01 1001
1010 1010
0 0 0 0 1011 1011
11 11 ----------
----------
1XXX X0XX
10 0 0 0 0 10 0 0 0 0
Y=A Y=B
4-Variable K-Map
4. Eight Cell Possible Combination :
CD 0001
CD 0000 AB 00 01 11 10 0011
AB 00 01 11 10 0001 0101
0100 0 0 0111
0 0 0101
00
00 1101
1100 1111
1101 01 0 0
01 0 0 1001
1000 1011
1001
11
0 0 ----------
11
0 0 ---------- XXX1
XX0X
10 0 0
10 0 0
Y=D
Y=C
CD 0011 CD 0000
AB 00 01 11 10 0010 AB 00 01 11 10 0010
0111 0100
0 0 0110 0 0 0110
00 00
1111 1100
0 0 1110 0 0 1110
01 1011 01 1000
1010 1010
11
0 0 ---------- 11
0 0 ----------
XX1X XXX0
10 0 0 10 0 0
Y=C
Y=D
4-Variable K-Map
4. Eight Cell Possible Combination :
CD
CD AB 00 01 11 10
AB 00 01 11 10
0 0 0 0
0 0 00
00

0 0 01
01

0 0 11
11
10 0 0 0 0
10 0 0

0000
0000 0001
0100 0011
1100 0010
1000 1000
0010 Y=D 1001 Y=B
0110 1011
1110 1010
1010 ---------
--------- X0XX
XXX0
4-Variable K-Map
4. Four Cell Possible Combination :
0011 1100
CD
CD AB 00 01 11 10 0010 1101
AB 00 01 11 10 0111 1000
0000 1111 0 0 0110 1001
0 0 00
--------- ----------
00 0001 1110
0100 1011 0X1X 1X0X
01 0 0
01 0 0 0101 1010
--------- ----------
0X0X 1X1X 11
0 0
11
0 0
10 0 0 Y = (A+C) . (A+C)
10 0 0
Y = (A+C) . (A+C)

CD 0101 0000
CD
00 01 11 10 AB 00 01 11 10
AB 0111 0001 0101 0011
1101 0111 0010
0100 0 0
00 1111 0101 00 1101 0111
--------- --------- 1111 0110
0 0 X1X1 0X0X 01 0 0 0 --------- ---------
01 X1X1 0X1X

0 0 0 11
0 0
11

10 0 0 10
Y = (A+C) . (B+D) Y = (A+C) . (B+D)
4-Variable K-Map
4. Four Cell Possible Combination :
0000 1100
CD
CD AB 00 01 11 10 0100 1101
AB 00 01 11 10 0010 1000
0000 1111 0 0 0110 1001
0 0 00
--------- ----------
00 0001 1110
0100 1011 0XX0 1X0X
01 0 0
0101 1010
01
--------- ----------
0X0X 1X1X 11
0 0
11
0 0
10 0 0 Y = (A+D) . (A+C)
10 0 0 0 0
Y = (A+C) . (A+C)

CD 0000 0101 CD
00 01 11 10 AB 00 01 11 10 0000 1101
AB 0010 0111
0100 1111
1000 1101 0 0
0 0 00 0010 1001
00 1010 1111
0110 1011
--------- ---------
0 0 --------- ----------
01 0 0 X0X0 X1X1 01 1XX1
0XX0

0 0 11
0 0
11

10 0 0 10 0 0
Y = (B+D) . (B+D) Y = (A+D) . (A+D)
4-Variable K-Map
4. Four Cell Possible Combination :
0100 1000
CD
CD AB 00 01 11 10 0101 1001
AB 00 01 11 10 0111 1011
0000 1100 0110 1010
0 0 0 0 00
--------- ----------
00 0001 1101
0011 1110 01XX 10XX
01 0 0 0 0
0010 1111
01
--------- ----------
00XX 11XX 11
11
0 0 0 0
10 0 0 0 0 Y = (A+B) . (A+B)
10
Y = (A+B) . (A+B)

CD 0000 0011
CD
00 01 11 10 AB 00 01 11 10
AB 0100 0111 0001 0010
1100 0101 0110
0 0 1111 0 0
00 1000 1011 00 1101 1110
--------- --------- 1001 1010
0 0 XX00 XX11 01 0 0 --------- ---------
01 XX01 XX10

0 0 11
0 0
11

10 0 0 10 0 0
Y = (C+D) . (C+D) Y = (C+D) . (C+D)
4-Variable K-Map

4. Four Cell Possible Combination :

CD 0000 CD
00 01 11 10 0000 AB 00 01 11 10
AB 0100 0001 0001 1000
1100 0011 0 0101 1001
0 0 0 0 00 1101 1011
00 1000 0010
--------- --------- 1001 1010
0 XX00 00XX 01 0 --------- ----------
01 XX01 10XX

0 11
0
11

10 0 10 0 0 0 0
Y = (C+D) . (A+B) Y = (C+D) . (A+B)
4-Variable K-Map
4. Two Cell Possible Combination :
0101 1100
CD
CD AB 00 01 11 10 1101 1101
AB 00 01 11 10 --------- ----------
0000 0111 X101 110X
0 0 00
00 0001 0110
--------- ---------- 0
0 0 000X 011X 01
01 Y = (B+C+D) .
11
0 0 (A+B+C)
11 Y=
(A+B+C)
10
10 .
(A+B+C)
CD 0011 0000
CD
00 01 11 10 AB 00 01 11 10 0000 0011
AB 1011 1000
0001 0111
0 0 --------- --------- 0 0 0 0 ---------
00 00 0011
X011 X000 0X11
0010
0 ---------
01 01 00XX 0011
1011
11 Y = (B+C+D) . 11 ---------
X011
(B+C+D)
10 0 0 10 0 Y = (A+B) .
(A+C+D) .
(B+C+D)
4-Variable K-Map
4. One Cell Combination :

CD
AB 00 01 11 10

0
00

01

11
0 0

10

Y = (A+B+C+D) . (A+B+C+D) . (A+B+C+D)


K-Map Minimization Procedure (POS Form):

Step 1 : Identify the Given Expression contain all Variables. In not find canonical
POS of the given Expression
Step 2 : Identify the Total Number of Input Variable given in the Expression
Step 3 : Construct K-Map as per the Input Variable
Step 4 : Place the Inputs into K-Map by Place 0 in POS Form
Step 5 : Start Combine from Highest Order. ie. If its 4 Variable K-Map, then Check
its possible to combine 16 Cells first, then 8 Cells, then 4 Cells, then 2 Cells
& then 1 Cells.
Step 6 : Multiply all the minimized terms
Step 7 : Draw AOI Logic Diagram and NOR Logic Diagram if Required
Example 1 : Simplify the following Expression : F(A,B) = (A+B) . (A+B) . (A+B) using K-Map

Solution:

Step1 : Identify the Total Input Variables and Construct K-Map


Total Input Variables = 2
Therefore its 2-Variable K-Map

Step2: Place the Inputs into K-Map Step3: Check 4 Cells Combination. If 4 Cell Combination not
possible then check 2 Cell Combination
B 0 1
A B 0 1
A
0 0 0 AB AB
0 0 0
00 01
1 0 01 11
1 0
0X X1

Output : Y = A . B
Example 2 : Simplify the following Expression : F(A,B) = (A+B) . A using K-Map

Solution:

Step1 : Find Canonical SOP for the above expression


F(A,B) = (A+B) . A
= (A+B) . (A + BB) [BB = 0] [A+BC = (A+B) (A+C)]
= (A+B) . (A+B) . (A+B) [A . A = A]
= (A+B) (A+B)

Step2 : Identify the Total Input Variables and Construct K-Map


Total Input Variables = 2
Therefore its 2-Variable K-Map

Step2: Place the Inputs into K-Map Step3: Check 4 Cells Combination. If 4 Cell Combination not
B possible then check 2 Cell Combination
A 0 1 B 0 1
A AB
0 0 10
11 F(A,B) = A
1 0 0 0 0
1
1X
Example 3 : Simplify the following Expression using K-Map Method
Y = M0 . M3 . M4 . M6 . M7

Solution:

Step1 : Identify the Total Input Variables and Construct K-Map


M0 = 000 = A+B+C
Given upto 7. So there are 3 Inputs
M3 = 011 = A+B+C
Total Input Variables = 3
M4 = 100 = A+B+C
Therefore its 3-Variable K-Map
M6 = 110 = A+B+C
M7 = 111 = A+B+C
Step2: Place the Inputs into K-Map .

BC
00 01 11 10
A
0 0 0

1 0 0 0
Step 3 : Check 8 Cells Combination. If 8 Cell Combination not possible then check 4 Cell
Combination. If 4 Cell Combination not possible then check 2 Cell Combination. Group 2
Cells. Check any cells are not possible to combine, if so represent as 1 Cells.

BC
00 01 11 10
A 000 011 111
0 0 0 100 111 110
------- ------- -------
1 0 0 0
X00 X11 11X

Y = (B+C) . (B+C) . (A+B)


Example 4 : Simplify the following Expression using K-Map Method

X = (A+B+C+D) . (A+B+C+D) . (A+B+C+D) . (A+B+C+D) . (A+B+C+D) . (A+B+C+D) . (A+B+C+D)

Solution:
X = 1110 . 0100 . 1101 . 0010 . 1000 . 0001 . 0000

Step1 : Identify the Total Input Variables and Construct K-Map


Total Input Variables = 4
Therefore its 4-Variable K-Map

Step2: Place the Inputs into K-Map


CD 01 11 10
00
AB
0 0 0
00

01 0

11
0 0

10 0
Step 3 : Check 16 Cells Combination. If 16 Cell Combination not possible then check 8 Cell Combination. If 8 Cell
Combination not possible then check 4 Cell Combination. Group 4 Cells. check any 2 Cell Combination
Check any cells are not possible to combine, if so represent as 1 Cells.

CD 01 11 10
00
AB
0 0 0 0000 0000 0000 0000
00 0001 0100 1000 0010
--------- --------- --------- ---------
01 0 000X 0X00 X000 00X0 1101 1110

11
0 0

10 0

X = (A+B+C)(A+C+D)(B+C+D)(A+B+D)(A+B+C+D)(A+B+C+D)
Example 5 : Simplify the following Expression using K-Map Method

X = ΠM(0, 2, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15)


Solution:

Step1 : Identify the Total Input Variables and Construct K-Map


Total Input Variables = 4
Therefore its 4-Variable K-Map

Step2: Place the Inputs into K-Map

CD 01 11 10
00
AB
0 0 0
00

01 0 0

11
0 0 0 0

10 0 0 0 0
Step 3 : Check 16 Cells Combination. If 16 Cell Combination not possible then check 8 Cell Combination. If 8 Cell
Combination not possible then check 4 Cell Combination. Group 4 Cells. check any 2 Cell Combination
Check any cells are not possible to combine, if so represent as 1 Cells.

CD 01 11 10
00
AB
1100
0 0 0 0
00 1101
1111
01 0 0 0 0 1110
1000 0101 0011 0000
1001 0111 0010 0010
11
0 0 0 0 1010 1101 1011 1000
1011 1111 1010 1010
10 0 0 0 0 ---------- --------- --------- ---------
1XXX X1X1 X01X X0X0

X = A . (B+D) . (B+C) . (B+D)


Practice Examples (SOP Form)

1. Represent the given Input in K-Map in POS Form


X = ΠM (1,3)
X = ΠM (0,2, 4, 6, 7)
X = ΠM (1,4,5,7,9,10,13,14,15)

2. Simplify the Given Expression using K-Map: X = ΠM (1, 2, 3)

3. Simplify the Given Expression using K-Map: X = ΠM (0, 2, 4, 6, 7)

4. Simplify the Given Expression using K-Map: X = ΠM (1, 2, 3, 6, 8, 9, 11, 13, 14)
XI. Don't Care Conditions
• There may be a set of input values that will never occur, but if they do, the output is unimportant.
• A don't care is the function value for such combinations.
• They are marked by the letters x or –.
• In an implementation, the value 0 or 1 can be assigned to each x.
• Don't cares can be used to make a function even more simple.
• Examples 1 : Excess-3 Code has 6 Invalid Code (0000, 0001, 0010, 1101, 1110,1111)
• Examples 2 : BCD Code (8421) has 6 Invalid Code (1010, 1011, 1100, 1101, 1110,1111)

• Don’t Care Codes are act as supporting terms for minimization


• SOP Form Don’t Care Symbol: Σd
• POS Form Don’t Care Symbol: Πd
Minimization using Don’t Cares (SOP Form)

• Example : Σd (1, 4, 7, 9, 11, 15)

CD
AB 00 01 11 10

X
00

01 X X

11
X

10 X X
Example: Represent Σm(0,2,3,5,6,8) + Σd(1, 4, 7, 9, 11, 15) in K-Map

CD
AB 00 01 11 10

1 X 1 1
00

01 X 1 X 1

11
X

10 1 X X
Example: Minimize Σm(0,2,3,5,6,8) + Σd(1, 4, 7, 9, 11, 15) Using K-Map

CD 0000 0000
AB 00 01 11 10 0001 0001
0010 1000
1 X 1 1 0011 1001
00
0100 ----------
X 1 X 1 0101 X00X
01 0110
0111
11
X ----------
0XXX
10 1 X X

OUTPUT = A + BC
Minimization using Don’t Cares (POS Form)

• Example : Πd (1, 4, 7, 9, 11, 15)

CD
AB 00 01 11 10

X
00

01 X X

11
X

10 X X
Example: Represent ΠM(0,2,3,5,6,8) . Πd(1, 4, 7, 9, 11, 15) in K-Map

CD
AB 00 01 11 10

0 X 0 0
00

01 X 0 X 0

11
X

10 0 X X
Example: Minimize ΠM(0,2,3,5,6,8) . Πd(1, 4, 7, 9, 11, 15) Using K-Map

CD 0000 0000
AB 00 01 11 10 0001 0001
0010 1000
0 X 0 0 0011 1001
00
0100 ----------
X 0 X 0 0101 X00X
01 0110
0111
11
X ----------
0XXX
10 0 X X

OUTPUT = A . (B+C)
Practice Examples

1. Represent the given Input in K-Map


X = ΠM (1,3) + Πd(0)
X = Σd(1,3, 6, 7) + Σd(2, 5)
X = Σd(1,4,5,7,9,10,13,14,15) + Σd(2, 8, 12)

2. Simplify the Given Expression using K-Map: X = Σd(1,4,5,7,9,10,13,14,15) + Σd(2, 8, 12)

3. Simplify the Given Expression using K-Map: X = ΠM (1,4,5,7,9,10,13,14,15) + Πd(2, 8, 12)

4. Simplify the Given Expression using K-Map: X = ΠM (1,3) + Πd(0)

5. Simplify the Given Expression using K-Map: X = Σd(1,3, 6, 7) + Σd(2, 5)


Quine McCluskey Method
• K-map method, which is a convenient method for
minimizing Boolean functions up to 4 variables. But, it
is difficult to simplify the Boolean functions having
more than 4 variables.
• Quine-McCluskey method used to minimize more than
4 Variables
• Quine-McCluskey method is a tabular method based
on the concept of prime implicants.
PROCEDURE
Step 1 − Arrange the Given Minterms in Ascending Order and represent the given minterms into Binary and
find total No of 1’s

Step 2 − Based on Total Number of 1’s make a Groups

Step 3 − Find Pairs: Combine Group 1 & 2, Group 2 & 3, Group 3 & 4 by Subtract from Group 2 – Group 1
and Group 3 – Group 2 and Group 4 – Group 3 and find the Valid Pairs by checking the remainders are 1, 2, 4,
8, 16, 32, 64, …. If any Pairs has other than these remainders then those Pairs are Invalid and Ignore. Place the
Valid Pairs with Remainder into Table. (Note: After making Pairs, Now Group has been reduced by 1).

Step 4 – Find Quads : Combine Pair Group 1 & 2, Pair Group 2 & 3 by same Remaining in Each Pairs Groups.
Check any Quads are Matching with other. If so Place the Particular Quads in to Table. Pairs in Group which are
not possible to combine means unable to minimize the term due to doesn’t has possibility to combine with
another Group pairs. Consider this also included in our results
PROCEDURE (Cont.)
Step 5 − Find Octets : Combine Quads Group 1 & 2 by same Remaining in Each Quads. Check any Quads
Group 1 are Matching with Quads Group 2. If so Place the Particular Octets in to Table along with remainder.
Quads or Octets with are not possible to combine means unable to minimize the term due to doesn’t has
possibility to combine with another Quads or Octets. Consider this should included in results.

Step 6 − Find the essential prime implicants by observing each column. If the min term is covered only by one

prime implicant, then it is essential prime implicant. Those essential prime implicants will be part of the

simplified Boolean function.

Step 7 − Reduce the prime implicant table by removing the row of each essential prime implicant and the

columns corresponding to the min terms that are covered in that essential prime implicant. Repeat step 5 for

Reduced prime implicant table. Stop this process when all min terms of given Boolean function are over.
Decimal (Minterms) Binary Total Number of Ones
0 0000 0
1 0001 1
2 0010 1
3 0011 2
Finding Total Number 4 0100 1
of 1’s 5 0101 2
6 0110 2
7 0111 3
8 1000 1
9 1001 2
10 1010 2
11 1011 3
12 1100 2
13 1101 3
14 1110 3
15 1111 4
Example 1: Simplify the Boolean Expression
f(W,X,Y,Z) = Σm (2, 6, 8, 9, 10, 11, 14, 15) using Tabular Method
Solution:

Given Binary Total No.


Min Terms of 1’s
2 0010 1
Step 1:
Arrange the Given Minterms in 6 0110 2
Ascending Order and represent given 8 1000 1
minterms into Binary and find total No
9 1001 2
of 1’s
10 1010 2
11 1011 3
14 1110 3
15 1111 4
Step 2: Based on Total Number of 1’s make a Group

If Total Number of 1’s is 0 means Group 0


If Total Number of 1’s is 1 means Group 1
If Total Number of 1’s is 2 means Group 2
If Total Number of 1’s is 3 means Group 3
If Total Number of 1’s is 4 means Group 4

Group Rearranged Binary Total No


Min Terms of 1’s
2 0010
1 8 1000 1

6 0110
2 9 1001 2

10 1010
11 1011
3 14 1110 3

4 15 1111 4
Step 3: Find Pairs: Combine Group 1 & 2, Group 2 & 3, Group 3 & 4 by Subtract from Group 2 – Group 1 and Group 3
– Group 2 and Group 4 – Group 3 and find the Valid Pairs by checking the remainders are 1, 2, 4, 8, 16, 32, 64, …. If any
Pairs has other than these remainders then those Pairs are Invalid and Ignore. Place the Valid Pairs with Remainder into
Table. (Note: After making Pairs, Now Group has been reduced by 1).
Combine Group 2 & 3
Group Rearranged Pairs Remaining
11 – 6 = 5 (invalid)
Min Terms 11 – 9 = 2 (Valid)
2 (2,6) (4) 11 – 10 = 1 (Valid)
1 8 (8,9) (1) 14 – 6 = 8 (Valid)
Combine Group 1 & 2 14 – 9 = 5 (invalid)
6 (2,10) (8) 14 – 10 = 4(Valid)
2 9 (8,10) (2) 6 – 2 = 4 (Valid)
6 – 8 = -2 (invalid)
10 (9,11) (2)
9 – 2 = 7 (Invalid) Combine Group 3 & 4
11 (10,11) (1) 9 – 8 = 1 (Valid)
3 14 (6,14) (8) 10 – 2 = 8 (Valid) 15 – 11 = 4 (Valid)
10 – 8 = 2 (Valid) 15 – 14 = 1 (Valid)
4 15 (10,14) (4)
(11,15) (4)
(14,15) (1)
Step 4: Find Quads: Combine Pair Group 1 & 2, Pair Group 2 & 3 by same Remaining in Each Pairs Groups. Check any
Quads are Matching with other. If so Place the Particular Quads in to Table. Pairs in Group which are not possible to
combine means unable to minimize the term due to doesn’t has possibility to combine with another Group pairs. Consider
this also included in our results
Combine Pair 1 & 2 Combine Pair 2 & 3
Group ` Rearranged Pairs Quads
Min Terms Remaining 1: Remaining 1:
(8,9,10,11) (10,11,14,15)
2 (2,6) (4) (8,9,10,11) (1,2) R Remaining 2:
1 8 (8,9) (1) (2,6,10,14) (4,8) Q (8,9,10,11) Remaining 2:
Remaining 4: Not Possible. Because Pair 3
6 (2,10) (8) (10,11,14,15) (1,4) P (2,6,10,14) Doesn’t have Remaining 2
2 9 (8,10) (2) Remaining 8:
(2,6,10,14) Remaining 4:
10 (9,11) (2) (10,11,14,15)
11 (10,11) (1)
Remaining 8:
3 14 (6,14) (8) Not Possible. Because Pair 3
Doesn’t have Remaining 8
4 15 (10,14) (4)
(11,15) (4)
(14,15) (1)
Step 5: Draw prime Implicants Charts and Identify the Essential and Non Essential Prime Implicants.

Min Term 2 6 8 9 10 11 14 15
Prime Implicants
P – (10,11,14,15) (1,4) X X X X

Q - (2,6,10,14) (4,8) X X X X

R - (8,9,10,11) (1,2) X X X X

P, Q, R are Essential Prime Implicants and there is No Non Essential Prime Implicants.
Therefore the minimized Expression is

P: Q: R:
1010 0010 1000
1011 0110 1001
1110 1010 1010
1111 1110 1011 X = AC + CD + AB
------- ------- -------
1X1X XX10 10XX
AC CD AB
Example 2 : Simplify the Boolean Expression
f(W,X,Y,Z) = Σm (1, 2, 3, 5, 6, 7, 8, 9, 12, 13, 15) using Tabular Method
Solution: Given Binary Total No.
Min Terms of 1’s
1 0001 1
2 0010 1
Step 1: 3 0011 2
Arrange the Given Minterms in 5 0101 2
Ascending Order and represent the 6 0110 2
given minterms into Binary and find 7 0111 3
total No of 1’s 8 1000 1
9 1001 2
12 1100 2
13 1101 3
15 1111 4
Step 2: Based on Total Number of 1’s make a Group Group Given Binary
Min Terms
If Total Number of 1’s is 0 means Group 0 1 0001
If Total Number of 1’s is 1 means Group 1 1
If Total Number of 1’s is 2 means Group 2 2 0010
If Total Number of 1’s is 3 means Group 3 8 1000
If Total Number of 1’s is 4 means Group 4
3 0011
5 0101
2 6 0110
9 1001
12 1100
7 0111
3 13 1101
4 15 1111
Step 3: Find Pairs: Combine Group 1 & 2, Group 2 & 3, Group 3 & 4 by Subtract from Group 2 – Group 1 and Group 3 – Group 2 and
Group 4 – Group 3 and find the Valid Pairs by checking the remainders are 1, 2, 4, 8, 16, 32, 64, …. If any Pairs has other than these
remainders then those Pairs are Invalid and Ignore. Place the Valid Pairs with Remainder into Table. (Note: After making Pairs, Now
Group has been reduced by 1).
Combine Group 2 & 3
Group Rearranged Min Pairs
Remaining Combine Group 1 & 2 7 - 3 = 4 (Valid)
Terms
1 (1,3) (2) 13 – 3 = 10 (Invalid)
3 – 1 = 2 (Valid)
1 2 (1,5) (4) 5 – 1 = 4 (Valid) 7 - 5 = 2 (Valid)
8 (1,9) (8) 6 – 1 = 5 (Invalid) 13 – 5 = 8 (Valid)
3 (2,3) (1) 9 – 1 = 8 (Valid)
12 – 1 = 11 (Invalid) 7 - 6 = 1 (Valid)
5 (2,6) (4)
13 – 6 = 7 (Invalid)
2 6 (8,9) (1) 3 – 2 = 1 (Valid)
9 (8,12) (4) 5 – 2 = 3 (InValid) 7 - 9 = -2 (Invalid)
12 (3,7) (4) 6 – 2 = 4 (Valid) 13 – 9 = 4 (Valid)
9 – 2 = 7 (InValid)
7 (5,7) (2)
3 12 – 2 = 10 (Invalid) 7 - 12 = -3 (Invalid)
13 (5,13) (8)
13 – 12 = 1 (Valid)
4 15 (6,7) (1) 3 – 8 = -5 (InValid)
(9,13) (4) 5 – 8 = -3 (InValid) Combine Group 3 & 4
(12,13) (1) 6 – 8 = -2 (InValid)
9 – 8 = 1 (Valid) 15 – 7 = 8 (Valid)
(7,15) (8) 15 – 13 = 2 (Valid)
12 – 8 = 4 (Valid)
(13,15) (2)
Step 4: Find Quads : Combine Pair Group 1 & 2, Pair Group 2 & 3 by same Remaining in Each Pairs Groups. Check any Quads are
Matching with other. If so Place the Particular Quads in to Table. Pairs in Group which are not possible to combine means unable to
minimize the term due to doesn’t has possibility to combine with another Group pairs. Consider this also included in our results

Group Rearranged Min Terms Pairs Quads


1 (1,3) (2) Combine Pair 1 & 2 Combine Pair 2 & 3
1 (2,3,6,7) (1,4)
2 (1,5) (4)
(8,9,12,13) (1,4) Remaining 1: Remaining 1:
8 (1,9) (8) (2,3,6,7) Not Possible. Because Pair 3
(1,3,5,7) (2,4) (2,3,12,13) Doesn’t have Remaining 1
3 (2,3) (1)
(1,5,9,13) (4,8) (6,7,8,9) Remaining 2:
5 (2,6) (4) (8,9,12,13) (5,7,13,15)
(5,7,13,15) (2,8)
2 6 (8,9) (1) Remaining 2: Remaining 4:
9 (8,12) (4) (1,3,5,7) Not Possible. Because Pair 3
Remaining 4: Doesn’t have Remaining 4
12 (3,7) (4) (1,3,5,7) Remaining 8:
7 (5,7) (2) (1,5,9,13) (5,7,13,15)
3 (2,3,6,7)
13 (5,13) (8) (2,6,9,13)
4 15 (6,7) (1) (3,7,8,12)
(9,13) (4) (8,9,12,13)
Remaining 8:
(12,13) (1) (1,5,9,13)
(7,15) (8)
(13,15) (2)
Step 5: Find Octets : Combine Quads Group 1 & 2 by same Remaining in Each Quads. Check any Quads Group 1 are Matching with
Quads Group 2. If so Place the Particular Octets in to Table along with remainder. Quads or Octets with are not possible to combine
means unable to minimize the term due to doesn’t has possibility to combine with another Quads or Octets. Consider this should
included in results.
Combine Quads 1 & 2
Group Rearranged Min Pairs Quads
Terms
Remaining (1,4):
1 (1,3) (2) (2,3,6,7) (1,4) T Not Possible to combine with
1 2 (1,5) (4) (8,9,12,13) (1,4) S Quad 2 because Remaining (1,4)
doesn’t have at Quad 2.
8 (1,9) (8) (1,3,5,7) (2,4) R Remaining (2,4):
3 (2,3) (1) (1,5,9,13) (4,8) Q Not Possible to combine with
(5,7,13,15) (2,8) P Quad 2 because Remaining (2,4)
5 (2,6) (4)
doesn’t have at Quad 2.
2 6 (8,9) (1) Remaining (4,8):
9 (8,12) (4) Not Possible to combine with
Quad 2 because Remaining (4,8)
12 (3,7) (4)
doesn’t have at Quad 2.
7 (5,7) (2) Remaining (2,8):
3 Not Possible to combine with
13 (5,13) (8)
Quad 1 because Remaining (2,8)
4 15 (6,7) (1) doesn’t have at Quad 1.
(9,13) (4)
(12,13) (1)
(7,15) (8)
(13,15) (2)
Step 6: Find the essential prime implicants by observing each column. If the min term is covered only by one prime
implicant, then it is essential prime implicant. Those essential prime implicants will be part of the simplified Boolean
function.
Min Term 1 2 3 5 6 7 8 9 12 13 15
Prime Implicants
P – (5,7,13,15) (2,8) X X X X

Q - (8,9,12,13) (1,4) X X X X
R - (2,3,6,7) (1,4) X X X X
S - (1,5,9,13) (4,8) X X X X

T – (1,3,5,7) (2,4) X X X X

P, Q,R are Essential Prime Implicants and S and T is an Non Essential Prime Implicants. Therefore the minimized Expression is
P: Q: R: S: T:
P+Q+R+S X = BD + AC + AC + CD
0101 1000 0010 0001 0001
0111 1001 0011 0101 0011
OR OR 1101 1100 0110 1001 0101
1111 1101 0111 1101 0111
P+Q+R+T X = BD + AC + AC + AD ------- ------- ------- ------- -------
X1X1 1X0X 0X1X XX01 0XX1
B D AC AC CD AD
Example 3: Using Tabular Method obtain the minimal expression for
f = Σm (6, 7, 8, 9) + Σd (10, 11, 12, 13, 14, 15)
using Tabular Method
Solution: Given Binary Total No.
Min Terms of 1’s
6 0110 2
7 0111 3
Step 1: 8 1000 1
Arrange the Given Minterms in 9 1001 2
Ascending Order and represent the 10 1010 2
given minterms into Binary and find 11 1011 3
total No of 1’s 12 1100 2
13 1101 3
14 1110 3
15 1111 4
Step 2: Based on Total Number of 1’s make a Group and
rearrange the minterms
Given Given Binary
If Total Number of 1’s is 0 means Group 0 Min Terms Min Terms
If Total Number of 1’s is 1 means Group 1 1 8 1000
If Total Number of 1’s is 2 means Group 2
If Total Number of 1’s is 3 means Group 3 6 0110
If Total Number of 1’s is 4 means Group 4 2 9 1001
10 1010
12 1100
7 0111
3 11 1011
13 1101
14 1110
4 15 1111
Step 3: Find Pairs: Combine Group 1 & 2, Group 2 & 3, Group 3 & 4 by Subtract from Group 2 – Group 1 and Group 3 – Group 2 and
Group 4 – Group 3 and find the Valid Pairs by checking the remainders are 1, 2, 4, 8, 16, 32, 64, …. If any Pairs has other than these
remainders then those Pairs are Invalid and Ignore. Place the Valid Pairs with Remainder into Table. (Note: After making Pairs, Now
Group has been reduced by 1).
Combine Group 2 & 3
Group Rearranged Min Terms Pairs
Remaining Combine Group 1 & 2
1 8 (8,9) (1) 7 – 6 = 1 (Valid)
2 6 (8,10) (2) 6 – 8 = -2 (Invalid) 7 – 9 = -2 (Invalid)
(8,12) (4) 9 – 8 = 1 (Valid) 7 – 10 = -3 (Invalid)
9
10 – 8 = 2 (Valid) 7 – 12 = -5 (Invalid)
10 (6,7) (1)
12 – 8 = 4 (Valid)
12 (9,11) (2) 11 – 6 = 5 (Invalid)
(10,11) (1) 11 – 9 = 2 (Valid)
7
11– 10 = 1 (Valid)
3 11 (9,13) (4) 11 – 12 = -1 (Invalid)
(12,13) (1)
Combine Group 3 & 4
13
(6,14) (8) 13 – 6 = 7 (Invalid)
14 15 – 7 = 8 (Valid) 13 – 9 = 4 (Valid)
4 15 (10,14) (4) 15 – 11 = 4 (Valid) 13 – 10 = 3 (Invalid)
(12,14) (2)
15 – 13 = 2 (Valid) 13 – 12 = 1 (Valid)
15 – 14 = 1 (Valid)
(7,15 (8)
14 – 6 = 8 (Valid)
(11,15) (4)
14 – 9 = 5 (Invalid)
(13,15) (2) 14 – 10 = 4 (Valid)
(14,15) (1) 14 – 12 = 2 (Valid)
Step 4: Find Quads : Combine Pair Group 1 & 2, Pair Group 2 & 3 by same Remaining in Each Pairs Groups. Check any Quads are
Matching with other. If so Place the Particular Quads in to Table. Pairs in Group which are not possible to combine means unable to
minimize the term due to doesn’t has possibility to combine with another Group pairs. Consider this also included in our results

Group Rearranged Min Terms Pairs Quads


1 8 (8,9) (1) (8,9,10,11) (1,2) Combine Pair 1 & 2 Combine Pair 2 & 3

2 6 (8,10) (2) (8,9,12,13) (1,4) Remaining 1: Remaining 1:


9 (8,12) (4) (8,10,12,14) (2,4) (6,7,8,9) (6,7,14,15)
(8,9,10,11) (10,11,14,15)
10 (6,7) (1) (6,7,14,15) (1,8)
(8,9,12,13) (12,13,14,15)
(9,11) (2) (10,11,14,15) (1,4) Remaining 2: Remaining 2:
12
(12,13,14,15) (1,2) (8,9,10,11) (9,11,13,15)
7 (10,11) (1) (8,10,12,14) (12,13,14,15)
(9,11,13,15) (2,4)
3 11 (9,13) (4) Remaining 4: Remaining 4:
(8,9,12,13) (9,11,13,15)
13 (12,13) (1) (8,10,12,14) (10,11,14,15)
14 (6,14) (8) Remaining 8: Remaining 8:
Not Possible. Because Pair 1 (6,7,14,15)
4 15 (10,14) (4) Doesn’t have Remaining 8
(12,14) (2)
(7,15 (8)
(11,15) (4)
(13,15) (2)
(14,15) (1)
Step 5: Find Octets : Combine Quads Group 1 & 2 by same Remaining in Each Quads. Check any Quads Group 1 are Matching with
Quads Group 2. If so Place the Particular Octets in to Table along with remainder. Quads or Octets with are not possible to combine
means unable to minimize the term due to doesn’t has possibility to combine with another Quads or Octets. Consider this should
included in results.
Group Rearranged Min Terms Pairs Quads Octets
1 8 (8,9) (1) (8,9,10,11) (1,2) (8,9,10,11,12,13,14,15) (1,2,4) P
2 6 (8,10) (2) (8,9,12,13) (1,4)
9 (8,12) (4) (8,10,12,14) (2,4)

10 (6,7) (1) (6,7,14,15) (1,8) Q Combine Quads 1 & 2

(9,11) (2) (10,11,14,15) (1,4)


12 Remaining (1,2):
(12,13,14,15) (1,2) (8,9,10,11,12,13,14,15) (1,2)
7 (10,11) (1)
(9,11,13,15) (2,4) Remaining (1,4):
3 11 (9,13) (4) (8,9,10,11,12,13,14,15) (1,4)
(12,13) (1) Remaining (2,4):
13
(8,9,10,11,12,13,14,15) (2,4)
14 (6,14) (8) Remaining (1,8):
(10,14) (4) Not possible. Because Quad
4 15
Group 1 doesnt have (1,8).
(12,14) (2)
(7,15 (8)
(11,15) (4)
(13,15) (2)
(14,15) (1)
Step 6: Find the essential prime implicants by observing each column. If the min term is covered only by one prime
implicant, then it is essential prime implicant. Those essential prime implicants will be part of the simplified Boolean
function.
Min Term 6 7 8 9 P: Q:
Prime Implicants
1000 0110
P – (8,9,10,11,12,13,14,15) (1,2,4) X X 1001 0111
1010 1110
Q - (6,7,14,15) (1,8) X X
1011 1111
1100 -------
1101 X11X
1110 BC
1111
-------
1XXX
A
P and Q are Essential Prime Implicants and there is No Non Essential Prime Implicants. Therefore the minimized Expression is
X = A + BC
Example 4: Using Tabular Method obtain the minimal expression for
f = Σm (1, 3, 4, 5, 9, 10, 11) + Σd (6, 8) using Tabular Method

Given Binary Total No.


Solution: Min Terms of 1’s
1 0001 1
3 0011 2
Step 1: 4 0100 1
Arrange the Given Minterms in 5 0101 2
Ascending Order and represent the 6 0110 2
given minterms into Binary and find 8 1000 1
total No of 1’s 9 1001 2
10 1010 2
11 1011 3
Step 2: Based on Total Number of 1’s make a Group and
rearrange the minterms
Given Given Binary
If Total Number of 1’s is 0 means Group 0 Min Terms Min Terms
If Total Number of 1’s is 1 means Group 1 1 0001
If Total Number of 1’s is 2 means Group 2
If Total Number of 1’s is 3 means Group 3 1 4 0100
If Total Number of 1’s is 4 means Group 4 8 1000
3 0011
5 0101
2 6 0110
9 1001
10 1010
3 11 1011
Step 3: Find Pairs: Combine Group 1 & 2, Group 2 & 3, Group 3 & 4 by Subtract from Group 2 – Group 1 and Group 3 – Group 2 and
Group 4 – Group 3 and find the Valid Pairs by checking the remainders are 1, 2, 4, 8, 16, 32, 64, …. If any Pairs has other than these
remainders then those Pairs are Invalid and Ignore. Place the Valid Pairs with Remainder into Table. (Note: After making Pairs, Now
Group has been reduced by 1).
Combine Group 1 & 2 Combine Group 2 & 3
Group Rearranged Min Terms Pairs
(1,3) (2)
Remaining
1 3 – 1 = 2 (Valid) 11 – 3 = 8 (Valid)
1 4 (1,5) (4) 3 – 4 = -1 (Invalid) 11 – 5 = 6 (Invalid)
(4,5) (1) 3 – 8 = -5 (Invalid) 11 – 6 = 5 (Invalid)
8
11 – 9 = 2 (Valid)
3 (4,6) (2) 5 – 1 = 4 (Valid) 11 – 10 = 1 (Valid)
5 (1,9) (8) 5 – 4 = 1 (Valid)
(8,9) (1) 5 – 8 = -3 (Invalid)
2 6
9 (8,10) (2) 6 – 1 = 5 (Invalid)
10 (3,11) (8) 6 – 4 = 2 (Valid)
(9,11) (2) 6 – 8 = -2 (Invalid)
3 11
(10,11) (1) 9 – 1 = 8 (Valid)
9 – 4 = 5 (Invalid)
9 – 8 = 1 (Valid)

10 – 1 = 9 (Invalid)
10 – 4 = 6 (Invalid)
10 – 8 = 2 (Valid)
Step 4: Find Quads : Combine Pair Group 1 & 2, Pair Group 2 & 3 by same Remaining in Each Pairs Groups. Check any Quads are
Matching with other. If so Place the Particular Quads in to Table. Pairs in Group which are not possible to combine means unable to
minimize the term due to doesn’t has possibility to combine with another Group pairs. Consider this also included in our results

Group Rearranged Min Terms Pairs Quads


Combine Pair 1 & 2
1 (1,3) (2) (8,9,10,11) (1,2) Q
1 4 (1,5) (4) R (1,3,9,11) (2,8) P Remaining 1:
(4,5,10,11)
8 (4,5) (1) (8,9,10,11)
3 (4,6) (2) Remaining 2:
(1,3,9,11)
5 (1,9) (8) (4,6,9,11)
2 6 (8,9) (1) (8,9,10,11)
Remaining 4:
9 (8,10) (2) Not Possible. Because Pair 1
10 (3,11) (8) Doesn’t have Remaining 8
Remaining 8:
3 11 (9,11) (2) (1,3,9,11)
(10,11) (1)
Step 5: Find the essential prime implicants by observing each column. If the min term is covered only by one prime
implicant, then it is essential prime implicant. Those essential prime implicants will be part of the simplified Boolean
function.
P: Q: R:
Min Term 1 3 4 5 9 10 11
Prime Implicants 0001 1000 0001
0011 1001 0101
P – (1,3,9,11) (2,8) X X X X
1001 1010 -------
Q - (8,9,10,11) (1,2) X X X 1011 1011 0X01
------- ------- ACD
R - (1,5) (4) X X
X0X1 10X
B D AB

P, Q and R are Essential Prime Implicants and there is No Non Essential Prime Implicants. Therefore the minimized Expression is
X = BD + AB +ACD
Practice Examples

1. Simplify the Given Expression using Quine McCluskey Method:


X = Σm(1,2,3,7,8,9,10,11,14,15)

2. Simplify the Given Expression using Tabular Method:


X = Σm(1,4,5,7,9,10,13,14,15) + Σd(2, 8, 12)

You might also like