In this lecture: Lecture 5: Logic Simplification & Karnaugh Maps

Similar documents
BOOLEAN ALGEBRA & LOGIC GATES

Karnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012

CSE140: Midterm 1 Solution and Rubric

CSEE 3827: Fundamentals of Computer Systems. Standard Forms and Simplification with Karnaugh Maps

Simplifying Logic Circuits with Karnaugh Maps

Chapter 2: Boolean Algebra and Logic Gates. Boolean Algebra

Boolean Algebra Part 1

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation

Introduction. The Quine-McCluskey Method Handout 5 January 21, CSEE E6861y Prof. Steven Nowick

Boolean Algebra (cont d) UNIT 3 BOOLEAN ALGEBRA (CONT D) Guidelines for Multiplying Out and Factoring. Objectives. Iris Hui-Ru Jiang Spring 2010

Gates, Circuits, and Boolean Algebra

Digital circuits make up all computers and computer systems. The operation of digital circuits is based on

Lecture 5: Gate Logic Logic Optimization

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

2.0 Chapter Overview. 2.1 Boolean Algebra

Binary Adders: Half Adders and Full Adders

CH3 Boolean Algebra (cont d)

Karnaugh Maps (K-map) Alternate representation of a truth table

Unit 3 Boolean Algebra (Continued)

Boolean Algebra. Boolean Algebra. Boolean Algebra. Boolean Algebra

CSE140: Components and Design Techniques for Digital Systems

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Properties of Real Numbers

Read-only memory Implementing logic with ROM Programmable logic devices Implementing logic with PLDs Static hazards

CHAPTER 3 Boolean Algebra and Digital Logic

Logic Reference Guide

Combinational circuits

Trigonometry for AC circuits

Combinational Logic Design Process

Scilab Textbook Companion for Digital Electronics: An Introduction To Theory And Practice by W. H. Gothmann 1

Two-level logic using NAND gates

Gates & Boolean Algebra. Boolean Operators. Combinational Logic. Introduction

EG1108: Electrical Engineering

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Basic Logic Gates Richard E. Haskell

Lecture 2 Matrix Operations

2004 Solutions Ga lois Contest (Grade 10)

3.Basic Gate Combinations

ANALOG & DIGITAL ELECTRONICS

Digital Electronics Detailed Outline

Vocabulary. Term Page Definition Clarifying Example. biconditional statement. conclusion. conditional statement. conjecture.

1.4 Compound Inequalities

Lecture 8: Synchronous Digital Systems

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Unit 6 Trigonometric Identities, Equations, and Applications

6. BOOLEAN LOGIC DESIGN

Mathematics Common Core Sample Questions

DESIGN OF GATE NETWORKS

Advanced Logic Design Techniques in Asynchronous Sequential Circuit Synthesis

Integer Operations. Overview. Grade 7 Mathematics, Quarter 1, Unit 1.1. Number of Instructional Days: 15 (1 day = 45 minutes) Essential Questions

Math 115 Spring 2011 Written Homework 5 Solutions

AIP Factoring Practice/Help

Common Core Unit Summary Grades 6 to 8

CM2202: Scientific Computing and Multimedia Applications General Maths: 2. Algebra - Factorisation

Grade Level Year Total Points Core Points % At Standard %

A Concrete Introduction. to the Abstract Concepts. of Integers and Algebra using Algebra Tiles

COMPUTER SCIENCE. Paper 1 (THEORY)

Understanding Logic Design

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576

called and explain why it cannot be factored with algebra tiles? and explain why it cannot be factored with algebra tiles?

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

EE360: Digital Design I Course Syllabus

Higher Education Math Placement

In mathematics, there are four attainment targets: using and applying mathematics; number and algebra; shape, space and measures, and handling data.

ENGI 241 Experiment 5 Basic Logic Gates

Use order of operations to simplify. Show all steps in the space provided below each problem. INTEGER OPERATIONS

The Deadly Sins of Algebra

Counters and Decoders

Elementary Logic Gates

Switching Algebra and Logic Gates

Unit 7: Radical Functions & Rational Exponents

(Refer Slide Time: 2:03)

Mixed Logic A B A B. 1. Ignore all bubbles on logic gates and inverters. This means

DEFINITIONS. Perpendicular Two lines are called perpendicular if they form a right angle.

Philadelphia University Faculty of Information Technology Department of Computer Science Semester, 2007/2008.

ELEC EXPERIMENT 1 Basic Digital Logic Circuits

EQUATIONS and INEQUALITIES

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, The Binary Adder

MATH Fundamental Mathematics IV

3.1 Solving Systems Using Tables and Graphs

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Operations with positive and negative numbers - see first chapter below. Rules related to working with fractions - see second chapter below

Basic Proof Techniques

Radicals - Rationalize Denominators

Access Code: RVAE4-EGKVN Financial Aid Code: 6A9DB-DEE3B-74F

IV. ALGEBRAIC CONCEPTS

Sum-of-Products and Product-of-Sums expressions

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

Digital Controller for Pedestrian Crossing and Traffic Lights

Geometry Module 4 Unit 2 Practice Exam

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

MATH 21. College Algebra 1 Lecture Notes

Counters are sequential circuits which "count" through a specific state sequence.

Geometry 1. Unit 3: Perpendicular and Parallel Lines

SOLVING QUADRATIC EQUATIONS - COMPARE THE FACTORING ac METHOD AND THE NEW DIAGONAL SUM METHOD By Nghi H. Nguyen

Algebra III. Lesson 33. Quadrilaterals Properties of Parallelograms Types of Parallelograms Conditions for Parallelograms - Trapezoids

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Transcription:

In this lecture: Lecture 5: Logic Simplification & Karnaugh Maps Dr Pete Sedcole Department of E&E Engineering Imperial College London http://cas.ee.ic.ac.uk/~nps/ (Floyd 4.5 4.) (Tocci 4. 4.5) Standard form of Boolean Expression: Sum-of-Products & Product-of-Sums (SOP/POS) Canonical form Boolean simplification with Boolean algebra Boolean simplification with Karnaugh Maps The Don t care logic state E.2 Digital Electronics 5. 3 October 28 E.2 Digital Electronics 5.2 3 October 28 Forms of Boolean Expressions Sum-of-products (SOP) e.g.: + DEF + AEF the product (AND) terms are formed first, then summed (OR) Product-of-sums (POS) e.g.: Y (A+B+E)(C+D+E)(B+F) the sum (OR) terms are formed first, then the product (AND) It is possible to convert between the two forms using DeMorgan s theorems. E.2 Digital Electronics 5.3 3 October 28 Canonical form In the canonical form of a Boolean expression, every variable appears in every term e.g.: f ( A, B, C, D) D + D + D Canonical form is not an efficient way of writing the Boolean expression, but is useful sometimes in design and analysis E.2 Digital Electronics 5.4 3 October 28

How do we find the canonical form of an expression? Start with the SOP (sum-of-products) form AND each incomplete expression with + where is the missing variable e.g.: f ( A, B, C) AB + BC AB( C + C ) + ( A + A) BC + + + + + The product term in a canonical SOP expression is called a minterm E.2 Digital Electronics 5.5 3 October 28 Canonical form and notation Construct the truth table for the function f ( A, B, C) + + Row number 2 3 4 5 6 7 A An alternative notation: write f as a sum of the row numbers that have TRUE minterms: E.2 Digital Electronics 5.6 3 October 28 B f (3,6,7) C f Simplifying logic circuits Method : Minimisation by Boolean Algebra Obtain the expression of the circuit s function, then try to simplify We will look at two methods: Algebraic and Karnaugh maps E.2 Digital Electronics 5.7 3 October 28 Make use of rules and theorems of Boolean algebra to simplify the Boolean expression Try to reduce the complexity of the equation, so that the circuit is also less complex This method relies on your algebraic skill Three things you can try E.2 Digital Electronics 5.8 3 October 28

Given: Write it as Then apply Minimised form: Tool : Grouping A + AB + A (+ B) + BC BC ( + B) A + BC Tool 2: ANDing with redundant logic ANDing an expression with ( + ) or ( + ) does not alter the logic ANDing then expanding may enable an expression to be simplified Example: AB + AC + BC AB( C + C ) + AC + BC + + AC + BC BC( + A) + AC ( + B) BC + AC E.2 Digital Electronics 5.9 3 October 28 E.2 Digital Electronics 5. 3 October 28 Tool 3: DeMorgan s Theorems Example of logic design Inversions of compound expressions can be simplified using DeMorgan s Theorems Example: + ACD + BC ( A + B + C ) + ( A + C + D) + BC A + B + C + D + BC A + B + C + D D E.2 Digital Electronics 5. 3 October 28 Design a logic circuit having three inputs (A, B, C) that will have its output HIGH only when a majority of the inputs are HIGH Step : Draw the truth table Step 2: Write the product terms for each case where the output is A E.2 Digital Electronics 5.2 3 October 28 B C Z

Step 3: Write the SOP form for the output Step 5: Implement the circuit Z + + + Step 4: Using the rules of Boolean algebra, try to simplify the expression Z + + + + + + + + BC( A + A) + AC( B + B) + AB( C + C ) BC + AC + AB E.2 Digital Electronics 5.3 3 October 28 E.2 Digital Electronics 5.4 3 October 28 Minimisation using Karnaugh Maps What is a Karnaugh map? A grid of squares An example with three variables: A BC Similar to a truth table: shows the output value for every combination of inputs Each square represents a minterm Only one variable changes between adjacent squares (similar to Gray Codes) Squares at the edges are adjacent to squares on the opposite edges Corresponds to minterm An example with 4 variables: AB\CD The square marked? represents:??? The square marked?? represents: Note that they differ only in the C variable D D E.2 Digital Electronics 5.5 3 October 28 E.2 Digital Electronics 5.6 3 October 28

Filling out a Karnaugh Map Write the Boolean expression in SOP form For each product term, write a in all the squares which are included in the term Write a in the remaining blank squares Example: + + AB A \ BC Minimisation technique Minimisation is done by spotting patterns of s and s The rules of algebra can be used to describe the patterns in simple product terms For example, take a pair of adjacent s: Adjacent squares differ by one variable The expression for a pair of adjacent s has the form: ( P ) C + ( P) C ( P)( C + C ) This can be simplified to just P E.2 Digital Electronics 5.7 3 October 28 E.2 Digital Electronics 5.8 3 October 28 The example from an earlier slide: A \ BC The adjacent squares and differ only in A Therefore they can be combined into just BC Normally we draw boxes around the squares to be combined + + AB A \ BC Cover all the s with the largest groups The simplified Boolean expression is found by summing all the terms corresponding to each group AC + BC + AB Can do this for larger groups of s (of 4, 8, ) E.2 Digital Electronics 5.9 3 October 28 E.2 Digital Electronics 5.2 3 October 28

More examples of grouping AB\CD AB\CD AB + C D B D + E.2 Digital Electronics 5.2 3 October 28 E.2 Digital Electronics 5.22 3 October 28 E.2 Digital Electronics 5.23 3 October 28 E.2 Digital Electronics 5.24 3 October 28

K-map simplification Complete K-map simplification process Goal: find the form of a Boolean expression with the minimum number of product terms Method: group together s on a K-map Constraints: all s must be part of a group (even if it is a single group) all groups must be of size, 2, 4, 8, 6,. Construct the K-map and place s and s in the squares according to the SOP expression or truth table 2. Find the largest grouping of s that are not already all in a group; if there is more than one possibility, choose a grouping that minimises the total number of groups 3. Repeat step 2 until only isolated s remain 4. Form single groups of the remaining isolated s 5. Find the product term that corresponds to each group 6. OR together all the product terms E.2 Digital Electronics 5.25 3 October 28 E.2 Digital Electronics 5.26 3 October 28 Don t Care conditions In certain cases some input combinations may never occur, or the output doesn t matter when they do In this case we fill in the truth table / K-map with an means don t care (it is not a Boolean variable) acts like a joker or wildcard it can be either a or a depending on which value will help the minimisation Example: can be or, but the best minimisation is if A \ BC Z B E.2 Digital Electronics 5.27 3 October 28 E.2 Digital Electronics 5.28 3 October 28

More don t care examples Open the lift doors when the lift is stopped at a floor F2 F3 F2 F3 F2 F3 F2 F3 M F M F M F OPEN MF+ MF2 + MF3 M F E.2 Digital Electronics 5.29 3 October 28 E.2 Digital Electronics 5.3 3 October 28 The Karnaugh map of 5 variables K-map method summary AB\CD AB\CD E E Compared to algebraic manipulation, the K-map method is a more structured process requiring a fixed number of steps K-maps always produce a minimum expression The minimum expression is in general NOT unique For circuits with a large number of inputs (more than 4) other, more complex techniques must be used E.2 Digital Electronics 5.3 3 October 28 E.2 Digital Electronics 5.32 3 October 28

Summary SOP and POS are useful forms of Boolean equations Designing a combinational logic circuit:. Construct a truth table 2. Convert it to SOP 3. Simplify using Boolean algebra or a K-map 4. Implement A Karnaugh map is a graphical method for representing and simplifying Boolean expressions Don t care entries in a K-map can take values of or depending on which value is more helpful in the simplification E.2 Digital Electronics 5.33 3 October 28