Circuits and Electronic Devices: Lecture No

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

Ghulam Ishaq Khan Institute of Engineering Sciences and

Technology, Topi, Pakistan

ME203
Circuits and Electronic Devices

Lecture No: 29

Instructor
Dr. Abid Imran
------Faculty of Mechanical Engineering------ Fall Semester
1 2020
Content

• Logic gates
• Boolean Algebra
• DE Morgan's Theorems
• Examples
• Karnaugh Map
Exclusive OR gate:
• Exclusive-OR and exclusive-NOR gates are formed by a combination of other gates.
• These gates are often treated as basic logic elements with their own unique symbols
Exclusive NOR gate:
• Exclusive-OR and exclusive-NOR gates are formed by a combination of other gates.
• These gates are often treated as basic logic elements with their own unique symbols
BOOLEAN
ALGEBRA
Boolean Algebra:
• As in other areas of mathematics, there are certain well-developed rules and laws
that must be followed in order to properly apply Boolean algebra.
Boolean Algebra:
• A variable ORed with 0 is always equal to the variable.

• A variable ORed with 1 is always equal to the 1


Boolean Algebra:

• A variable ANDed with 0 is always equal to the 0

• A variable ANDed with 1 is always equal to the A.


Boolean Algebra:

• A variable ORed with itself is always equal to the variable

• A variable ORed with its complement is always equal to 1


Boolean Algebra:
• A variable ANDed with itself is always equal to the variable

• A variable ANDed with its complement is always equal to 0


Boolean Algebra:

• The double complement of a variable is always equal to the variable.


Boolean Algebra:

 𝑹𝒖𝒍𝒆 ¿ 𝟏𝟎 : 𝑨= 𝑨+ 𝑨𝑩

 𝑹𝒖𝒍𝒆 ¿ 𝟔 : ´
𝑨+ 𝑨=𝟏
Boolean Algebra:
 𝑹𝒖𝒍𝒆¿ 𝟕 : 𝑨 .
𝑨= 𝑨
 𝑹𝒖𝒍𝒆¿ 𝟏𝟎 : 𝑨= 𝑨+ 𝑨𝑪

 𝑹𝒖𝒍𝒆 ¿ 𝟏𝟎 : 𝑨= 𝑨+ 𝑨𝑩
DeMorgan’s Theorem:

• DeMorgan proposed two theorems that are an important part of Boolean algebra.
• Theorems provide mathematical verification of the equivalency of

• NAND and negative-OR gates

• NOR and negative-AND gates


DeMorgan’s Theorem:
Ist theorem says:
• The complement of two or more ANDed variables is equivalent to the OR of the complements
of the individual variables

NAND gate Negative OR gate


DeMorgan’s Theorem:
2nd theorem says:
• The complement of two or more ORed variables is equivalent to the AND of the complements
of the individual variables.

NOR gate Negative AND gate


Examples:

(c)
Examples:

• Start by complementing the X-OR expression:   XOR=

• Apply distributive law:


Examples:

• Apply distributive law:

 𝑹𝒖𝒍𝒆¿ 𝟕 : 𝑨 . 𝑨= 𝑨
 𝑹𝒖𝒍𝒆 ¿ 𝟓 : 𝑨+ 𝑨= 𝑨 and  𝑹𝒖𝒍𝒆 ¿ 𝟏𝟎 : 𝑨= 𝑨+ 𝑨𝑩

𝐵+𝐵𝐴+
  𝐴𝐶
 𝑹𝒖𝒍𝒆 ¿ 𝟏𝟎 : 𝑨= 𝑨+ 𝑨𝑩
Examples:

• Apply distributive law:

 𝑨 .𝟎.𝑫
 𝑹𝒖𝒍𝒆 ¿ 𝟖 : ´
𝑨 . 𝑨=𝟎 𝟎  . 𝑫
 𝟎

• Apply distributive law:

 𝑹𝒖𝒍𝒆¿𝟖 : 𝑨 . 𝑨= 𝑨
  1

 𝑹𝒖𝒍𝒆 ¿ 𝟖 : 𝑨 . 𝟏= 𝑨
Karnaugh
Map
Karnaugh Map
• Every digital circuit can be written in the form of a Boolean expression.
• This particular method (Karnaugh maps or abbreviated as K-map) is
used to generate a simplest possible form of a Boolean expression.

• Generate a simplified Boolean expression or digital circuit of a known


complex digital circuit with its truth table.
• Generate a simplified Boolean expression or digital circuit of complex
Boolean expression.
• Design a simplified Boolean expression or digital circuit of desired
inputs and outputs or desired truth table of your own.
Karnaugh Map
Creating a K-Map:

 •Identify number of input variables in the


given truth table.
• No of cells in the K-map will be , where n
is number of variables.
Karnaugh Map
Naming Rows and Columns:
• Give names to rows and columns based on the inputs
Karnaugh Map
Naming Rows and Columns:

• It must be noticed that if we consider


binary counting, the third column
should be 10 rather than 11.

• However, these allocations are based


on grey codes.
• In other words, only the status of
one bit should change between two
consecutive cells.
Karnaugh Map
Populating a K-Map:
Karnaugh Map
Populating a K-Map:
Karnaugh Map
4. Pairing 1s in a populated K-Map:

 • 4.1 Only the 1s in the populated map are paired, 0s are not paired.
• 4.2 Pair can consist of 1,2,4,8 or multiple of only. Where n can be 0,1,2…
• 4.3 Pair can be in the form of a square or a rectangle only
• 4.4 Try to identify the largest pairs first
• 4.5 1s of the left most column can be paired with the right most columns
also 1s of the top most row can be paired with the bottom row of the
populated K-map
• 4.6 No diagonal pairing is allowed
• 4.7 All the 1s in the populated K-map must be paired.
• 4.8 Pairs can overlap
Karnaugh Map
• Consider the consecutive ‘ones’ in the K-map cells and group
them

• Each group should contain the largest number of ‘ones

• The number of ‘ones’ in a group must be a power of 2


Karnaugh Map
• Try to identify the largest pairs/group first

• Grouping is to be done either horizontally or vertically or in terms


of squares or rectangles.
Karnaugh Map
• The same element(s) may repeat in multiple groups only if this increases the
size of the group.

• The elements around the edges of the table are considered to be adjacent and
can be grouped together.
Reading Notes are given.
Book: “Floyd - Digital Fundamentals 9e”
has been shared on google drive.
Section: 4-1 to 4-5
Relevant examples.

32

You might also like