Computer Organization I. Lecture 8: Boolean Algebra and Circuit Optimization

Similar documents
BOOLEAN ALGEBRA & LOGIC GATES

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

Simplifying Logic Circuits with Karnaugh Maps

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

Boolean Algebra Part 1

Chapter 2: Boolean Algebra and Logic Gates. Boolean Algebra

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

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

DESIGN OF GATE NETWORKS

Gates, Circuits, and Boolean Algebra

CH3 Boolean Algebra (cont d)

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

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

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

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

CSE140: Components and Design Techniques for Digital Systems

Unit 3 Boolean Algebra (Continued)

CHAPTER 3 Boolean Algebra and Digital Logic

Logic Reference Guide

Two-level logic using NAND gates

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

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

Lecture 5: Gate Logic Logic Optimization

Understanding Logic Design

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

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

1.4. Arithmetic of Algebraic Fractions. Introduction. Prerequisites. Learning Outcomes

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

Binary Adders: Half Adders and Full Adders

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Lecture 8: Synchronous Digital Systems

2.0 Chapter Overview. 2.1 Boolean Algebra

Online EFFECTIVE AS OF JANUARY 2013

3.Basic Gate Combinations

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

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

Click on the links below to jump directly to the relevant section

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Let s put together a Manual Processor

Basic Logic Gates Richard E. Haskell

Course Requirements & Evaluation Methods

ENGI 241 Experiment 5 Basic Logic Gates

NAND and NOR Implementation

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

Introduction to Matrices for Engineers

Numerical and Algebraic Fractions

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

Geometry 1. Unit 3: Perpendicular and Parallel Lines

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

Algebra Cheat Sheets

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

NEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.

Introduction to Digital Logic with Laboratory Exercises

Computer Engineering 290. Digital Design: I. Lecture Notes Summer 2002

Elementary Logic Gates

Lecture 2 Matrix Operations

Logic in Computer Science: Logic Gates

5.3 The Cross Product in R 3

Chapter 7 Memory and Programmable Logic

ELEC EXPERIMENT 1 Basic Digital Logic Circuits

Combinational Logic Design Process

Combinational circuits

Intermediate Math Circles October 10, 2012 Geometry I: Angles

Operations with Algebraic Expressions: Multiplication of Polynomials

Digital Electronics Detailed Outline

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

Boolean Algebra. Boolean Algebra. Boolean Algebra. Boolean Algebra

Algebraic Properties and Proofs

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Unit 6 Trigonometric Identities, Equations, and Applications

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

COMPUTER SCIENCE. Paper 1 (THEORY)

5.5. Solving linear systems by the elimination method

expression is written horizontally. The Last terms ((2)( 4)) because they are the last terms of the two polynomials. This is called the FOIL method.

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

PYTHAGOREAN TRIPLES KEITH CONRAD

Figure 8-1 Four Possible Results of Adding Two Bits

Applications of Fermat s Little Theorem and Congruences

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

ANALOG & DIGITAL ELECTRONICS

Linear Algebra Notes for Marsden and Tromba Vector Calculus

Adder.PPT(10/1/2009) 5.1. Lecture 13. Adder Circuits

C H A P T E R. Logic Circuits

CS311 Lecture: Sequential Circuits

EE360: Digital Design I Course Syllabus

We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: b + 90c = c + 10b

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

Counters and Decoders

Computer Programming Lecturer: Dr. Laith Abdullah Mohammed

To Evaluate an Algebraic Expression

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

8.2. Solution by Inverse Matrix Method. Introduction. Prerequisites. Learning Outcomes

Crosswalk Directions:

Introduction to Fractions

The University of the State of New York REGENTS HIGH SCHOOL EXAMINATION GEOMETRY. Tuesday, August 13, :30 to 11:30 a.m., only.

Digital Circuit Design

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

Transcription:

Computer Organization I Lecture 8: Boolean Algebra and Circuit Optimization

Overview The simplification from SOM to SOP and their circuit implementation Basics of Logic Circuit Optimization: Cost Criteria Boolean Function Optimization (1) Algebraic Manipulation (2) Karnaugh map

Objectives Understand how to compare implementation cost of two circuits according to cost criteria To know how to use algebraic manipulation to simplify the logic function To understand the basic concepts of Karnaugh map

A Simplification Example from SOM to SOP A Simplification Example: F (A,B,C) = Ʃm (1,4,5,6,7) Writing the minterm expression: F = A B C + A B C + A B C + ABC + ABC Simplifying: F = A + B C Simplified F contains 3 literals compared to 15 in minterm F

AND/OR Two-level Diagram of SOM and SOP The two implementations for F are shown below it is quite apparent which is simpler! F in SOM include 15 literals and 6 logic gates; while F in SOP include 3 literals and 2 logic gates A B C A B C A B C A B C A B C F A B C We assume the input variables are directly available in their complemented and uncomplemented forms F

Some Conclusions on SOM/SOP and SOM/POM So far we have known: Standard Forms (Sum-of-minterms, Product-of-Maxterms), or alternative standard form (SOP, POS) differ in complexity Boolean algebra can be used to manipulate equations into simpler forms. Simpler equations lead to simpler two-level implementations Questions left to us: Is there only one minimum cost circuit? apply the cost criteria to compare complexity of circuits How can we attain a simplest expression? apply Boolean algebraic manipulations or graphical technique (i.e. Karnaugh maps, K-maps) to simply (or optimize) expression

Cost Criteria of Logic Circuit Implementation Literal Cost (L) Gate Input Cost (G) Gate Input Cost with NOTs (GN)

Cost Criteria of Logic Circuit Implementation - Literal Cost Literal a variable or its complement Literal cost the number of literal appearances in a Boolean expression corresponding to the logic circuit diagram Examples: F = BD + AB C + ACD L = 8 F = BD + ABC + ABD + ABC L = 11 F = (A + B)(A + D)(B + C + D)(B + C + D) L = 10 Which solution is best?

Cost Criteria of Logic Circuit Implementation - Gate Input Cost Gate Input Costs - the number of inputs to the gates in the implementation corresponding exactly to the given equation or equations. It can be found from the equation(s) by finding the sum of: all literal appearances the number of terms excluding single literal terms, and optionally, the number of distinct complemented single literals Gate input cost denoted by G if inverters not counted or GN if inverters counted. Example: F = BD + ABC + ACD G = 11, GN = 14 F = BD + ABC + ABD + ABC G =?, GN =? F = (A + B)(A + D)(B + C + D)(B + C + D) G =?, GN =?

Cost Criteria of Logic Circuit Implementation - An Example Example 1: F = A + B C + B C GN = G + 2 = 9 L = 5 G = L + 2 = 7 B C A F L (literal count) counts the AND inputs and the single literal OR input. G (gate input count) adds the remaining OR gate inputs GN(gate input count with NOTs) adds the inverter inputs Chapter 2 -Part 2 10

Cost Criteria of Logic Circuit Implementation - Another Example Example 2: F = A B C + A B C L = 6 G = 8 GN = 11 F = (A + C)(B + C)(A + B) L = 6 G = 9 GN = 12 Same function and same literal cost But first circuit has better gate input count and better gate input count with NOTs Select it! A B C A B C F F

Boolean Function Optimization - What means an optimal function An optimal function can minimize the gate input (or literal) cost of a (a set of) Boolean equation(s) and thus reducing circuit cost. An optimal function has a minimum gate input cost is reasonable since it measures directly number of transistors and wires used in implementing a circuit. The simplest expression is not necessarily unique, sometimes 2 or more expressions satisfy cost criterion applied, in this case either solution is satisfactory from the cost standpoint

Boolean Function Optimization - Approach 1: Algebraic Manipulation Four common rules are frequently applied for simplifying logic functions (1) complement rule: A + A = 1 e.g. A (BC + BC) + ABC + ABC = A (2) absorption rule: A + AB = A e.g. AB + ABC (D + E) = AB (3) a common rule: A + AB = A + B e.g. AB + AC + BC = AB + C (4) an expansion rule: A 1 = A and A + A = 1 e.g. AB + ABC + BC = AB + AC

Why use K-map? Boolean Function Optimization - Approach 2: Karnaugh Maps (K-map) The algebraic manipulation depends on your familiarity with all the laws, rules of Boolean algebra, the K-map, however, Provides a systematic means for: Finding optimum or near optimum SOP and POS forms, and two-level AND/OR and OR/AND circuit implementations for functions with small numbers of variables (usually number of variables no more than 4) Visualizing concepts related to manipulating Boolean expressions, and Demonstrating concepts used by computer-aided design programs to simplify large circuits

Boolean Function Optimization - Approach 2: Karnaugh Maps (K-map) What is K-map? K-map is an array of squares, in which Each square represents a minterm; number of squares equal to number of minterms; given Num. of Variables n, total num. of squares is 2 n The array of squares is a graphical representation of a Boolean function and can be considered as an reorganization of truth table y x 0 1 0 1 m 0 m 1 m 2 m 3 y z x 0 1 00 01 11 10 m 0 m 3 m 2 m 4 m 1 m 5 m 7 m 6

Boolean Function Optimization - Approach 2: Karnaugh Maps (K-map) Main Feature of K-map? In K-map, each square is physically adjacent to the squares that are immediately next to it on any of its four side Any two squares are physically adjacent means they are logically adjacent (i.e. the two squares differ in one or only one literal which appears uncomplemented in one and complemented in the other) Logically, squares in the top row are adjacent to the corresponding row in the bottom, similarly for squares in the outer left and outer right y z y x 0 1 0 1 m 0 m 1 m 2 m 3 x 0 1 00 01 11 10 m 0 m 3 m 2 m 4 m 1 m 5 m 7 m 6

Karnaugh Maps (K-map) - An Example: Two Variable K-map A 2-variable Karnaugh Map: Note that minterm m 0 and minterm m 1 are adjacent and differ in the value of the variable y x y Similarly, minterm m 0 and x y minterm m 2 differ in the x variable. Also, m 1 and m 3 differ in the x variable as well. Finally, m 2 and m 3 differ in the value of the variable y y = 0 y = 1 x = 0 m 0 = m 1 = x y x = 1 m 2 = m 3 = x y

Summary Simplification from SOM to SOP Cost Criteria for Comparing Complexity of Circuit Implementation Basics of K-map, including why use K-map, what is K- map and its adjacent attribute.

Thank you Q & A