Download presentation
Presentation is loading. Please wait.
1
CHAPTER 1 : INTRODUCTION
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION
2
1.0 Number & Codes Digital and analog quantities
Decimal numbering system (Base 10) Binary numbering system (Base 2) Hexadecimal numbering system (Base 16) Octal numbering system (Base 8) Number conversion Binary arithmetic 1’s and 2’s complements of binary numbers
3
Signed numbers Arithmetic operations with signed numbers Binary-Coded-Decimal (BCD) ASCII codes Gray codes Digital codes & parity
4
Digital and analog quantities
Two ways of representing the numerical values of quantities : i) Analog (continuous) ii) Digital (discrete) Analog : a quantity represented by voltage, current or meter movement that is proportional to the value that quantity Digital : the quantities are represented not by proportional quantities but by symbols called digits
5
Digital and analog systems
Digital system: combination of devices designed to manipulate logical information or physical quantities that are represented in digital forms include digital computers and calculators, digital audio/video equipments, telephone system. Analog system: contains devices manipulate physical quantities that are represented in analog form audio amplifiers, magnetic tape recording and playback equipment, and simple light dimmer switch
6
Analog Quantities Continuous values
7
Digital Waveform
8
Introduction to Numbering Systems
We are all familiar with the decimal number system (Base 10). Some other number systems that we will work with are: Binary Base 2 Octal Base 8 Hexadecimal Base 16
9
Number Systems Decimal Binary Octal Hexadecimal 0 ~ 9 0 ~ 1 0 ~ 7
0 ~ F
10
Characteristics of Numbering Systems
The digits are consecutive. The number of digits is equal to the size of the base. Zero is always the first digit. When 1 is added to the largest digit, a sum of zero and a carry of one results. Numeric values determined by the implicit positional values of the digits.
11
A B C D E F Binary Octal Hex Dec N U M B E R S Y T
12
Most significant digit Least significant digit
Significant Digits Binary: Most significant digit Least significant digit Hexadecimal: 1D63A7A
13
Binary Number System Also called the “Base 2 system”
The binary number system is used to model the series of electrical signals computers use to represent information 0 represents the no voltage or an off state 1 represents the presence of voltage or an on state
14
Binary Numbering Scale
Base 2 Number Base 10 Equivalent Power Positional Value 000 20 1 001 21 2 010 22 4 011 3 23 8 100 24 16 101 5 25 32 110 6 26 64 111 7 27 128
15
Octal Number System Also known as the Base 8 System Uses digits 0 - 7
Readily converts to binary Groups of three (binary) digits can be used to represent each octal digit Also uses multiplication and division algorithms for conversion to and from base 10
16
Hexadecimal Number System
Base 16 system Uses digits 0-9 & letters A,B,C,D,E,F Groups of four bits represent each base 16 digit
17
Number Conversion Any Radix (base) to Decimal Conversion
18
Number Conversion Binary to Decimal Conversion
19
Binary to Decimal Conversion
Convert ( )2 to its decimal equivalent: Binary Positional Values x x x x x x x x 27 26 25 24 23 22 21 20 Products 17310
20
Octal to Decimal Conversion
Convert 6538 to its decimal equivalent: Octal Digits x x x Positional Values Products 42710
21
Hexadecimal to Decimal Conversion
Convert 3B4F16 to its decimal equivalent: Hex Digits 3 B F x x x x Positional Values Products 15,18310
22
Number Conversion INTEGER DIGIT:
Decimal to Any Radix (Base) Conversion INTEGER DIGIT: Repeated division by the radix & record the remainder FRACTIONAL DECIMAL: Multiply the number by the radix until the answer is in integer Example: to Binary
23
Decimal to Binary Conversion
Remainder 2 5 = 2 1 2 = 6 = 3 = 1 = MSB LSB 2510 =
24
Decimal to Binary Conversion
MSB LSB Carry x 2 = x 2 = x 2 = 0.5 x 2 = The Answer:
25
Decimal to Octal Conversion
Convert to its octal equivalent: 427 / 8 = 53 R3 Divide by 8; R is LSD 53 / 8 = 6 R5 Divide Q by 8; R is next digit 6 / 8 = 0 R6 Repeat until Q = 0 6538
26
Decimal to Hexadecimal Conversion
Convert to its hexadecimal equivalent: 830 / 16 = 51 R14 51 / 16 = 3 R3 3 / 16 = 0 R3 = E in Hex 33E16
27
Number Conversion Binary to Octal Conversion (vice versa) Grouping the binary position in groups of three starting at the least significant position.
28
Octal to Binary Conversion
Each octal number converts to 3 binary digits To convert 6538 to binary, just substitute code:
29
Number Conversion Example: Convert the following binary numbers to their octal equivalent (vice versa). b) 47.38 Answer: 11.748
30
Number Conversion Binary to Hexadecimal Conversion (vice versa) Grouping the binary position in 4-bit groups, starting from the least significant position.
31
Binary to Hexadecimal Conversion
The easiest method for converting binary to hexadecimal is to use a substitution code Each hex number converts to 4 binary digits
32
Number Conversion Example: Convert the following binary numbers to their hexadecimal equivalent (vice versa). 1F.C16 Answer: 10.816
33
Substitution Code 56AE6A16 0101 0110 1010 1110 0110 1010 5 6 A E 6 A
Convert to hex using the 4-bit substitution code : A E A 56AE6A16
34
Substitution Code Substitution code can also be used to convert binary to octal by using 3-bit groupings:
35
Binary Addition 0 + 0 = 0 Sum of 0 with a carry of 0
Example: ???
36
Simple Arithmetic Addition Example: Example: 100011002 5816 + 1011102
Substraction 101102 Example: 5816 7C16
37
Binary Subtraction 0 - 0 = 0 1 - 1 = 0 1 - 0 = 1
10 -1 = with a borrow of 1 Example: ???
38
Binary Multiplication
0 X 0 = 0 0 X 1 = 0 Example: 1 X 0 = 1 X 1 = X 100110 000000
39
Binary Division Use the same procedure as decimal division
40
Numbering Systems Decimal numbering system (Base 10)
Binary numbering system (Base 2) Hexadecimal numbering system (Base 16) Octal numbering system (Base 8) Binary-Coded-Decimal (BCD) ASCII codes Gray codes
41
BCD (Binary Coded Decimal) Code
Represent each of the 10 decimal digits (0~9) as a 4-bit binary code. Example: Convert 1510 to BCD. BCD
42
Convert from decimal to BCD
4510 17010 246910
43
Convert from BCD to decimal
44
ASCII (American Standard Code for Information Interchange) Code
Used to translate from the keyboard characters to computer language. ASCII has 128 characters and symbols represented by a 8-bit binary code, with MSB always 0, i.e to 7F16. Refer table on page 91.
45
ASCII Table
46
Exercise Determine the ASCII code sequence (in both binary and hex) when we type this on the keyboard: 71 INPUT Z
47
Gray Code Decimal Binary Gray Code 0000 1 0001 2 0010 0011 3 4 0100
0000 1 0001 2 0010 0011 3 4 0100 0110 5 0101 0111 6 Only 1 bit changes at a time. Can’t be used in arithmetic circuits. Binary to Gray Code and vice versa.
48
Gray Codes Not an arithmetic code
Exhibits only a single change from one code word to the next in sequence Need to know : Conversion binary gray code Conversion gray code binary
49
Binary Gray Codes The MSB in Gray code is the same as the corresponding MSB in the binary number. Going from left to right, add each adjacent pair of binary code bits to get the next Gray code bit. Discard carries.
50
Binary Gray Codes 1 0 1 1 0 1 1 1 0 1 Gray Codes + + + +
Convert binary number to gray code. Gray Codes + + + +
51
Binary Gray Codes 1 1 1 1 1 1 0 0 0 0 Gray Codes + + + +
Convert binary number to gray code. Gray Codes + + + +
52
Gray Codes Binary The MSB in binary code is the same as the corresponding bit in the Gray code. Add each binary code bit generated to the Gray code bit in the next adjacent position. Discard carries.
53
Gray Codes Binary 1 0 1 1 0 1 1 0 1 1 Binary + + + +
Convert gray code to binary. Binary + + + +
54
Gray Codes Binary 1 1 0 1 1 1 0 0 1 0 Binary + + + +
Convert gray code to binary. Binary + + + +
55
Next … 1’s and 2’s complements of binary numbers Signed numbers
Arithmetic operations with signed numbers Digital codes & parity
56
1’s complements of binary numbers
Changing all the 1s to 0s and all the 0s to 1s Example: Binary number ’s complement
57
2’s complements of binary numbers
Step 1: Find 1’s complement of the number Binary # 1’s complement Step 2: Add 1 to the 1’s complement
58
SIGNED NUMBERS
59
The Sign Bit A 0 sign bit indicates a positive number, and
A 1 sign bit indicates a negative number. versus
60
1. The Sign Magnitude Form
… Sign bit 31 bits for magnitude 0 = positive 1 = negative This is your basic Integer format
61
Signed numbers Left most is the sign bit Sign-magnitude Exercise
0 is for positive, and 1 is for negative Sign-magnitude = sign bit magnitude bits Exercise Write the representation for -25
62
2. The 1’s Complement Form Positive numbers are represented the same way as the positive sign-magnitude numbers. A negative number is the 1’s complement of the corresponding positive number. Example: +25 is is
63
3. The 2’s Complement Form The positive number – same as sign magnitude and 1’s complement. The negative number is the 2’s complement of the corresponding positive number.
64
Example Express +19 and -19 in i. sign magnitude form
ii. 1’s complement form iii. 2’s complement form
65
Solution Decimal No. Sign-Magnitude 1’s Complement 2’s Complement +19
-19
66
Error Detection & Correction Codes
PARITY METHOD: Even Parity Odd Parity
67
Parity Bit Is an extra bit included with the data bits.
To detect errors in data communication & processing.
68
Error-Detection Codes
Redundancy (e.g. extra information), in the form of extra bits, can be incorporated into binary code words to detect and correct errors. A simple form of redundancy is parity, an extra bit appended onto the code word to make the number of 1’s odd or even. Parity can detect all single-bit errors and some multiple-bit errors. A code word has even parity if the number of 1’s in the code word is even. A code word has odd parity if the number of 1’s in the code word is odd.
69
4-Bit Parity Code Example
Fill in the even and odd parity bits: The codeword "1111" has even parity and the codeword "1110" has odd parity. Both can be used to represent 3-bit data. Even Parity Odd Parity Message Parity Message Parity - - 000 000 - - 001 001 - - 010 010 - - 011 011 - - 100 100 - - 101 101 - - 110 110 - - Even Parity Bits: 0, 1, 1, 0, 1, 0, 0, 1 Odd Parity Bits: 1, 0, 0, 1, 0, 1, 1, 0 111 111 - -
70
BASIC LOGIC GATES
71
Exclusive-OR and Exclusive-NOR Fixed-function logic: IC Gates
3.0 LOGIC GATES Inverter (NOT Gate) AND Gate OR Gate NAND Gate NOR Gate Exclusive-OR and Exclusive-NOR Fixed-function logic: IC Gates
72
Introduction Three basic logic gates AND Gate – expressed by “ . “
OR Gates – expressed by “ + “ sign (not an ordinary addition) NOT Gate – expressed by “ ‘ “ or “¯”
73
NOT Gate (Inverter) a) Gate Symbol & Boolean Equation
b) Truth Table (Jadual Kebenaran) c) Timing Diagram (Rajah Pemasaan)
74
OR Gate a) Gate Symbol & Boolean Equation
b) Truth Table (Jadual Kebenaran) c) Timing Diagram (Rajah Pemasaan)
75
AND Gate a) Gate Symbol & Boolean Equation
c) Timing Diagram (Rajah Pemasaan) b) Truth Table (Jadual Kebenaran)
76
a) Gate Symbol, Boolean Equation
NAND Gate a) Gate Symbol, Boolean Equation & Truth Table b) Timing Diagram
77
a) Gate Symbol, Boolean Equation
NOR Gate a) Gate Symbol, Boolean Equation & Truth Table b) Timing Diagram
78
a) Gate Symbol, Boolean Equation
Exclusive-OR Gate a) Gate Symbol, Boolean Equation & Truth Table b) Timing Diagram
79
Exclusive-NOR Gate
80
Symbols For XOR and XNOR
XOR symbol: XNOR symbol: Symbols exist only for two inputs
83
AND gate NOT gate Examples : Logic Gates IC
Note : x is referring to family/technology (eg : AS/ALS/HCT/AC etc.)
84
Boolean Algebra
85
Boolean Operations & expression Laws & rules of Boolean algebra
DeMorgan’s Theorems Boolean analysis of logic circuits Simplification using Boolean Algebra Standard forms of Boolean Expressions Boolean Expressions & truth tables The Karnaugh Map
86
Karnaugh Map SOP minimization
Karnaugh Map POS minimization 5 Variable K-Map Programmable Logic
87
Boolean Operations & expression
Variable – a symbol used to represent logical quantities (1 or 0) ex : A, B,..used as variable Complement – inverse of variable and is indicated by bar over variable ex : Ā
88
Operation : Boolean Addition – equivalent to the OR operation
X = A + B Boolean Multiplication – equivalent to the AND operation X = A∙B A X B A X B
89
Laws & rules of Boolean algebra
90
Commutative law of addition
A+B = B+A the order of ORing does not matter.
91
Commutative law of Multiplication
AB = BA the order of ANDing does not matter.
92
Associative law of addition
A + (B + C) = (A + B) + C The grouping of ORed variables does not matter
93
Associative law of multiplication
A(BC) = (AB)C The grouping of ANDed variables does not matter
94
(A+B)(C+D) = AC + AD + BC + BD
Distributive Law A(B + C) = AB + AC (A+B)(C+D) = AC + AD + BC + BD
95
Boolean Rules 1) A + 0 = A In math if you add 0 you have changed nothing In Boolean Algebra ORing with 0 changes nothing
96
Boolean Rules 2) A + 1 = 1 ORing with 1 must give a 1 since if any input is 1 an OR gate will give a 1
97
Boolean Rules 3) A • 0 = 0 In math if 0 is multiplied with anything you get 0. If you AND anything with 0 you get 0
98
Boolean Rules 4) A • 1 = A ANDing anything with 1 will yield the anything
99
Boolean Rules 5) A + A = A ORing with itself will give the same result
100
Boolean Rules 6) A + A = 1 Either A or A must be 1 so A + A =1
101
Boolean Rules 7) A • A = A ANDing with itself will give the same result
102
Boolean Rules 8) A • A = 0 In digital Logic 1 =0 and 0 =1, so AA=0 since one of the inputs must be 0.
103
Boolean Rules 9) A = A If you not something twice you are back to the beginning
104
Boolean Rules 10) A + AB = A Proof: A + AB = A(1 +B) DISTRIBUTIVE LAW
= A∙ RULE 2: (1+B)=1 = A RULE 4: A∙1 = A
105
Boolean Rules 11) A + AB = A + B
If A is 1 the output is 1 , If A is 0 the output is B Proof: A + AB = (A + AB) + AB RULE 10 = (AA +AB) + AB RULE 7 = AA + AB + AA +AB RULE 8 = (A + A)(A + B) FACTORING = 1∙(A + B) RULE 6 = A + B RULE 4
106
Boolean Rules 12) (A + B)(A + C) = A + BC
PROOF (A + B)(A +C) = AA + AC +AB +BC DISTRIBUTIVE LAW = A + AC + AB + BC RULE 7 = A(1 + C) +AB + BC FACTORING = A.1 + AB + BC RULE 2 = A(1 + B) + BC FACTORING = A.1 + BC RULE 2 = A + BC RULE 4
107
De Morgan’s Theorem,
108
Theorems of Boolean Algebra
1) A + 0 = A 2) A + 1 = 1 3) A • 0 = 0 4) A • 1 = A 5) A + A = A 6) A + A = 1 7) A • A = A 8) A • A = 0
109
Theorems of Boolean Algebra
9) A = A 10) A + AB = A 11) A + AB = A + B 12) (A + B)(A + C) = A + BC 13) Commutative : A + B = B + A AB = BA 14) Associative : A+(B+C) =(A+B) + C A(BC) = (AB)C 15) Distributive : A(B+C) = AB +AC (A+B)(C+D)=AC + AD + BC + BD
110
De Morgan’s Theorems Two most important theorems of Boolean Algebra were contributed by De Morgan. Extremely useful in simplifying expression in which product or sum of variables is inverted. The TWO theorems are : 16) (X+Y) = X . Y 17) (X.Y) = X + Y
111
Implications of De Morgan’s Theorem
Input Output X Y X+Y XY (b) (c) (a) Equivalent circuit implied by theorem (16) (b) Alternative symbol for the NOR function (c) Truth table that illustrates DeMorgan’s Theorem
112
Implications of De Morgan’s Theorem
Input Output X Y XY X+Y (b) (c) (a) Equivalent circuit implied by theorem (17) (b) Alternative symbol for the NAND function (c) Truth table that illustrates DeMorgan’s Theorem
113
De Morgan’s Theorem Conversion
Step 1: Change all ORs to ANDs and all ANDs to Ors Step 2: Complement each individual variable (short overbar) Step 3: Complement the entire function (long overbars) Step 4: Eliminate all groups of double overbars Example : A . B A .B. C = A + B = A + B + C = A + B = A + B + C = A + B .. Proving of De Morgan’s theorems
114
De Morgan’s Theorem Conversion
ABC + ABC (A + B +C)D = (A+B+C).(A+B+C) = (A.B.C)+D = (A+B+C).(A+B+C) = (A.B.C)+D
115
Examples: Analyze the circuit below
2. Simplify the Boolean expression found in 1
116
Follow the steps list below (constructing truth table)
List all the input variable combinations of 1 and 0 in binary sequentially Place the output logic for each combination of input Base on the result found write out the boolean expression.
117
Exercises: Simplify the following Boolean expressions
(AB(C + BD) + AB)C ABC + ABC + ABC + ABC + ABC Write the Boolean expression of the following circuit.
118
Boolean Algebra 1. 3. 5. 7. 9. 2. 4. 6. 8. 10. 12. 14. 16. X + Y Y + X
+ 0 = + 1 X + X X = X 2. 4. 6. 8. X . 1 = . 0 X . X 10. 12. 14. 16. X + Y Y + X = (X + Y) Z + X + (Y Z) X(Y + XY XZ X . Y 11. 13. 15. 17. XY YX = (XY) Z X(Y Z) X + YZ (X + Y) (X + Z) X . Y X + Y Commutative Associative Distributive DeMorgan ’ s
119
More on … De Morgans’ theorems From Logic Circuit to Truth Table
From Truth Table to Boolean Expression, and vice versa
120
De Morgan’s Theorems
121
Figure 4– Gate equivalencies and the corresponding truth tables that illustrate DeMorgan’s theorems. Notice the equality of the two output columns in each table. This shows that the equivalent gates perform the same logic function. Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
122
Apply De Morgan’s theorems:
123
From Logic Circuit to Boolean Algebra
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
124
Effect of Simplification using Boolean Algebra
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
125
From Truth Table to Boolean Expression, and vice versa
126
Tutorial 2 Q2, Q3 & Q4 Extra: Given truth table
Get the output equation, minimize using Boolean rules Sketch the circuit Extra: Apply K-map to output equation obtained from truth table Compare this equation with the one obtained from using Boolean rules
127
Tutorial 2 Q3 & Q4 From TT, get the output equation
Minimize using Boolean rules Minimize using K-map Compare both results Sketch the logic circuit
128
Tutorial 2 Q5 & Q6 Given a Boolean expression
Minimize using Boolean rules Minimize using K-map Compare both results Sketch the truth table Sketch the logic circuit
129
Standard Forms of Boolean Expressions
Sum of Products (SOP) Products of Sum (POS) Notes: SOP and POS expression cannot have more than one variable combined in a term with an inversion bar There’s no parentheses in the expression
130
Standard Forms of Boolean Expressions
Converting SOP to Truth Table Examine each of the products to determine where the product is equal to a 1. Set the remaining row outputs to 0.
131
Standard Forms of Boolean Expressions
Converting POS to Truth Table Opposite process from the SOP expressions. Each sum term results in a 0. Set the remaining row outputs to 1.
132
Determine the SOP and POS
133
Determine the SOP and POS
134
Minterm & Maxterm
135
Standard Forms of Boolean Expressions
The standard SOP Expression All variables appear in each product term. Each of the product term in the expression is called as minterm. Example: In compact form, f(A,B,C) may be written as
136
Standard Forms of Boolean Expressions
The standard POS Expression All variables appear in each product term. Each of the product term in the expression is called as maxterm. Example: In compact form, f(A,B,C) may be written as
137
Determine the minterms and maxterms representation
138
Determine the minterms and maxterms representation
139
Converting Product Terms to Standard SOPs
Each product term that does not contain all variables in the domain has to be expanded. Use: Multiply each nonstandard product term by a term made up of the sum of a missing variable and its complement (use Boolean rule above). Repeat (1) until all resulting product terms contain all variables in the domain (either in complemented or noncomplemented forms). Tip: the no. of product terms is doubled for each missing variable
140
Exercise: Convert to standard SOP and Minterm Expression
141
Converting Sum Terms to Standard POS
Each sum term that does not contain all variables in the domain has to be expanded. Use: Add to each nonstandard product term, a term made up of the product of the missing variable and its complement (use Boolean rule above). Apply Repeat (1) until all resulting sum terms contain all variables in the domain (either in complemented or noncomplemented forms).
142
Exercise: Convert to standard POS and Maxterm Expression
143
Converting standard SOP to standard POS
Evaluate each product term in the SOP expression, to determine the binary numbers represented. Determine all of the binary numbers not included in the evaluation in step 1. Write the equivalent sum term for each binary number from step 2 and express in POS form. Similar procedure, in going from POS to SOP
144
Exercise: SOP to POS
145
Boolean Expression & Truth Table
Converting standard SOP to TT Converting standard POS to TT Determining Standard SOP and POS Expressions from TT
146
Standard Forms of Boolean Expressions
Example: Convert the following SOP expression to an equivalent POS expression: Example: Develop a truth table for the expression:
147
THE K-MAP
148
Karnaugh Map (K-Map) Karnaugh Mapping is used to minimize the number of logic gates that are required in a digital circuit. This will replace Boolean reduction when the circuit is large. Write the Boolean equation in a SOP form first and then place each term on a map.
149
Karnaugh Map (K-Map) The map is made up of a table of every possible SOP using the number of variables that are being used. If 2 variables are used then a 2X2 map is used If 3 variables are used then a 4X2 map is used If 4 variables are used then a 4X4 map is used If 5 Variables are used then a 8X4 map is used
150
K-Map SOP Minimization
151
2 Variables Karnaugh Map
B B A Notice that the map is going false to true, left to right and top to bottom B B The upper right hand cell is A B if X= A B then put an X in that cell A 1 a “1” This show the expression true when A = 0 and B = 0
152
2 Variables Karnaugh Map
B B If X=AB + AB then put an X in both of these cells A 1 1 From Boolean reduction we know that A B + A B = B B B From the Karnaugh map we can circle adjacent cell and find that X = B A 1 1
153
3 Variables Karnaugh Map
C C Gray Code 00 A B 01 A B 11 A B 10 A B
154
Figure 4–21 A 3-variable Karnaugh map showing product terms.
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
155
Standard SOP on a 3 Variables K-map
X = A B C + A B C + A B C + A B C Gray Code 00 A B 01 A B 11 A B 10 A B C C 1 1 Each 3 variable term is one cell on a 4 X 2 Karnaugh map 1 1
156
Simplification of standard SOP using K-map
X = A B C + A B C + A B C + A B C Gray Code 00 A B 01 A B 11 A B 10 A B C C One simplification could be X = A B + A B 1 1 1 1
157
Another method of looping for simplification
X = A B C + A B C + A B C + A B C Gray Code 00 A B 01 A B 11 A B 10 A B C C Another simplification could be X = B C + B C A Karnaugh Map does wrap around 1 1 1 1
158
A 2nd method of looping for simplification
X = A B C + A B C + A B C + A B C Gray Code 00 A B 01 A B 11 A B 10 A B C C The Best simplification would be X = B 1 1 1 1
159
Now… Compare the results from the 3 methods of looping..
160
Simplification Results of Looping on a 3 Variables K-map
Looping of: one cell produces a 3 variables term 2 adjacent cells produces a 2 variables term 4 adjacent cells produces a 1 variable term 8 adjacent cells results in a “1”
161
4 Variables Karnaugh Map
Gray Code 00 A B 01 A B 11 A B 10 A B C D C D C D C D
162
Figure 4–22 A 4-variable Karnaugh map.
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
163
Figure 4– Adjacent cells on a Karnaugh map are those that differ by only one variable. Arrows point between adjacent cells. Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
164
Simplify : 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
Gray Code 00 A B 01 A B 11 A B 10 A B C D C D C D C D Now try it with Boolean reductions 1 1 1 1 1 1 X = ABD + ABC + CD
165
Simplification Results of Looping on a 4 Variables K-map
Looping of: One Cell produces a 4 variables term 2 adjacent cells produces a 3 variables term 4 adjacent cells produces a 2 variables term 8 adjacent cells produces 1 variable term 16 adjacent cells results in a “1”
166
Simplify : Z = B C D + B C D + C D + B C D + A B C
Gray Code 00 A B 01 A B 11 A B 10 A B C D C D C D C D 1 1 1 1 1 1 1 1 1 1 1 1 Z = C + A B + B D
167
Simplify using Karnaugh map
First, we need to change the circuit to an SOP expression
168
Simplify using Karnaugh map (cont’d)
Y= A + B + B C + ( A + B ) ( C + D) Y = A B + B C + A B ( C + D ) Y = A B + B C + A B C + A B D Y = A B + B C + A B C A B D Y = A B + B C + (A + B + C ) ( A + B + D) Y = A B + B C + A + A B + A D + B + B D + AC + C D SOP expression
169
Simplify using Karnaugh map (cont’d)
Gray Code 00 A B 01 A B 11 A B 10 A B C D C D C D C D Y = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
170
K-Map POS Minimization
Looping of the zeroes …
171
3 Variables Karnaugh Map
Gray Code 0 0 0 1 1 1 1 0 C AB
172
3 Variables Karnaugh Map (cont’d)
173
4 Variables Karnaugh Map
0 0 0 1 1 1 1 0 C D A B
174
4 Variables Karnaugh Map (cont’d)
175
4 Variables Karnaugh Map (cont’d)
176
Exercises K-Map
177
Figure 4–29 Thomas L. Floyd Digital Fundamentals, 9e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
178
Figure 4–30 Thomas L. Floyd Digital Fundamentals, 9e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
179
Karnaugh Map - Example Mapping a Standard SOP expression Example:
Answer: Mapping a Standard POS expression Using K-Map, convert the following standard POS expression into a minimum SOP expression Y = AB + AC or standard SOP :
180
Mapping with … “Don’t Cares”
181
K-Map with “Don’t Care” Conditions
Example : Input Output 3 variables with output “don’t care (X)”
182
K-Map with “Don’t Care” Conditions (cont’d)
4 variables with output “don’t care (X)”
183
K-Map with “Don’t Care” Conditions (cont’d)
Example: Determine the minimal SOP using K-Map: Answer:
184
Minimum SOP expression is
Solution : CD AB X X X X X 00 01 11 10 AD BC CD Minimum SOP expression is
185
Extra Exercise Minimize this expression with a Karnaugh map
ABCD + ACD + BCD + ABCD
186
The 7-segment LED display
PROJECT The 7-segment LED display
187
Figure 4–47 Seven-segment display format showing arrangement of segments.
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
188
Figure 4–48 Display of decimal digits with a 7-segment device.
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
189
Figure 4–49 Arrangements of 7-segment LED displays.
Active-Low Active-high Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
190
Figure 4–50 Block diagram of 7-segment logic and display.
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
191
To light up the “a” segment
Figure 4– Karnaugh map minimization of the segment-a logic expression. To light up the “a” segment Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
192
Figure 4–52 The minimum logic implementation for segment a of the 7-segment display.
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
193
The 5-variables K-Map
194
Figure 4–42 A 5-variable Karnaugh map.
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
195
Figure 4–43 Illustration of groupings of 1s in adjacent cells of a 5-variable map.
Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
196
Figure 4–44 Thomas L. Floyd Digital Fundamentals, 9e
Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
197
5 variable K-map 5 variables -> 32 minterms, hence 32 squares required
198
K-map Product of Sums simplification
Example: Simplify the Boolean function F(ABCD)=(0,1,2,5,8,9,10) in (a) S-of-p (b) P-of-s Using the maxterms (0’s) and complimenting F Grouping as if they were minterms, then using De Morgen’s theorem to get F. F’(ABCD)= BD’+CD+AB F(ABCD)= (B’+D)(C’+D’)(A’+B’) Using the minterms (1’s) F(ABCD)= B’D’+B’C’+A’C’D
199
5 variable K-map Adjacent squares. E.g. square 15 is adjacent to 7,14,13,31 and its mirror square 11. The centre line must be considered as the centre of a book, each half of the K-map being a page The centre line is like a mirror with each square being adjacent not only to its 4 immediate neighbouring squares, but also to its mirror image.
200
5 variable K-map Example: Simplify the Boolean function F(ABCDE) = (0,2,4,6,11,13,15,17,21,25,27,29,31) Soln: F(ABCDE) = BE+AD’E+A’B’E’
202
How many k-map is needed?
If you have 5 variables, you’ll need 2 k-map… Let’s say the variables are A, B, C, D and E. 0 0 0 1 1 1 1 0 A B C D E = 0
203
How many k-map is needed?
0 0 0 1 1 1 1 0 A B C D
204
Try this out… Simplify the Boolean function F(A,B,C,D,E) = (0,1,4,5,16,17,21,25,29) Soln: F(A,B,C,D,E) = A’B’D’+AD’E+B’C’D’
205
1st step – convert the minterm into Boolean equation
F(A,B,C,D,E) = (0,1,4,5,16,17,21,25,29) How to convert … ?? 0 = 1 =
206
1st step – convert the minterm into Boolean equation
F(A,B,C,D,E) = (0,1,4,5,16,17,21,25,29)
207
2nd – prepare 2 k-map E = 0 E = 1 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 A B
A B C D 0 0 0 1 1 1 1 0 A B C D E = 0 E = 1
208
3rd- plug in the Boolean term/minterm into k-map
0 0 0 1 1 1 1 0 A B C D 0 0 0 1 1 1 1 0 A B C D 1 1 1 1 1 1 1 1 1 E = 0 E = 1
209
4th- look for similar grouping that can be done in both k-map
0 0 0 1 1 1 1 0 A B C D 0 0 0 1 1 1 1 0 A B C D 1 1 1 1 1 1 1 1 1 E = 0 E = 1 That will give us
210
4th- look for similar grouping that can be done in both k-map
0 0 0 1 1 1 1 0 A B C D 0 0 0 1 1 1 1 0 A B C D 1 1 1 1 1 1 1 1 1 E = 0 E = 1 That will give us
211
The combination will look like this…
0 0 0 1 1 1 1 0 A B C D 0 0 0 1 1 1 1 0 A B C D 1 1 1 1 1 1 1 1 1 E = 0 E = 1 That will give us
212
5th- look for the remaining 1’s that has not been included yet
0 0 0 1 1 1 1 0 A B C D 0 0 0 1 1 1 1 0 A B C D 1 1 1 1 1 1 1 1 1 E = 0 E = 1
213
6th- group the remaining 1’s
0 0 0 1 1 1 1 0 A B C D 0 0 0 1 1 1 1 0 A B C D 1 1 1 1 1 1 1 1 1 E = 0 E = 1 That new grouping will give us Note that this time, E need to be included in the term, since the grouping is in the E = 1 k-map only.
214
6th- group the remaining 1’s
0 0 0 1 1 1 1 0 A B C D 0 0 0 1 1 1 1 0 A B C D 1 1 1 1 1 1 1 1 1 E = 0 E = 1 Full expression will be,
215
6 variable K-map 6 variables -> 64 minterms, hence 64 squares required
216
ICS217-Digital Electronics - Part 1.5 Combinational Logic
Tutorial 1.5 1. Simplify the Boolean function F(ABCDE) = (0,1,4,5,16,17,21,25,29) Soln: F(ABCDE) = A’B’D’+AD’E+B’C’D’ 2. Simplify the following Boolean expressions using K-maps. (a) BDE+B’C’D+CDE+A’B’CE+A’B’C+B’C’D’E’ Soln: DE+A’B’C’+B’C’E’ (b) A’B’CE’+A’B’C’D’+B’D’E’+B’CD’+CDE’+BDE’ Soln: BDE’+B’CD’+B’D’E’+A’B’D’+CDE’ (c) F(ABCDEF) = (6,9,13,18,19,27,29,41,45,57,61) Soln: F(ABCDEF) = A’B’C’DEF’+A’BC’DE+CE’F+A’BD’EF ICS217-Digital Electronics - Part 1.5 Combinational Logic
217
END OF Chapter 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.