Karnaugh Maps.

Slides:



Advertisements
Similar presentations
Programming Logic Gate Functions in PLCs
Advertisements

Digital Circuits.
Prof. Sin-Min Lee Department of Computer Science
I NTRODUCTION TO THE K ARNAUGH M AP 1 Alan Clements.
Karnaugh Maps. What are karnaugh maps? Boolean algebra can be represented in a variety of ways. These include: Boolean expressions Truth tables Circuit.

EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Propositional Calculus Math Foundations of Computer Science.
Boolean Algebra and Logic Simplification
Digital Logic and Design Vishal Jethva Lecture No. 10 svbitec.wordpress.com.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
Chapter 3.5 Logic Circuits. How does Boolean algebra relate to computer circuits? Data is stored and manipulated in a computer as a binary number. Individual.
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
1 Digital Logic Design Week 5 Simplifying logic expressions.
Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
CS1Q Computer Systems Lecture 7
February 2, 2004CS 2311 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are AND, OR and.
Computer Systems 1 Fundamentals of Computing Simplifying Boolean Expressions.
CS231 Boolean Algebra1 Summary so far So far: – A bunch of Boolean algebra trickery for simplifying expressions and circuits – The algebra guarantees us.
Karnaugh Maps (K maps). What are Karnaugh 1 maps?  Karnaugh maps provide an alternative way of simplifying logic circuits.  Instead of using Boolean.
Sum-of-Products (SOP)
Chapter 3 Special Section Focus on Karnaugh Maps.
Karnaugh Maps (K-Maps)
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
THE K-MAP.
Circuits & Boolean Expressions. A ABC BC ABC C B A Example # 1: Boolean Expression: Develop a Boolean expression from a circuit.
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
Karnaugh Maps The minimization method using Boolean Algebra, apart from being laborious and requiring the remembering all the laws, can lead to solutions.
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
CS1022 Computer Programming & Principles
Computer Science 210 Computer Organization
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
Lesson Objectives Aims Be able to define problems using Boolean logic
ECE/CS 352 Digital Systems Fundamentals
Dr. Clincy Professor of CS
Karnaugh Maps (K-Maps)
Computer Science 210 Computer Organization
E- Lesson: Karnaugh Maps (K-Map ).
Karnaugh Maps References: Lecture 4 from last semester
Digital Circuits.
Dr. Clincy Professor of CS
Combinational Logic Design Process
Karnaugh Mapping Karnaugh Mapping Digital Electronics
Karnaugh Maps Topics covered in this presentation: Karnaugh Maps
SYEN 3330 Digital Systems Chapter 2 – Part 4 SYEN 3330 Digital Systems.
Karnaugh Mapping Digital Electronics
Karnaugh Mapping Karnaugh Mapping Digital Electronics
Computer Science 210 Computer Organization
Karnaugh Mapping Digital Electronics
Dr. Clincy Professor of CS
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION Part (a)
ECB2212-Digital Electronics K-Map
Dr. Clincy Professor of CS
Chapter 10.3 and 10.4: Combinatorial Circuits
CS Chapter 3 (3A and ) – Part 3 of 5
Dr. Clincy Professor of CS
From now on: Combinatorial Circuits:
Chapter 3 Special Section
Karnaugh Maps (K maps).
Copyright © Cengage Learning. All rights reserved.
Laws & Rules of Boolean Algebra
2-2 Logic Part 2 Truth Tables.
Digital Circuits.
Computer Architecture
Digital Circuits.
Presentation transcript:

Karnaugh Maps

Boolean algebra can be represented in a variety of ways. These include: Boolean expressions Truth tables Circuit diagrams Another method is the Karnaugh Map (also known as the K-map) K-maps are particularly useful for simplfying boolean expressions What are karnaugh maps?

2 variable K-Map Starting with the Expression: A ∧ B As a Truth Table this would be: As a Circuit Diagram this would be: A K-Map, will be a small grid with 4 boxes, one for each combination of A and B. Each grid square has a value for A and a value for B. To complete the K-Map for the expression, you find the box in the row where A is true and the column where B is true, put a 1 in the box that is in both rows. A B A ∧ B 1 2 variable K-Map 1

One way to view a K-Map is to figure out what the ‘address’ is for each box: what its A and B values are for each position These have been written in the format (A, B) (0,0) (0,1) (1,0) (1,1) 2 variable K-Map

2 variable K-Map To create a K-map for the expression: A Place 1s in all the boxes in the row where A is true 2 variable K-Map 1 1

2 variable K-Map To create a K-Map for the expression B Place 1s in all the boxes in the column where B is true 2 variable K-Map 1 1

2 variable K-Map Expression: ~A ∧ B Find the row where A is false and the column where B is true Place a 1 in the overlapping position 1 2 variable K-Map

2 variable K-Map Try working backwards! Starting with the K-Map, interpret the results and write an expression Highlight the row that contains the 1 Is it A or ~A? Highlight the column that contains the 1 Is it B or ~B? Write down your two variables and join them with an AND (∧) 2 variable K-Map 1

2 variable K-Map Try working backwards! Starting with the K-Map, interpret the results and write an expression Highlight the row that contains the 1 Is it A or ~A? Highlight the column that contains the 1 Is it B or ~B? Write down your two variables and join them with an AND (∧) 2 variable K-Map 1 1

In a 3 variable K-Map, we need to accommodate 8 possible combinations of A, B and C We’ll start by figuring out the ‘address’ for each position (A, B, C) (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,1,0) (1,1,1) (1,0,0) (1,0,1) 3 variable K-Map

3 variable K-Map If we had a K-Map where the expression was B We would place 1s in every box where B is true We ignore the values of A and C, because they are not written in our expression 3 variable K-Map 1 1 1

3 variable K-Map ~A ∧ C Create a K-map for the expression: Highlight rows where A is false Highlight columns where C is true Place 1s in all the overlapping boxes Note: We can ignore the values of B, because they are not mentioned in the expression 1 3 variable K-Map

3 variable K-Map To create the K-Map for the expression A ∧B∧~C Highlight rows where A is true Highlight rows where B is false Highlight columns where C is false Place 1s in all the overlapping boxes 3 variable K-Map

This time we’ll start with a K-map and find the expression. Identify any groupings (in this case we have a pair) What is the value of A for both items in the pair? What is the value of B for both items in the pair? What is the value of C for both items in the pair? 1 3 variable K-Map

This time we’ll start with a K-map and find the expression. Identify any groupings (in this case we have a pair) What is the value of A for both items in the pair? What is the value of B for both items in the pair? What is the value of C for both items in the pair? Because B is both true and false, it does not affect the answer and can be ignored 1 ~A ∧ C 3 variable K-Map

3 variable K-Map Determine the expression represented by this K-map Identify any groupings What is the value of A for both items in the pair? What is the value of B for both items in the pair? What is the value of C for both items in the pair? 3 variable K-Map 1

3 variable K-Map Determine the expression represented by this K-map Identify any groupings (I see two pairs) What is the value of A for both items in the first pair? What is the value of B for both items in the first pair? What is the value of C for both items in the first pair? First Pair: What is the value of A for both items in the second pair? What is the value of B for both items in the second pair? What is the value of C for both items in the second pair? Second Pair: Put brackets around each pair and combine them with an OR 1 1 3 variable K-Map 1

3 variable K-Map Working backwards to build an expression First Pair: Identify any groupings (I see two pairs) What are the value of A, B, C values for the first pair? What are the value of A, B, C values for the second pair? First Pair: Second Pair: Put brackets around each pair and combine them with an OR 1 3 variable K-Map 1

3 variable K-Map Working backwards to build an expression Identify any groupings (I see two pairs) When I look more closely, I can see they are both ~B, so perhaps I can view it as a group of 4 What are the value of A, B, C values for the group? 1 1 3 variable K-Map 1 1

K-Map Notes Some notes to add at this point: Groupings can only be exact binary values: 1, 2, 4, 8 You cannot have a groupings of 3 Groups can overlap The bigger the groupings, the simpler the resulting expression/circuit When converting from a truth table to a K-Map, simply use the values in the TT to find the position values within the K-Map K-Map Notes

In a 4 variable K-Map, we need to accommodate 16 possible combinations of A, B, C and D We’ll start by figuring out what the ‘address’ for each position (A, B, C, D) (0,0,0,0) (0,0,0,1) (0,0,1,1) (0,0,1,0) (0,1,0,0) (0,1,0,1) (0,1,1,1) (0,1,1,0) (1,1,0,0) (1,1,0,1) (1,1,1,1) (1,1,1,0) (1,0,0,0) (1,0,0,1) (1,0,1,1) (1,0,1,0) 4 variable K-Map

4 variable K-Map If we had a K-Map where the expression was D We would place 1s in every box where D is true We ignore the values of A, B and C, because they are not written in our expression 1 1 4 variable K-Map

If we had a K-Map where the expression was: A ∧ ~B ∧ ~C ∧ ~D We would highlight the Rows where A is true Rows where B is false Columns where C is false Columns where D is false place 1s in all the overlapping boxes (When you have all 4 variables in your expression, it will only result in a single value in the K-Map) 1 4 variable K-Map

4 variable K-Map If we had a K-Map where the expression was: (A ∧D) We highlight the: Rows where A is true Columns where D is true Put 1s in all overlapping boxes 1 1 4 variable K-Map

If we had a K-Map where the expression was: (A ∧B) ∨(B∧C ∧~D) We would work with one pair at a time. For each part of the expression: Identify the overlapping boxes Place 1s in them We have resulted in a: Group of 4 Pair 1 1 1 1 1 4 variable K-Map

4 variable K-Map Working backwards Identify any groupings (I see a group of 4) What is the value of A for the items in the group? What is the value of B for the items in the group? What is the value of C for the items in the group? What is the value of D for the items in the group? 1 1 1 1 4 variable K-Map

4 variable K-Map Working backwards Identify any groupings (I see a group of 4 and a pair) What are the values of A, B, C and D for the group? What are the values of A, B, C and D for the pair? Solution 1 1 1 1 1 1 4 variable K-Map

Often we are asked to write an expression based on a truth table, this can result in pretty complicated expressions that require simplification using logic laws Using a K-Map can aid the simplification process K-Maps & Truth Tables

K-Maps & Truth Tables Let’s start with a Truth Table To build an expression we would normally write an expression (using AND’s) for each row resulting in true and combine those with ORs This produces a really big expression that will be difficult to simplify using the logic laws A B C Solution 1 (~A∧~B∧C)∨(~A∧B∧C)∨(A∧~B∧C)∨(A∧B∧~C)∨(A∧B∧C) K-Maps & Truth Tables

Rather than converting straight to an expression, let’s try placing the values in a Karnaugh Map. Place 1s in the appropriate positions, according to the Truth Table This highlights a group of 4 and a pair From this we can write a simpler expression A B C Solution 1 1 1 1 1 1 K-Maps & Truth Tables

Practise, Practise, Practise The best way to learn how to work with K-Maps is to apply your new knowledge to some Karnaugh Maps worksheets Practise, Practise, Practise