Chapter 2: Boolean Algebra and Logic Gates. Boolean Algebra



Similar documents
Boolean Algebra Part 1

BOOLEAN ALGEBRA & LOGIC GATES

CSE140: Midterm 1 Solution and Rubric

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

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

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

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

Unit 3 Boolean Algebra (Continued)

Gates, Circuits, and Boolean Algebra

Systems of Linear Equations: Solving by Substitution

Elementary Logic Gates

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

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

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

CH3 Boolean Algebra (cont d)

2.0 Chapter Overview. 2.1 Boolean Algebra

MATH 102 College Algebra

Basic Logic Gates Richard E. Haskell

Boolean Algebra. Boolean Algebra. Boolean Algebra. Boolean Algebra

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

Section 7.2 Linear Programming: The Graphical Method

Zero and Negative Exponents and Scientific Notation. a a n a m n. Now, suppose that we allow m to equal n. We then have. a am m a 0 (1) a m

Simplifying Logic Circuits with Karnaugh Maps

SECTION 2.2. Distance and Midpoint Formulas; Circles

SECTION 5-1 Exponential Functions

LESSON EIII.E EXPONENTS AND LOGARITHMS

5.2 Inverse Functions

Logic in Computer Science: Logic Gates

Introduction to Matrices for Engineers

Lecture 5: Gate Logic Logic Optimization

Switching Algebra and Logic Gates

Understanding Logic Design

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

THE POWER RULES. Raising an Exponential Expression to a Power

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

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

CSE140: Components and Design Techniques for Digital Systems

Logic Reference Guide

Graphing Linear Equations

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

Exponential and Logarithmic Functions

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

Higher. Polynomials and Quadratics 64

ENGI 241 Experiment 5 Basic Logic Gates

INVESTIGATIONS AND FUNCTIONS Example 1

Polynomials. Jackie Nicholas Jacquie Hargreaves Janet Hunter

Chapter 1. Computation theory

CHAPTER 7: FACTORING POLYNOMIALS

C3: Functions. Learning objectives

Direct Variation. 1. Write an equation for a direct variation relationship 2. Graph the equation of a direct variation relationship

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

Solving Systems of Equations

MAT188H1S Lec0101 Burbulla

Slope-Intercept Form and Point-Slope Form

7.3 Solving Systems by Elimination

Chapter 6 Quadratic Functions

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

Downloaded from equations. 2.4 The reciprocal function x 1 x

Two-level logic using NAND gates

Mathematics Placement Packet Colorado College Department of Mathematics and Computer Science

So, using the new notation, P X,Y (0,1) =.08 This is the value which the joint probability function for X and Y takes when X=0 and Y=1.

Section V.2: Magnitudes, Directions, and Components of Vectors

D.2. The Cartesian Plane. The Cartesian Plane The Distance and Midpoint Formulas Equations of Circles. D10 APPENDIX D Precalculus Review

SECTION 7-4 Algebraic Vectors

ELEC EXPERIMENT 1 Basic Digital Logic Circuits

Introduction to Digital Logic with Laboratory Exercises

Example 1: Model A Model B Total Available. Gizmos. Dodads. System:

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

2 Elements of classical computer science

Algebraic Properties and Proofs

y 1 x dx ln x y a x dx 3. y e x dx e x 15. y sinh x dx cosh x y cos x dx sin x y csc 2 x dx cot x 7. y sec 2 x dx tan x 9. y sec x tan x dx sec x

MATH REVIEW SHEETS BEGINNING ALGEBRA MATH 60

Graphing Quadratic Equations

Zeros of Polynomial Functions. The Fundamental Theorem of Algebra. The Fundamental Theorem of Algebra. zero in the complex number system.

Affine Transformations

Mathematical goals. Starting points. Materials required. Time needed

Addition and Subtraction of Vectors

Teaching Digital Circuit Design to Middle-School Students

Name Date. Break-Even Analysis

SAMPLE. Polynomial functions

Digital Electronics Detailed Outline

Chapter 7 Memory and Programmable Logic

DESIGN OF GATE NETWORKS

Core Maths C2. Revision Notes

SOLUTIONS MANUAL DIGITAL DESIGN FOURTH EDITION M. MORRIS MANO California State University, Los Angeles MICHAEL D.

We start with the basic operations on polynomials, that is adding, subtracting, and multiplying.

4.1 Ordinal versus cardinal utility

Functions and Graphs CHAPTER INTRODUCTION. The function concept is one of the most important ideas in mathematics. The study

Combinational Logic Design

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

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

Combinational Logic Design Process

CIRCLE THEOREMS. Edexcel GCSE Mathematics (Linear) 1MA0

Systems I: Computer Organization and Architecture

Complex Numbers. w = f(z) z. Examples

The University of the State of New York REGENTS HIGH SCHOOL EXAMINATION INTEGRATED ALGEBRA. Tuesday, January 24, :15 a.m. to 12:15 p.m.

Solutions of Linear Equations in One Variable

CHAPTER 3 Boolean Algebra and Digital Logic

SECTION P.5 Factoring Polynomials

Transcription:

The Universit Of Alabama in Huntsville Computer Science Chapter 2: Boolean Algebra and Logic Gates The Universit Of Alabama in Huntsville Computer Science Boolean Algebra The algebraic sstem usuall used to work with binar logic epressions Postulates: 1. Closure: An defined operation on (0, 1) gives (0,1) 2. Identit: 0 + = ; 1. = 3. Commutative: + = + ; = 4. Distributive: ( + ) = + ; + () = ( + )( + ) 5. Def of Complement: + = 1; = 0 6. At least 2 elements (0 and 1) Precedence rule: (1) parentheses (2) NOT (3) AND (4) OR 1

The Universit Of Alabama in Huntsville Computer Science The Dualit Principle A Boolean epression that is alwas true is still true if we echange OR with AND and 0 with 1 Eamples: + = 1 so: = 0 + = + so: = Note that we cannot use Dualit to sa that + =1, so = 0 Wh not? The Universit Of Alabama in Huntsville Computer Science Useful Postulates and Theorems (a) Postulate 2 + 0 =. 1 = Postulate 5 + = 1 = 0 Theorem 1 + = = Theorem 2 + 1 = 1. 0 = 0 Theorem 3 (involution) ( ) = Postulate 3 (commutative) + = + = Theorem 4 (associative) + ( + ) = ( + ) = () = () Postulate 4 (distributive) ( + ) = + + = ( + )( + ) Theorem 5 (demorgan s Law) ( + ) = () = + Theorem 6 (absorption) + = ( + ) = (b) 2

The Universit Of Alabama in Huntsville Computer Science Eample: Theorem 1: + = ; = Proving the Theorems Proof: + = ( + ) 1 postulate 2(b) = ( + )( + ) 5(a) = + 4(b) = + 0 5(b) = 2(a) = b dualit The Universit Of Alabama in Huntsville Computer Science Proving b Truth Table Two Boolean epressions are equal in all cases if and onl if the have the same Truth Table. (You ma use this to prove the epressions are equal unless I sa otherwise). Eample: Prove demorgan s Law: ( + ) = ( + ) ( + ) 0 0 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 The Truth Table of ( + ) is equal to the Truth Table of, so we know that ( + ) = for all values of and. 3

The Universit Of Alabama in Huntsville Computer Science Boolean functions and circuit equivalents The Universit Of Alabama in Huntsville Computer Science Implementing a Boolean epression as a circuit F1 = + F1 F1 F1 4

The Universit Of Alabama in Huntsville Computer Science Simplifing epressions There are man different was to write the same epression Eample: + + = + Different forms of the epression will require different numbers of gates to implement Proof? See page 45 in tet Generall, longer epressions with more terms require more gates and/or more comple gates More gates higher power, higher cost, larger sie, So finding a wa to simplif epressions will pa off in terms of the circuits we design The Universit Of Alabama in Huntsville Computer Science A metric for use in simplifing epressions Define a literal as each occurrence of a variable in the epression Eample: F2 = + + 8 literals If we can write the epression with fewer literal, we will consider it to be simpler (and to take fewer gates). Note that this is a rule of thumb and does not alwas give an optimum answer 5

The Universit Of Alabama in Huntsville Computer Science Simplifing epressions using the postulates and theorems of Boolean Algebra From page 46-47 of tet 1. ( + ) (3 literals) = + p4a = 0 + p5b = p2a (2 literals) 2. + = + The dual of (1) 3. ( + )( + ) (4 literals) = + p4b = + 0 p5b = p2a (1 literal) 4. + + (6 literals) = + + (1) p2b = + + ( + ) p5a = + + + p4a = + + + p3b twice = + + + p3a twice = 1 + + 1 + p2b twice = (1 + ) + (1 + ) p4a twice = 1 + 1 T2a twice = + p2a twice (4 literals) 5. (+)( +)(+) = (+)( +) The dual of (4) The Consensus Theorem The Universit Of Alabama in Huntsville Computer Science Complementing a function demorgan s Law sas: ( + ) = To take (A + B + C) Let = B+C Then (A + B + C) = (A + ) = A = A (B + C) = A B C In general: (A+B+C+D+ ) = A B C D ; (ABCD ) = A +B +C +D A more comple function: F = + F = ( + ) = ( ) ( ) = ( + + )( + + ) 6

The Universit Of Alabama in Huntsville Computer Science A shortcut for complementing a function To complement a function, ou can take the dual of the function, and complement each literal. For the previous eample: F = + dual of F = ( + + )( + + ) so F = ( + + )( + + ) The Universit Of Alabama in Huntsville Computer Science Standard forms of Boolean Epressions 7

The Universit Of Alabama in Huntsville Computer Science Definitions Product term a term consisting of literals ANDed together» Eample: AB F Minterm a Product term in which all variables appear» Eample: ABC D where A,B,C, and D are the variables of the function Sum term a term consisting of literals ORed together» Eample: A + B + F Materm a Sum term in which all variables appear» Eample: A + B + C + D where A, B, C, and D are the variables of the function The Universit Of Alabama in Huntsville Computer Science SOP and Canonical SOP Form A function is in Sum of Products (SOP) form if it is written as product terms ORed together Eample: f( ) = + + A function is in Canonical SOP form if it is in SOP form and all terms are minterms Eample: g( ) = + + 8

The Universit Of Alabama in Huntsville Computer Science POS and Canonical POS form A function is in Product of Sums (POS) form if it is written as sum terms ANDed together Eample: f( ) = ( + + ) ( + ) () A function is in Canonical POS form if it is written in POS form and all terms are Materms Eample: g( ) = ( + + ) ( + + ) The Universit Of Alabama in Huntsville Computer Science Minterms and the Truth Table Each row of a Truth Table corresponds to a minterm f( ) minterm 0 0 0 0 m 0 0 0 1 1 m 1 0 1 0 0 m 2 0 1 1 0 m 3 1 0 0 1 m 4 1 0 1 1 m 5 1 1 0 0 m 6 1 1 1 1 m 7 f( ) = + + + Minterm List Form: f( ) = Σm(1, 4, 5, 7) The 1 s of the Truth Table show the minterms that are in the Canonical SOP epression 9

The Universit Of Alabama in Huntsville Computer Science f() 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 f( ) = + + = Σm(1,4,7) Eamples A B C D g(abcd) 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1 1 1 0 g(a B C D) = A B C D + AB CD + ABC D = Σm(1, 10, 13) The Universit Of Alabama in Huntsville Computer Science Materms and the Truth Table Each row of a Truth Table corresponds to a materm f( ) Materm 0 0 0 0 M 0 + + 0 0 1 1 M 1 + + 0 1 0 1 M 2 + + 0 1 1 0 M 3 + + 1 0 0 1 M 4 + + 1 0 1 1 M 5 + + 1 1 0 0 M 6 + + 1 1 1 1 M 7 + + f( ) = (++)(+ +)( + + ) Materm List Form: f( ) = ΠM(0,3,6) Note the differences from the wa minterms are complemented The 0 s of the Truth Table show the materms that are in the Canonical POS epression 10

The Universit Of Alabama in Huntsville Computer Science f() 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 Eample f( ) = (++)(+ +)(+ + )( ++ )( + +) = ΠM(0, 2, 3, 5, 6) Note that the Minterm List and Materm List taken together include the number of ever row of the Truth Table. That means that if ou determine either one of the lists, ou can determine the other one b simpl writing the row numbers that are not in the first one. Eamples: If F(ABC) = Σm(0-3), then F(ABC) = ΠM(4-7) if G(w) = ΠM(0,12,15), then G(w) = Σm(1-11, 13, 14) The Universit Of Alabama in Huntsville Computer Science Basic Combinational Circuit Designs 11

The Universit Of Alabama in Huntsville Computer Science SOP to AND-OR An SOP epression can be directl implemented in a two-level combinational circuit with an AND gate for each product term and an OR gate to combine the terms Eample: f() = + + f() The Universit Of Alabama in Huntsville Computer Science POS to OR-AND A POS epression can be directl implemented in a two-level combinational circuit with an OR gate for each sum term and an AND gate to combine the terms Eample: f(w) = (+)(w+) w f(w) 12

The Universit Of Alabama in Huntsville Computer Science Circuits for mied-form epressions Combinational circuits for mied-form epressions ma have more than two levels Eample: f(abcde) = AB + C(D + E) A B C D E f(abcde) The Universit Of Alabama in Huntsville Computer Science NAND NAND 0 0 1 0 1 1 1 0 1 1 1 0 Other common gate tpes () = + Eclusive-OR (XOR) XOR 0 0 0 0 1 1 1 0 1 1 1 0 + = + NOR NOR 0 0 1 0 1 0 1 0 0 1 1 0 (+) = 13

The Universit Of Alabama in Huntsville Computer Science You can use NAND and NOR to do anthing ou can do with AND, OR, and NOT () = (() ) = ( ) = + NOT AND OR (+) = ( + ) = = ((+) ) = + The Universit Of Alabama in Huntsville Computer Science SOP to NAND (1) We alread determined that we can go directl from SOP form to an AND-OR implementation f() = + + f() We can substitute the NAND equivalents for the AND and OR gates f() 14

The Universit Of Alabama in Huntsville Computer Science SOP to NAND (2) The circled gates are just 2 inverters in series the do nothing So leave them out f() f() The Universit Of Alabama in Huntsville Computer Science Check: Is this still the original f()? SOP to NAND (3) The circuit produces: ( ( ) ( )) = + ( ) + ( ) = + + f() 15

The Universit Of Alabama in Huntsville Computer Science SOP to NAND (4) We can use NAND gates to directl implement an SOP epression: One NAND for each Product term One NAND to sum the terms Invert an single inputs Wh do we do this? The NAND integrated circuit design is ver simple. We can use this one simple gate tpe for an epression. The Universit Of Alabama in Huntsville Computer Science SOP to NAND (5) Eample: f(a,b,c,d) = A B + AC + ABD A B A C A B D f(a,b,c,d) 16

The Universit Of Alabama in Huntsville Computer Science Cascading 2-input NANDs to implement larger NAND functions Think of a multiple-input NAND as an AND followed b an INVERTER () () We can easil build a multiple-input AND out of 2-input ANDs And we know how to build a 2-input AND from 2-input NANDs Substituting ( () ) = () () = What happened to the Inverters at the output? 17