0% found this document useful (0 votes)
5 views157 pages

Unit 3

The document outlines the syllabus for Unit 3 of Basic Electrical and Electronics Engineering at Noida Institute of Engineering and Technology, focusing on Logic Simplification and Binary Codes. It covers topics such as number systems, Boolean algebra, logic gates, and various binary codes, along with course outcomes and prerequisites. The unit aims to equip students with skills to verify logic operations and optimize logic functions.

Uploaded by

1212arcade
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)
5 views157 pages

Unit 3

The document outlines the syllabus for Unit 3 of Basic Electrical and Electronics Engineering at Noida Institute of Engineering and Technology, focusing on Logic Simplification and Binary Codes. It covers topics such as number systems, Boolean algebra, logic gates, and various binary codes, along with course outcomes and prerequisites. The unit aims to equip students with skills to verify logic operations and optimize logic functions.

Uploaded by

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

Noida Institute of Engineering and Technology, Greater Noida

Logic simplification and Binary codes

Unit: 3

Basic Electrical and


Electronics Engineering

B Tech, 1 st /2nd Sem.

Dr Amit Kumar Dash BEEE Unit 3 1


11/25/2024
SYLLABUS
8 hours
UNIT-3 Logic Simplification and Binary Codes

Number Systems, Complements of Numbers, Boolean Algebra, De Morgan’s Theorem, Logic Gates, SOP &
POS Forms, Canonical Forms, Karnaugh Maps up to 5 Variables, Multilevel NAND/NOR realizations, Binary
Codes.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 2


BRANCH WISE APPLICATION
BRANCH WISE APPLICATION

Dr Amit Kumar Dash BEEE


11/25/2024 3
Unit 3
COURSE OUTCOME
COURSE OUTCOMES

Course Outcomes: At the end of this course students will be able to

CO 3 Verify the logic operations and apply the K3


optimization techniques to implement logic
functions.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 4


CO-PO Mapping
CO-PO MAPPING

COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
3 3 2 - 3 2 - - - - - 3 2

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 5


PREQUISITE/RECAP

• Basics concept of arithmetic operations


• Basic of decimal number system

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 6


ABOUT SUBJECT

https://www.youtube.com/watch?v=BoIOLczVulQ
Dr Amit Kumar Dash BEEE
11/25/2024 7
Unit 3
UNIT CONTENT

• Number systems
• Complements of Numbers
• Binary Codes
• Parity check code
• Boolean Algebra
• Representation of Boolean expression in Canonical
form (SOP & POS)
• K-Map

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 8


UNIT OBJECTIVE
UNIT OBJECTIVE

UNIT OBJECTIVE

1 The student will learn about


• Different number systems and their
representation
• Introduction to binary codes
• Boolean algebra and logic gates
• Representation of Boolean functions
• K-Map

Dr Amit Kumar Dash BEEE


11/25/2024 9
Unit 3
TOPIC OBJECTIVE
TOPIC OBJECTIVE

TOPIC OBJECTIVE

Number The student will learn about:


systems • Different number systems and their
representation
• Conversion of number from one to another
• Applications

Dr Amit Kumar Dash BEEE


11/25/2024 10
Unit 3
INTRODUCTION TO NUMBER SYSTEMS

• In digital electronics, the number system is used for representing the information.
• The number system has different bases and the most common of them are the
decimal, binary, octal, and hexadecimal.
• The base or radix of the number system is the total number of the digit used in
the number system.
• Suppose if the number system representing the digit from 0 – 9 then the base of
the system is the 10.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 11


NUMBER SYSTEMS

Types of Number Systems


Some of the important types of number system are:
• Decimal Number System
• Binary Number System
• Octal Number System
• Hexadecimal Number System

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 12


NUMBER SYSTEMS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 13


DECIMAL NUMBER SYSTEMS

• In general, a number expressed in base-r system has


coefficients multiplied by powers of r :

a n.rn + an-1.rn-1 + an-2.rn-2 +……..+ a2.r2 + a1.r + a0r0 +


a -1.r-1 + a-2.r-2 + ……….. + a-m.r-m

(4021.2)5 = 4 . 53 + 0 . 52 + 2 . 5' + 1 . 50 + 2 . 5-1 = (511.4)10


(B 65F)16 = 11 . 163 + 6 . 162 + 5 . 16 1 + 15 . 160 = (46687)10

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 14


BINARY NUMBER SYSTEMS

• The modern computers do not process decimal number;


they work with another number system known as a
binary number system which uses only two digits 0 and 1.
• The base of binary number system is 2 because it has only
two digit 0 and 1.
• The digital electronic equipment's are works on the
binary number system and hence the decimal number
system is converted into binary system.
• The table is shown below the decimal, binary, octal, and
hexadecimal numbers from 0 to 15 and their equivalent
binary number.
• (11010.11) 2 = 1 x 2 4 + 1 x 2 3 + 0 x 2 2 + 1 x 2 1 + 0 x 2 0 + 1 x 2 -1 + 1 x
2 -2 = (26.75)10

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 15


BINARY NUMBER SYSTEMS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 16


Binary to octal and hexadecimal
Binary to Octal and Hexadecimal Numbers:
The conversion from and to binary, octal, and hexadecimal
plays an important part in digital computers. Since 23 = 8 and
24 = 16, each octal digit corresponds to three binary digits and
each hexadecimal digit corresponds to four binary digits.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 17


Octal and hexadecimal to binary

Conversion from octal or hexadecimal to binary is done by a


procedure reverse to the above. Each octal digit is converted
to its three-digit binary equivalent. Similarly, each
hexadecimal digit is converted to its four-digit binary
equivalent. This is illustrated in the following examples:

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 18


CODE CONVERSION

Conversion among base:

Dr Amit Kumar Dash BEEE


11/25/2024 19
Unit 3
DECIMAL TO ANY BASE CONVERSION

Example : convert (52)10 to binary.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 20


DECIMAL TO ANY BASE CONVERSION

Example: Convert (163.875)10 to binary

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 21


DECIMAL TO ANY BASE CONVERSION

Example : Convert (378.93)10 to octal

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 22


ANY BASE TO DECIMAL CONVERSION:

BINARY TO DECIMAL CONVERSION:

• Multiply each bit by 2n,where n is “weight” of the bits


• The weight is the position of the bit starting form zero from right.
• Add the result
• Example :

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 23


ANY BASE TO DECIMAL CONVERSION:

OCTAL TO DECIMAL:
• multiplying each digit by 8n bits where n the weight of the
digits.
• the weight is the position of the digit starting from 0 on
the right
• add the result
• example:

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 24


ANY BASE TO DECIMAL CONVERSION:

HEXADECIMAL TO DECIMAL CONVERSION:


• Multiplying each digit by 16n bits where n the weight of
the digits.
• The weight is the position of the digit starting from 0 on
the right
• Add the result
• Example:

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 25


ANY BASE TO DECIMAL CONVERSION

Example : Convert (10101)2 to decimal.

Example : Convert (11011.101) 2 to decimal.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 26


SIGNED BINARY NUMBERS

• Positive integers including zero can be represented as


unsigned numbers. However, to represent negative
integers, we need a notation for negative values. In
ordinary arithmetic, a negative number is indicated by a
minus sign and a positive number by a plus sign. Because
of hardware limitations, computers must represent
everything with binary digits, commonly referred to as
bits.
• It is customary to represent the sign with a bit placed in
the leftmost position of the number. The convention is to
make the sign bit 0 for positive and 1 for negative.
• If the binary number is signed, then the leftmost bit
represents the sign and the rest of the bits represent the
number. If the binary number is assumed to be unsigned,
then the leftmost bit is the most significant bit of the
number.
11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 27
SIGNED BINARY NUMBERS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 28


SIGNED BINARY NUMBERS

• For example, the string of bits 01001 can be considered as


9 (unsigned binary) or a +9 (signed binary) because the
leftmost bit is 0. The string of bits 11001 represent the
binary equivalent of 25 when considered as an unsigned
number or as - 9 when considered as a signed number
because of the 1 in the leftmost position, which designates
negative, and the other 4 bits represents binary 9.
Example:
• In signed-magnitude representation: 10001001
• In signed-1's-complement representation: 11110110
• In signed-2's-complement representation: 11110111

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 29


ARITHMETIC ADDITION

Arithmetic operations with numbers in base r follow the


same rules as for decimal numbers.
Examples of addition, subtraction, and multiplication of two
binary numbers are as follows:

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 30


DAILY QUIZ

1. Find the binary equivalent of decimal number 0.3125.


2. Express the decimal number 13 as signed magnitude number in 1’s
complement notation.
3. Determine the decimal value of the octal fraction 0.325

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 31


TOPIC OBJECTIVE

TOPIC OBJECTIVE

Complement Student will learn about the signed binary


s of numbers and to find complements of numbers
Numbers

Dr Amit Kumar Dash BEEE


11/25/2024 32
Unit 3
COMPLEMENTS

• Complements are used in digital computers for simplifying


the subtraction operation and for logical manipulation.
• There are two types of complements for each base-r system:
the radix complement and the diminished radix
complement.
• The first is referred to as the r's complement and the second
as the (r - 1)'s complement. When the value of the base r is
substituted in the name, the two types are referred to as the
2's complement and l's complement for binary numbers,
and the 10's complement and 9's complement for decimal
numbers.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 33


Complements
COMPLEMENTS
Diminished Radix Complement(r-1)’s:
• Given a number N in base r having n digits, the (r - l)'s
complement of N is defined as (rn - 1) – N . For decimal
numbers, r = 10 and r - 1 = 9, so the 9's complement of N is
(10n - 1) -N
Ex. The 9's complement of 546700 is calculated as:
[(106 -1)-546700 ]= [(1000000-1) -546700]
= [999999 - 546700 ] = 453299.
• For binary numbers, r = 2 and r - 1 = 1, so the 1's
complement of N is (2n - 1) - N. Ex: The 1's complement of
101 is 010
• [(23 -1)-101]=[(1000-1)-101]= [111-101]= 010
• 7’s complement of (16)8
(16) 8 = (82 -1)-16 = (100-1)-16 = 77 -16 =61
15’s (AB)16 = [(16 2 - 1) – AB ]= [(100-1)-AB= FF –AB = 54
11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 34
Complements
COMPLEMENTS
Radix Complement:
• The r's complement of an n-digit number, N in base r is
defined as (rn– N) for N ≠ 0 and 0 for N = 0
• Comparing with the (r – 1)'s complement, we note that the r's
complement is obtained by adding 1 to the (r - 1)'s complement
since rn - N =[(rn - 1) – N] + 1.
Eg: 1. The 10's complement of 012398 is 987602.
2. The 2's complement of 1101100 is 0010100.

• (012398) = (999999– 012398 ) + 1= 987601+1 = 987602


• (12398)= (99999 -12398) +1= 87601 +1 = 87602
8’s complement
(16) 8 = (77 -16) +1= 61 + 1 = 62
16’s Compement
(AB)16 = [(162 - 1) – AB] +1 = [FF –AB] +1 = 54 +1 = 55

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 35


Complements
COMPLEMENTS

Subtraction using r’s Complements:


The subtraction of two n-digit unsigned numbers M - N in
base r can be done as follows:
1. Add the minuend M to the r's complement of the
subtrahend N. This performs M + (rn - N) = M - N + rn
2. If M ≥ N, the sum will produce an end carry, rn, which is
discarded; what is left is the result M - N.
3. If M < N, the sum does not produce an end carry and is
equal to rn - (N - M), which is the r's complement of (N - M).
To obtain the answer in a familiar form, take the r's
complement of the sum and place a negative sign in front of
it.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 36


Complements
COMPLEMENTS
Eg: Given the two binary numbers X = 1010100 and Y =1000011,
perform the subtraction
(a) X – Y and (b) Y - X using 2's complements.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 37


Complements
COMPLEMENTS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 38


Complements
COMPLEMENTS

Dr Amit Kumar Dash BEEE


11/25/2024 39
Unit 3
Complements
COMPLEMENTS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 40


Complements
COMPLEMENTS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 41


Complements
COMPLEMENTS

Subtraction using (r-1)’s Complements:


The subtraction of two n-digit unsigned numbers M - N in
base r can be done as follows:
1. Add the minuend M to the (r-1)'s complement of the
subtrahend N. This performs M +( (rn -1)- N) = M - N + rn -1
2. If M >= N, the sum will produce an end carry, which is
added to the sum gives result M - N.
3. If M < N, the sum does not produce an end carry, To
obtain the answer in a familiar form, take the (r-1)'s
complement of the sum and place a negative sign in front.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 42


Complements
COMPLEMENTS

Eg: Given the two binary numbers X = 1010100 and Y =1000011,


perform the subtraction
(a) X – Y and (b) Y - X using1's complements.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 43


Complements
COMPLEMENTS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 44


Complements
COMPLEMENTS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 45


Complements
COMPLEMENTS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 46


Complements
COMPLEMENTS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 47


Complements
COMPLEMENTS

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 48


TOPIC OBJECTIVE

TOPIC OBJECTIVE

Binary Student will learn about various binary


Codes codes.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 49


Binary Codes

Classification of Binary Codes

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 50


BINARY CODES

• In the coding, when numbers, letters or words are


represented by a specific group of symbols, it is said that the
number, letter or word is being encoded. The group of
symbols is called as a code.

• The digital data is represented, stored and transmitted as


group of binary bits. This group is also called as binary code.
The binary code is represented by the number as well as
alphabetic letters.

• The distinct bit combinations of n-bit code can be found by


counting in binary from 0 to (2n – 1).

n = 2, 4, 00, 01, 10, 11


11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 51
n= 3 8, 000,001,010,011,100,101,110,111
Classification of Binary Codes
• Weighted codes:
• In weighted codes, each digit is assigned a specific weight
according to its position .
• Several system of codes are used to express the decimal digits
0 to 9. These codes have 8421, 2421, 3321…. All are the
weighted codes .
• In this codes each decimal digit is represented by a group of
four bits .

• Non-weighted codes:
• In these codes, positional weights are not assigned.
• The example of non-weighted codes are Excess-3 and Gray
codes.

• Reflective codes:
• A code is reflective when the code is self complementing. In
other words, when the code for 9 is the complement the code
for 0, 8 for 1, 7 for 2, 6 for 3 and 5 for 4.
• 2421, 5211 and XS-3 are the examples of reflective codes.
11/25/2024 Dr Amit Kumar Dash BEEE 52
-- Used to find 9’s complement of BCD numbers.
Unit 3
Binary Codes
Classification of Binary Codes (cont..)
• Sequential codes:

• In sequential codes, each succeeding 'code is one binary


number greater than its preceding code.
• The 8421 and XS-3 are sequential codes.

• Alphanumeric codes:

• Codes used to represent numbers, alphabetic characters,


symbols and instructions.
• Example of alphanumeric codes are :
• ASCII(American Standard Code for Information Interchange),
• EBCDIC( Extended Binary Coded Decimal Interchange Code).

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 53


Binary Codes
Classification of Binary Codes (cont..)

• Error detecting and correcting codes:


• While transmitting the information, an error may occur due to the
presence of noise (unwanted electrical disturbance). An error is
said to occur, if a signal corresponding to 0 may change to 1 or
vice versa.
• It is not always possible to avoid those errors, but it is possible to
detect and correct the error. First, it is important to detect an error.
It is done by adding an extra bit to the transmitted data.
• There are different codes like parity code, block parity, hamming
code, etc to detect and correct the errors. Such codes are called as
error detecting and error correcting codes.
• Parity code: The parity code is used for the purpose of detecting
errors during the transmission of binary information. The parity
code is a bit that is included with the binary data to be transmitted.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 54


Binary Codes
Classification of Binary Codes (cont..)
The inclusion of a parity bit will make the number of 1’s either odd or even. Based on
the number of 1’s in the transmitted data, the parity code is of two types.

Even parity code


Odd parity code

On the receiver side, if the received data is other than the sent data, then it is an error. If
the sent date is even parity code and the received data is odd parity, then there is an
error.
So, both even and odd parity codes are used only for the detection of error and not for
the correction in the transmitted data. Even parity is commonly used and it has almost
become a convention.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 55


Weighted codes
Binary Coded Decimal (BCD) code:
• BCD codes are weighted codes.
• In this code each decimal digit is represented by a 4-bit binary number.
BCD is a way to express each of the decimal digits with a binary code. In
the BCD, with four bits we can represent sixteen numbers (0000 to 1111).
But in BCD code only first ten of these are used (0000 to 1001). The
remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.

Advantages of BCD Codes:


• It is very similar to decimal system.
• We need to remember binary equivalent of decimal numbers 0 to 9 only.

Disadvantages of BCD Codes:


• The addition and subtraction of BCD have different rules.
• The BCD arithmetic is little more complicated.
• BCD needs more number of bits than binary to represent the decimal
number. So BCD is less efficient than binary.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 56


BCD Codes

• The addition of BCD numbers is slightly different from binary


addition. Here, the rules of binary addition are partially
applicable only to the individual 4-bit groups.
• The BCD addition, is thus carried out by individually adding
the corresponding 4-bit groups starting from the LSB side.
• If there is a carry to the next group and if the result belongs to
any of the 6 illegal states than we add 6 10(0110) to the sum term
of that group and resulting carry is added in the next group.
• Example: Perform BCD Addition of 5 and 6.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 57


BCD Codes
BCD Codes

• Example: Perform BCD Addition of 184 and 576


1 1
• BCD 0001 1000 0100 184
+ 0101 0111 0110 +576
Binary sum 10000 1010
Add 6 0110 0110
BCD sum 0111 0110 0000 760

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 58


BCD Codes
BCD Codes

• Example: Perform BCD Addition of 184 and 976 1


1
• BCD 0001 1000 0100 184
+ 1001 0111 0110 +976
Binary sum 1011 10000 1010
Add 6 0110 0110 0110
BCD sum 1 0001 0110 0000 1160

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 59


BCD Codes
BCD Codes

BCD subtraction using 9’s complement:


• At first the decimal equivalent of the given Binary Coded
Decimal (BCD) codes are found out.
• Then the 9’s compliment of the subtrahend is done and then
that result is added to the number from which the
subtraction is to be done.
• If there is any carry bit then the carry bit may be added to
the result of the subtraction.
BCD subtraction using 10’s complement:
• At first the decimal equivalent of the given Binary Coded
Decimal (BCD) codes are found out.
• Then the 10’s compliment of the subtrahend is done and
then that result is added to the number from which the
subtraction is to be done.
• If there is any carry bit then the carry bit is ignored.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 60


BCD Codes
BCD Codes

Example: For 984 and 599, Find BCD Subtraction using 9's
complement method
Solution: 984-599 BCD subtraction using 9′s complement
1.Take 9′s complement for 599
Note : 9's complement of a number is obtained by subtracting all
bits from 999. 9's complement of 599 is 400

Dr Amit Kumar Dash BEEE Unit


11/25/2024 61
3
BCD Codes
BCD Codes

Example: For 984 and 599, Find BCD Subtraction using 10's
complement method
Solution: 984-599 BCD subtraction using 10′s complement
1.Take 10′s complement for 599
Note :10's complement of a number is 1 added to it's 9's
complement number from 999. 10's complement of 599 is 401

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 62


NON-WEIGHTED CODES
1. Excess-3 code 2. Gray
code
Excess-3 Code:
• Excess-3 codes are non-weighted and can be obtained by adding
3 to each decimal digit then it can be represented by using 4 bit
binary number for each digit.
• An Excess-3 equivalent of a given binary number is obtained
using the following steps:
1. Find the decimal equivalent of the given binary number.
2. Add +3 to each digit of decimal number.
3. Convert the newly obtained decimal number back to
binary number to get required excess-3 equivalent.
• Excess-3 code is non-weighted and self complementary code. A
self complementary binary codes are always compliment
themselves.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 63


EXCESS-3 CODE
• In other words, the 1’s complement of an excess-3 code is the
excess-3 code for the 9’s complement of the corresponding
decimal number.
• For example, the excess-3 code for decimal number 5 is 1000
and 1’s complement of 1000 is 0111, which is excess-3 code for
decimal number 4, and it is 9’s complement of number 5.
These are following advantages of Excess-3 codes,
• These are self-complementary codes.
• The codes 0000 and 1111 are not used for any digit which is
an advantage for memory organization as these codes can
cause fault in transmission line.
• It has no limitation, and it considerably simplifies
arithmetic operations.
• It is particularly significant for arithmetic operations as it
overcomes shortcoming encountered while using 8421 BCD
code to add two decimal digits whose sum exceeds 9.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 64


EXCESS-3 CODE

Example-1 −Convert decimal number 23 to Excess-3 code.


So, according to excess-3 code we need to add 3 to both digit
in the decimal number then convert into 4-bit binary number
for result of each digit. Therefore,
= 23+33=56 =0101 0110 which is required excess-3 code for
given decimal number 23.
Example 2− Convert Excess-3 code 1001001 into BCD and
decimal number.
So, grouping 4-bit for each group, i.e., 0100 1001 and subtract
0011 0011 from given number. Therefore,
= 0100 1001 -0011 0011 =0001 0110
So, binary coded decimal number is 0001 0110 and decimal
number will be 16.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 65


EXCESS-3 CODE
Example 3: find the 9’s complement of 395.
Solution: The excess 3 code is 0110 1100 1000
Inverting each bit 1001 0011 0111 . This is the excess 3
code of decimal number 604 which is the 9’s complement of
395.
999
-395
604
4. 9’s complement of (604) using excess-3 codes= ?
1001 0011 0111
0110 1100 1000
3 9 5

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 66


BINARY CODES

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 67


NON-WEIGHTED CODES
Gray codes: (no specific weights assigned to the bit
positions.)
• It is a reflected binary code belongs to a class of codes called minimum change
code in which only one bit in the code group changes when going from one step to
the next.

• Gray code also known as reflected binary code, because the first (n/2) values
compare with those of the last (n/2) values, but in reverse order.

• un-weighted code: Gray code is not suited for arithmetic operations but finds
applications in input/output devices and some types of analog to digital converters
(ADCs)
• Gray codes are used in the general sequence of hardware-generated
binary numbers.

• The numbers cause ambiguities or errors when the transition from one
number to its successive
11/25/2024
is done. This code
Dr Amit Kumar Dash BEEE
simply solves
Unit 3
this problem by
68
changing only one bit when the transition is between numbers is done.
GRAY CODES

In Gray code, if we go from one decimal number to the next, only


one bit of the gray code changes. Because of this feature,
• Originally designed to prevent spurious output from
electromechanical switches.
▪ The amount of switching is minimized and the reliability of
the switching systems is improved.
• This will be useful in circuits that are sensitive to glitches.

Gray codes are used in


1. Rotary and optical encoders,
2. Karnaugh maps, and
3. Error detection/correction in digital communications.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 69


GRAY CODES

Gray to Binary Code:


• To change gray to binary code, take down the MSB
digit of the gray code number, as the primary digit or
the MSB of the gray code is similar to the binary digit.
• To get the next straight binary bit, it uses the XOR
operation among the primary bit or MSB bit of binary
to the next bit of the gray code.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 70


GRAY CODES

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 71


DAILY QUIZ

1. The ASCII code is basically a


(a) 7-bit code
(b) 12-bit code
(c) 4-bit code
(d) 6-bit code

2. Excess-3 codes are ………….. and ………………

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 72


TOPIC OBJECTIVE

TOPIC OBJECTIVE

Boolean Students will learn about:


Algebra • Postulates and theorems of Boolean
algebra
• Logic Gates

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 73


BOOLEAN ALGEBRA

• Boolean Algebra is used to analyze and simplify the digital


(logic) circuits. It uses only the binary numbers i.e. 0 and 1. It is
also called as Binary Algebra or logical Algebra. Boolean
algebra was invented by George Boole in 1854
• Binary logic consists of binary variables and a set of logical
operations. The variables are designated by letters of the
alphabet, such as A, B, C, x, y, z, etc, with each variable having
two and only two distinct possible values: 1 and 0, There are
three basic logical operations: AND, OR, and NOT.
Following are the important rules used in Boolean algebra.
• Variable used can have only two values. Binary 1 for HIGH and
Binary 0 for LOW. Complement of a variable is represented by
an overbar (-) or ( ' ).
• ORing of the variables is represented by a plus (+) sign between
them. For example ORing of A, B, C is represented as A + B + C.
• Logical ANDing of the two or more variable is represented by
writing a dot between them such as A.B.C. Sometime the dot
11/25/2024
may be omitted like ABC.
Dr Amit Kumar Dash BEEE Unit 3 74
BOOLEAN ALGEBRA

• Boolean algebra is an algebraic structure defined on a set of


elements B together with two binary operators + and . provided
the following (Huntington) postulates are satisfied:
1. (a) Closure with respect to the operator +.
(b) Closure with respect to the operator · .
2. (a) An identity element with respect to + designated by 0: x + 0
= 0+ x = x
(b) An identity element with respect to . designated by 1: x·1 = l ·
x=x
3. (a) Commutative with respect to + : x + y = y + x
(b) Commutative with respect to . : x· y = y . x
4. (a) . is distributive over + : x· (y + z) = (x· y) + (x· z)
(b) + is distributive over . : x + (y. z) = (x + y). (x + z)
5. For every element x ϵ B, there exists an element x' ϵ B (called
complement
11/25/2024 of x) such
Dr Amitthat (a) x + x' = 1 BEEE
Kumar Dash and (b) x . x' = 0. Unit 3 75
BOOLEAN ALGEBRA

Two Valued Boolean Algebra:


• A two-valued Boolean algebra is defined on a set of two
elements, B = {0, 1}, with rules for the two binary operators +
and . as shown in the following operator tables.
• These rules are exactly the same as the AND, OR, and NOT
operations, respectively.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 76


RULES IN BOOLEAN ALGEBRA

Duality: The postulates have been listed in pairs and


designated by part (a) and part (b) One part may he obtained
from the other if the binary operators and the identity elements
are interchanged. It is called the duality principle.
• It states that every algebraic expression deducible from the
postulates of Boolean algebra remains valid if the operators and
identity elements are interchanged. In a two-valued Boolean
11/25/2024 algebra, the identity elements
Dr Amit Kumar Dash and the BEEE
elements of the Unit
set3 B are 77
BOOLEAN LAWS

Boolean Laws.
• Commutative law:
Any binary operation which satisfies the following expression
is referred to as commutative operation.

Commutative law states that changing the sequence of the


variables does not have any effect on the output of a logic
circuit.

• Associative law:
This law states that the order in which the logic operations are
performed is irrelevant as their effect is the same.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 78


BOOLEAN LAWS

• Distributive law: Distributive law states the following


condition.

• AND law : These laws use the AND operation. Therefore they
are called as AND laws.

• OR law : These laws use the OR operation. Therefore they are


called as OR laws

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 79


BOOLEAN LAWS

• Inversion law: This law uses the NOT operation. The


inversion law states that double inversion of a variable
results in the original variable itself.

• Absorption law:
x + x.y = x
x. (1+y) = x

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 80


BOOLEAN LAWS
• De Morgan’s Theorem : De Morgan’s first theorem states that two
(or more) variables NAND´ed together is the same as the two
variables inverted (Complement) and OR´ ed.

• The complement of product is equal to the sum of complements.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 81


BOOLEAN LAWS
• DeMorgan’s Theorem : De Morgan’s first theorem states that two
(or more) variables NOR´ed together is the same as the two
variables inverted (Complement) and AND´ed.

• The complement of sum is equal to the product of complements.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 82


BOOLEAN LAWS

1. Find the complement of the functions F1 = x'yz' + x'y'z and


F2 = x.(y'z' + yz). By applying DeMorgan's theorem as
many times as necessary.

Sol:
F1'= (x'yz' + x'y'z)' = (x'yz')'(x'y'z)' = (x ' ' + y' + z ' ' )(x ' ' + y ' '
+ z')
= (x + y' + z)(x + y + z')

F2'= [x(y'z' + yz)]' = x' + (y'z' + yz)'


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

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 83


BOOLEAN LAWS

2. Find the complement of the functions F1 = x'yz' + x'y'z


and F2 = x(y'z' + yz). by taking their duals and
complementing each literal.
Sol:
1. F1 = x'yz' + x'y'z.
The dual of F1 is (x' + Y + z')(x' + y' + z).
Complement of each literal: (x + y' + z)(x + y + z ') = F1' .

2. F2 = x(y'z' + yz).
The dual of F2 is x + (y' + z')(y + z).
Complement of each literal: x' + (y + z)(y' + z ') = F2' .

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 84


LOGIC GATES

AND Gate:
• A circuit which performs an AND operation is shown in
figure. It has n input (n >= 2) and one output.
• Logic diagram

• Truth Table

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 85


LOGIC GATES

OR Gate:
• A circuit which performs an OR operation is shown in
figure. It has n input (n ≥ 2) and one output.

Logic diagram

Truth Table

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 86


LOGIC GATES

NOT Gate:
A circuit which performs an NOT operation is shown
in figure.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 87


LOGIC GATES

NAND Gate
A AND-NOT operation is known as NAND operation. It has
n input (n >= 2) and one output.

• Logic diagram

• Truth Table

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 88


LOGIC GATES
NOR Gate
• A OR-NOT operation is known as NOR operation. It has n
input (n >= 2) and one output.

• Logic diagram

Truth Table

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 89


LOGIC GATES

XOR Gate
• XOR or Ex-OR gate is a special type of gate. It can be used
in the half adder, full adder and subtractor. The exclusive-
OR gate is abbreviated as EX-OR gate or sometime as X-OR
gate. It has n input (n >= 2) and one output.

• Logic diagram

• Truth Table

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 90


LOGIC GATES

XNOR Gate
• XNOR gate is a special type of gate. It can be used in the
half adder, full adder and subtractor. The exclusive-NOR
gate is abbreviated as EX-NOR gate or sometime as X-NOR
gate. It has n input (n >= 2) and one output.

• Logic diagram

• Truth Table

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 91


UNIVERSAL GATES

NAND gate as universal gate:

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 92


UNIVERSAL GATES

NOR gate as universal gate:

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 93


DAILY QUIZ

Q1.What is Digital Gate?


• ANS: Digital gates are basically electronic components which are used for switching and
manipulating binary data
Q2.What is the use of logic gates?
• ANS: In electronics, a logic gate is an idealized or physical device implementing a Boolean
function; that is, it performs a logical operation on one or more binary inputs and produces a
single binary output.
Q3: What is truth table?
• ANS: Truth table is a table from which we can get o/p of different gates
Q4.What is universal gate?
• ANS: A universal gate is a gate which can implement any Boolean function without need to
use any other gate type. The NAND and NOR gates are universal gates. In practice, this is
advantageous since NAND and NOR gates are economical and easier to fabricate and are the
basic gates used in all IC digital logic families
Q5. Draw the EX-OR gate by using the NAND gate?

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 94


TOPIC OBJECTIVE

TOPIC OBJECTIVE

Representatio Students will learn about:


n of Boolean • Concept of minterm and maxterm
expression in • Representation of Boolean function in
SOP & POS Canonical SOP & POS forms
• Conversion of SOP to POS and vice versa

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 95


CANONICAL REPRESENTATION USING MINTERMS
• Product term containing all variables of a function (primed /
unprimed): Fundamental product or Standard product or
Minterm.
• Minterms of F(x,y): x'.y', x'.y, x.y', x.y (also designated as m0, m1,
m2, m3, respectively.
• The minterm designation mi corresponds to decimal equivalent
of x,y combination of a row. Boolean function: Taking OR of
minterms associated with 1 in function output.
• Each minterm is obtained from an AND term of the n variables,
with each variable being primed if the corresponding bit of the
binary number is a 0 and unprimed if a 1.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 96


SUM OF PRODUCT (SOP):
CANONICAL FORM

Sum of Product (SOP): Canonical Form


F(x, y, z) = x'yz + xy 'z ' + xy'z + xyz' + xyz
F(x, y, z) = m3 +m4 + m5 +m6 +m7
F(x, y, z) = Σ m(3,4,5,6,7)

Dr Amit Kumar Dash BEEE


11/25/2024 97
Unit 3
MAXTERM

• Sum term containing all variables of a function(primed /


unprimed): Fundamental sum or Standard sum or
Maxterm.
• Maxterms of F(x, y): (x+ y), (x + y'), (x'+ y), (x'+ y') (also
designated as M0 , M1 , M2 , M3 respectively)
• The Maxterm designation Mi corresponds to decimal
equivalent of x, y combination of a row.
• Boolean function: Taking AND of Maxterms associated
with 0 in function output.
• Each maxterm is obtained from an OR term of the n
variables, with each variable being unprimed if the
corresponding bit is a 0 and primed if a I.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 98


TRUTH TABLE TO BOOLEAN FUNCTION: MAXTERM

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 99


PRODUCT OF SUM(POS):
CANONICAL FORM

POS:
F( x, y, z) = ( x+ y+ z).( x+ y+ z’).(x+ y’+
z)
F( x, y, z) = M0.M1.M2
F( x, y, z) = Π M(0,1,2)
11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 100
SOP and POS :
CANONICAL FORM

Minterms and Maxterms for Three Binary


Variables

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 101


TWO LEVEL IMPLEMENTATION

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 102


TWO LEVEL IMPLEMENTATION

Example: Express the Boolean function F = A + B'C in a sum of


min terms.
• The first term A = A.1 = A(B + B’) = AB + AB’ = AB.1 + AB’ .1
This function is still missing one variable, so
A = AB(C + C’) + AB'(C + C’) = ABC + ABC’+ AB’C + AB’C’
• The second term B’C is missing one variable; hence,
B’C = (A+ A’) B’C = AB’C + A’B’C
• Combining all terms, we have
F = A + B’C = ABC + ABC’ + AB’C + AB’C’ + AB’C + A’B’C
But AB’C appears twice, and
according to theorem 1 (x + x = x), it is possible to remove one
of those occurrences. Rearranging the min terms in ascending
order, we finally obtain
F = A’B’C + AB’C’ + AB’C + ABC’ + ABC
= m1 + m4 + m5 + m6 + m7
SOP is represented as Σ(1, 4, 5, 6, 7)

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 103


TWO LEVEL IMPLEMENTATION

Example: Express the Boolean function F = xy + x’z as a product


of maxterms.
• Solution : F = xy + x’z
= (xy + x’)(xy + z) = (x + x’)(y + x’)(x + z)(y + z)
= (x’ + y)(x + z)(y + z)
• The first term (x’ + y) = x’ + y + 0 = x’ + y + zz’
= (x’+ y + z)(x’ + y + z’)
• Second term (x + z)
= x + z + yy’ = (x + y + z)(x + y’ + z)
• Third term (y + z)
= y + z + xx’ = (x + y + z)(x’ + y + z)
• F = (x + y + z)(x + y’ + z)(x’ + y + z)(x’ + y + z’)
= M0*M2*M4*M5
POS is represented as Π (0, 2, 4, 5)

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 104


TWO LEVEL IMPLEMENTATION

Example: Express the function f1 in SOP form and POS form

From table f1 can be written as


f1 = x'y'z + xy'z' + xyz = m1 + m4 + m7

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 105


TWO LEVEL IMPLEMENTATION

• Now consider the complement of a Boolean function. It may be


read from the truth table by forming a min term for each
combination that produces a 0 in the function and then ORing
those terms.
• The complement of f1 is read as
f1' = x'y'z' + x'yz' + x'yz + xy'z + xyz'
• If we take the complement of f1' we obtain the function f1:
f1 = (x + y + z)(x + y' + z)(x + y' + z ')(x' + Y + z ')(x' + y' + z)
= M0·M 2·M 3·M 5·M 6

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 106


TWO LEVEL IMPLEMENTATION

Conversion between Canonical Forms:


• The complement of a function expressed as the sum of
minterms equals the sum of minterms missing from the
original function. This is because the original function is
expressed by those minterms that make the function equal to 1,
whereas its complement is a I for those minterms that the
function is a 0.
• Consider, for example, the Boolean expression: F = xy + x'z
• First, we derive the truth table for F:

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 107


TWO LEVEL IMPLEMENTATION

• The 1's under F in the table are determined from the


combination of the variable where xy = 11 and x'z = 01
• The minterms of the function are read from the truth table to
be 1,3,6, and 7.
• The function expressed in sum of min terms is:
F(x, y, z) = Σ (1, 3, 6, 7)
• Since there are a total of eight minterms or maxterms in a
function of three variable, we determine the missing terms to
be 0, 2, 4, and 5.
• The function expressed in product of maxterm is :
F(x, y, z) = Π (0, 2, 4, 5)

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 108


DAILY QUIZ

1. The SOP form of logical expression is most suitable for designing logic circuits using
only
(a) XOR gates
(b) AND gates
(c) NAND gates
(d) NOR gates

2. A switching function f(A, B, C, D) = A'B'CD + A'BC'D + AB'C'D + AB'CD + A'BCD can also
be written as
(a) Σm(1, 3, 5, 7, 9)
(b) Σm(3, 5, 7, 9, 11)
(c) Σm(3, 5, 9, 11, 13)
(d)None of these

3. NAND & NOR gates are called as …………………

4. Minterms and Maxterms are equivalent to logic ……..and ……..respectively.


Dr Amit Kumar Dash BEEE
11/25/2024 109
Unit 3
DAILY QUIZ

5. NAND gate is equivalent to bubble input ……….gate.


6. NOR gate is equivalent to bubble input ……….gate.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 110


WEEKLY ASSIGNMENT 1

1. The solution to the quadratic equation k 2 – 11k + 22 = 0 are k = 3 and k = 6. What is the
base of number systems?
2. Determine the value of base x, if : (193)x = (623)8
3. Find the 9’s complement of 658 using excess-3 code.
4. Perform BCD Addition of 999 and 989.
5. For 989 and 674, Find BCD Subtraction using 9's complement and 10's complement
method.
6. Explain hamming code. A receiver receives the hamming code 10101101, check
whether the data received is correct if not, check the error and correct it.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 111


WEEKLY ASSIGNMENT 2

1. Write a short note on binary codes.


2. Write a short note on Universal Gates.
3. Write a short note on De-Morgan’s Theorems.
4. Convert binary Code 10011 into Gray code
5. Explain with suitable example, self complement property of
excess-3 code.
6. Perform A-B using 1’s and 2’s complement for A= 11001 and
B=10011
7. Write the following functions into Min & Max terms (canonical
forms)
F1= AC’+BC, F2 = (A+B) (A’+C’)

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 112


MCQ
Hamming code is capable of
a) Only detect single-bit error
1 b) Only correct single-bit error
c) Detect and correct single bit error
d) None of above
The logical expression Y = Σm(0, 3, 6, 7, 10, 12, 15) is equivalent to
(a) πM(0, 3, 6, 7, 10, 12, 15)
2 (b) πM(1, 2, 4, 5, 8, 9, 11, 13, 14)
(c) Σm(1, 2, 4, 5, 8, 9, 11, 13, 14)
(d) Σm(0, 2, 4, 6, 8, 10, 12, 14)
Find the 2’s complement of 1101011101000
a)1101011101000
b)1001011101000
3
c)0001011101001
d)None of these

If each successive code differs from its preceding code by a single bit only, then this code is called
(a) BCD code
4 (b) Gray code
(c) weighted code
(d) binary code
Find the binary equivalent of decimal number 0.3125
a)0.1101
5 b)0.0101
c) 01.0101
d)1.0101
Dr Amit Kumar Dash BEEE
11/25/2024 113
Unit 3
MCQ

Express the decimal number 13 as signed magnitude number in 1’s complement notation
a)1101
6 b)10110
c)10011
d)None of these
Determine the decimal value of the octal fraction 0.325
a)0.416012
7 b)0.416015
c)0.416115
d)0.406015
NAND gate means
(a) inversion followed by AND gate
8 (b) AND gate followed by an inverter
(c) AND gate followed by an OR gate
(d) OR gate followed by an AND gate
The ASCII code is basically a
(a) 7-bit code
9 (b) 12-bit code
(c) 4-bit code
(d) 6-bit code
The decimal number 279 will be represented in Excess-3 code as
(a) 001001111001
10 (b) 010110101100
(c) 100010111
(d) 100011010
11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 114
MCQ

In a digital computer binary subtraction is performed


(a) in the same way as we perform subtraction in decimal number system
11 (b) using two’s complement method
(c) using 9’s complement method
(d) using 10’s complement method
The output of a gate is HIGH when at least one of its inputs is LOW. It is true for
(a) XOR
12 (b) NAND
(c) NOR
(d) OR
The output of a gate is HIGH when at least one of its inputs is HIGH. It is true for
(a) NAND
13 (b) AND
(c) OR
(d) XOR
A NOR gate means
(a) inversion followed by an OR gate
14 (b) OR gate followed by an inverter
(c) NOT gate followed by an OR gate
(d) NAND gate followed by an OR gate
The logic expression AB + A' B' can be implemented by giving inputs A and B to a two-input
(a) NOR gate
15 (b) XNOR gate
(c) XOR gate
(d) NAND gate
11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 115
KARNAUGHMAP (K-MAP) REPRESENTATION

• Two-Variable Karnaugh Map:

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 116


KMAP

• Groups must contain 1, 2, 4, 8, or in general 2n cells.


That is if n = 1, a group will contain two 1's since 21 =
2.
• If n = 2, a group will contain four 1's since 22 = 4.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 117


KMAP

• Each group should be as large as possible.

• Each cell containing a one must be in at least one group.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 118


KMAP

• Groups may overlap.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 119


THREE VARIABLE KARNAUGH MAP

F= A'B'C ' + AB'C ' + A'BC ' + ABC ' minimize the given using K-
MAP.

Ans: F = C '

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 120


THREE VARIABLE KARNAUGH MAP

Eg: F(x, y, z)= ∑(0,2,4,5,6) minimize the given using K-MAP.

Ans: F = z' + x.y'

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 121


THREE VARIABLE KARNAUGH MAP

F= ∑A,B,C(3, 5,6,7) minimize the given using K-MAP.

Ans: F = BC + AC + AB

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 122


THREE VARIABLE KARNAUGH MAP

Eg: F(A,B,C)= ∑(1,3,6,7) minimize the given using K-MAP.

Ans: F = A’C + AB

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 123


THREE VARIABLE KARNAUGH MAP

F(A,B,C) = A'B'C ' + A ' B + ABC ' + AC minimize the given


using K-MAP.

Ans: F = B + AC + A'C '

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 124


FOUR-VARIABLE KARNAUGH MAP

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 125


FOUR-VARIABLE KARNAUGH MAP

Eg: F = ∑m(0, 2, 8, 10) minimize the given using K-MAP in


SOP form.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 126


FOUR-VARIABLE KARNAUGH MAP

• F(P,Q,R,S)=∑(0,2,5,7,8,10,13,15) minimize the given using


K-MAP.

F = (QS+Q’S’)

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 127


FOUR-VARIABLE KARNAUGH MAP

• F(A,B,C,D)=∑(1,2,3,5,6,7,8,10,13,15) minimize the given


using K-MAP.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 128


DON’T CARE IN KARNAUGH MAP

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 129


DON’T CARE IN KARNAUGH MAP

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 130


DON’T CARE IN KARNAUGH MAP

1. Minimise the following function in SOP minimal form


using K- Maps: f(A,B,C,D) = m(1, 5, 6, 12, 13, 14) + d(4)
• From green & blue group we find terms : BD'
• From red group we find terms : A'C'D
• From brown group we find terms : BC'
• Therefore, SOP minimal is, f = BC' + BD' + A'C'D

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 131


DON’T CARE IN KARNAUGH MAP

2. Minimise the following function in SOP minimal form


using K-Maps: F(A, B, C, D) = m(1, 2, 6, 7, 8, 13, 14, 15) +
d(3, 5, 12)
• From green group we find terms : AB
• From red group we find terms : AC'D'
• From brown group we find terms : A'D
• From blue group we find terms : A'C
• f = AC'D' + A'D + A'C + AB

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 132


KARNAUGH MAP: POS

Eg: F(X,Y,Z)=∏M(0,1,2,4) minimize the given using K-MAP in


POS form.

Ans: F’ = X’Z’ + Y’Z’ + X’Y’


(F’)’ = F= (X’Z’ + Y’Z’ + X’Y’)’
F = ( X + Z ) . (Y + Z) . ( X + Y)

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 133


KARNAUGH MAP: POS

• F = B.C + A’B’C’ + AB
(F’)’ = F = (B.C + A’B’C’ + ABC’ )’ = (B' + C') (A + B + C) (A'+ B' )
• From red group we find terms : (B'+ C')
• From brown group we find terms : (A' + B' + C) & (A + B )
• Final expression (A'+ B' ) (B' + C') (A + B + C)

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 134


KARNAUGH MAP: POS

Eg: Minimise the following function in POS minimal form


using K-Maps: F(A, B, C, D) = M(6, 7, 8, 9) + d(10, 11, 12,
13, 14, 15)
• For red group we find terms: (B' + C')
• For green group we find terms: A'
• POS minimal is, F’ = A + BC
(F’)’= (A +BC)’
= A'(B' + C')

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 135


DON’T CARE IN KARNAUGH MAP

Eg: F(A,B,C,D) = ∑m(4,5,7,8,10,11,13,14) + ∑d (0,1,2) minimize


the given using K-MAP in POS form.

Ans: F’ = ABCD + ABC’D’ + A’CD’ + B’C’D + A’B’


F = (A+B) (B+C+D̅) (A+C̅+D) (A̅+B̅+C+D) (A̅+B̅+C̅+D)̅

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 136


Daily Quiz

• Complement of the function F = x'y'z + xy'z' is:


a) (x + y + z'). (x' + y + z)
b) (x' + y' + z). (x + y' +z')
c) (x + y + z). (x' + y' + z)
• Minimized function for F(A, B, C) = Σ (2,3,6) + d(0,7)
using k-map is: (a) A'C' + BC + BC‘ (b) B (c)
AB
• What are the selective prime implicants for F(w,x,y,z) = Σ
(1,3,6,7,14)
a) w'x'z , xyz‘
b) w'x'z , xyz‘
c) w'x'z, w'xy

Dr Amit Kumar Dash BEEE


Unit 3
11/25/2024 137
FACULTY VIDEO LINKS, YOUTUBE & NPTEL VIDEO LINKS AND ONLINE
COURSES DETAILS

Youtube/other Video Links:


• https://www.youtube.com/
watch?v=FPrcIhqNPVo&ab_channel=NesoAcademyNesoAcademyVerifi
ed
• https://www.youtube.com/
watch?v=wjM2RDG5yTI&ab_channel=NesoAcademyNesoAcademyVeri
fied
• https://www.youtube.com/
watch?v=BPBiyzc0OBw&ab_channel=IITKharagpurJuly2018IITKharagp
urJuly2018

Dr Amit Kumar Dash BEEE


11/25/2024 Unit 3 138
Weekly Assignment

• F(A,B,C) = ∑m(1,4,5,7) minimize the given using K-MAP in SOP form.


• F(A,B,C,D) = ∑m(0,2,4,6,8,10,12,14) minimize the given using K-MAP in SOP form.
• F(w,x,y,z) = ∑m(4,5,7,8,10,14) minimize the given using K-MAP in POS form.
• F(A,B,C,D,E) = ∑m(4,5,7,8,10,14,27,31) + ∑d (0,1,2,11,19,25) minimize the given using K-
MAP in SOP form.
• F(w,x,y,z) = ∑m(0,2,4,5,8,12,14) + ∑d (1,3,5,7,9) minimize the given using K-MAP in POS
form.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 139


Recap

• The map method provides a simple straightforward procedure for minimizing Boolean
functions.
• The map is a diagram made up of squares. Each square represents one minterm.
• K map rule summary:
1. No zeros allowed.
2. No diagonals.
3. Only power of 2 number of cells in each group.
4. Groups should be as large as possible.
5. Every one must be in at least one group.
6. Overlapping allowed.
7. Wrap around allowed.
8. Fewest number of groups possible.

Dr Amit Kumar Dash BEEE


11/25/2024 Unit 3 140
OLD QUESTION PAPERS

Dr Amit Kumar Dash BEEE


11/25/2024 141
Unit 3
OLD QUESTION PAPERS

Dr Amit Kumar Dash BEEE


11/25/2024 142
Unit 3
OLD QUESTION PAPERS

Dr Amit Kumar Dash BEEE


11/25/2024 143
Unit 3
OLD QUESTION PAPERS

Dr Amit Kumar Dash BEEE


11/25/2024 144
Unit 3
OLD QUESTION PAPERS

Dr Amit Kumar Dash BEEE


11/25/2024 145
Unit 3
OLD QUESTION PAPERS

Dr Amit Kumar Dash BEEE


11/25/2024 146
Unit 3
EXPECTED QUESTIONS

1 What do you mean by implicants? Explain its importance using example.


Find the Boolean expression in SOP and POS form of Ex-OR and Ex-NOR gate using
2
K—map?
Explain the process of data communication using Parity code? What is the
3
limitation of parity checking method?
Find the Boolean expression in SOP and POS form of 3 inputs NAND and NOR gate
4
using K—map?
Convert the Boolean expression (i) Y= [(A+B’+C’)’. (A’+B)’] to its min-term form (ii)
5
Y= [(A’B’)+ (BC)] to its max- term form.
Describe the sign magnitude, 2’s complement and 1’s complement notation for
6
representing signed binary numbers.
7 Find the simplilfied form of Y= A’B’ C’ +A’B C’+ AB’C+ A using K-map.
Prove the following statements using logic gate diagram:
8 (i) An AND-OR configuration is equivalent to a NAND-NAND configuration.
(ii) An OR-AND configuration is equivalent to a NOR-NOR configuration.
9 Construct Hamming code for given code 0101010110. Use even parity.
10 Explain the Hamming code.
Dr Amit Kumar Dash BEEE
11/25/2024 147
Unit 3
EXPECTED QUESTIONS

What are the self complementary codes? Write down the decimal digit representation using
11
any two self complementary codes.
12 Perform the BCD addition and subtraction of decimal number 999 and 989.
Develop the logic diagram using NAND and NOR gate of the Boolean expression Y = B + C' +
13
(A + B)'
14 Simplify the equation using Kmap X = B'(CD + C' ) + CD' [( A + B)' + AB ]
15 Explain Binary Codes.
16 Perform the Hexadecimal addition and subtraction of 2BD.1AH+3EF.9H.
17 Perform the octal addition and subtraction of 756.42+345.23
Perform the Hexadecimal subtraction using r's and (r-1)'s complement methods of (FE8A.
18
AH-3BCF.04H)
19 Perform the octal subtraction using r's and (r-1)'s complement methods of 235.22- 674.36
20 Discuss the implementation of NOT, OR, and AND gates by NAND and NOR gates.
If the Hamming code sequence 1100110 is transmitted and due to error in one position, is
21 received as 1110110, locate the position of the error bit using parity checks and give the
method for obtaining the correct sequence.
Perform the binary subtraction using r's and (r-1)'s complement methods of
22
(111101-101011)
Dr Amit Kumar Dash BEEE
11/25/2024 148
Unit 3
RECAP OF UNIT

Conversion among
base:

Dr Amit Kumar Dash BEEE


11/25/2024 149
Unit 3
Recap ofUNIT
RECAP OF Unit

• Convert the 10011 gray code into binary code.

• Convert the 10011 binary code into gray code.

Dr Amit Kumar Dash BEEE


11/25/2024 150
Unit 3
Recap ofUNIT
RECAP OF Unit
Hamming Code:
Ques. Receiver receives the hamming code 1101001, check whether the data
received is correct if not, check the error and correct it. Use odd parity.
Sol: Odd Parity:
In the case of odd parity, for a given set of bits, the number of 1’s are counted.
If that count is even, the parity bit value is set to 1, making the total count of
occurrences of 1’s an odd number. If the total number of 1’s in a given set of
bits is already odd, the parity bit’s value is 0.
7 6 5 4 3 2 1

1 1 0 1 0 0 1

• P1 = (1, 3, 5, 7) should have odd number of 1’s.


P1 is even, so error, C1 = 1
• P2 = (2, 3, 6, 7) should have odd number of 1’s.
P2 is even, so error, C2 = 1
• P4 = (4, 5, 6, 7) should have odd number of 1’s.
P4 is odd , so there is no error, C4 = 0
So, error bit C = C4C2C1 , C = 011 = 3
rd
C = 3 so the error in Dr3Amit bit. The correct code
Kumar Dash BEEE is 1101101
11/25/2024 151
Unit 3
Recap ofUNIT
RECAP OF Unit

Dr Amit Kumar Dash BEEE


11/25/2024 152
Unit 3
Recap ofUNIT
RECAP OF Unit

NAND gate as universal gate:

Dr Amit Kumar Dash BEEE


11/25/2024 153
Unit 3
Recap ofUNIT
RECAP OF Unit

NOR gate as universal gate:

Dr Amit Kumar Dash BEEE


11/25/2024 154
Unit 3
Recap ofUNIT
RECAP OF Unit

Dr Amit Kumar Dash BEEE


11/25/2024 155
Unit 3
REFERENCE

• “ Logic and Computer Design Fundamentals” by Tom Martin and Charles R Kime.
• “ Fundamentals of Logic Design” by Charles H Roth Jr.
• “ Digital Design and Computer Architecture” by David Harris and Sarah Harris.
• “ Advanced Digital Design with the Verilog HDL” by D Ciletti Micahel.

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 156


Thank You

11/25/2024 Dr Amit Kumar Dash BEEE Unit 3 157

You might also like