Spiral 1 / Unit 3

Similar documents
Outcomes. Spiral 1 / Unit 3. The Problem SYNTHESIZING LOGIC FUNCTIONS

7.1. Unit 7. Minterm and Canonical Sums 2- and 3-Variable Boolean Algebra Theorems DeMorgan's Theorem Simplification using Boolean Algebra

MC9211 Computer Organization

Outcomes. Spiral 1 / Unit 2. Boolean Algebra BOOLEAN ALGEBRA INTRO. Basic Boolean Algebra Logic Functions Decoders Multiplexers

Mark Redekopp, All rights reserved. Lecture 5 Slides. Canonical Sums and Products (Minterms and Maxterms) 2-3 Variable Theorems DeMorgan s Theorem

CPU DESIGN The Single-Cycle Implementation

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

Spiral 1 / Unit 5. Karnaugh Maps

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

Mark Redekopp, All rights reserved. Lecture 4 Slides. Boolean Algebra Logic Functions Canonical Sums/Products

Computer Engineering Department. CC 311- Computer Architecture. Chapter 4. The Processor: Datapath and Control. Single Cycle

Digital Circuit And Logic Design I. Lecture 3

Chapter 2 : Boolean Algebra and Logic Gates

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

This form sometimes used in logic circuit, example:

CHAPTER1: Digital Logic Circuits Combination Circuits

211: Computer Architecture Summer 2016

Standard Expression Forms

Chapter 2: Switching Algebra and Logic Circuits

Combinational Logic Design Principles

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

CSE Computer Architecture I

Chapter 2 Boolean Algebra and Logic Gates

Digital Logic Design. Malik Najmus Siraj

Boolean Algebra & Logic Gates. By : Ali Mustafa

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Boolean Algebra and Logic Simplification

CS 226: Digital Logic Design

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Contents. Chapter 2 Digital Circuits Page 1 of 30

Chapter-2 BOOLEAN ALGEBRA

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

Lecture 2 Review on Digital Logic (Part 1)

Boolean Algebra and Logic Gates

Digital Logic Design. Combinational Logic

Chapter 2. Boolean Algebra and Logic Gates

Project Two RISC Processor Implementation ECE 485

BOOLEAN ALGEBRA TRUTH TABLE

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

WEEK 2.1 BOOLEAN ALGEBRA

Theorem/Law/Axioms Over (.) Over (+)

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Chap 2. Combinational Logic Circuits

Contents. Chapter 3 Combinational Circuits Page 1 of 36

EC-121 Digital Logic Design

UNIT 5 KARNAUGH MAPS Spring 2011

Chapter 2 Boolean Algebra and Logic Gates

Logic Design. Chapter 2: Introduction to Logic Circuits

Chapter 2 Combinational Logic Circuits

9.1. Unit 9. Implementing Combinational Functions with Karnaugh Maps or Memories

Chapter 2: Boolean Algebra and Logic Gates

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

ELCT201: DIGITAL LOGIC DESIGN

Combinatorial Logic Design Principles

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

Unit 2 Boolean Algebra

Unit 8A Computer Organization. Boolean Logic and Gates

Learning Objectives 10/7/2010. CE 411 Digital System Design. Fundamental of Logic Design. Review the basic concepts of logic circuits. Dr.

Combinational Logic. Fan-in/ Fan-out Timing. Copyright (c) 2012 Sean Key

CSC9R6 Computer Design. Practical Digital Logic

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Every time has a value associated with it, not just some times. A variable can take on any value within a range

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

control in out in out Figure 1. Binary switch: (a) opened or off; (b) closed or on.

EC 413 Computer Organization

Boolean Algebra and Logic Gates Chapter 2. Topics. Boolean Algebra 9/21/10. EECE 256 Dr. Sidney Fels Steven Oldridge

Gate-Level Minimization

1 Boolean Algebra Simplification

Unit 2 Session - 6 Combinational Logic Circuits

Review: Additional Boolean operations

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

CHAPTER III BOOLEAN ALGEBRA

Combinational Logic Fundamentals

Boolean Algebra. Examples: (B=set of all propositions, or, and, not, T, F) (B=2 A, U,, c, Φ,A)

Number System conversions

Logic Gate Level. Part 2

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Boolean Algebra, Gates and Circuits

Implementing the Controller. Harvard-Style Datapath for DLX

Simplifying Logic Circuits with Karnaugh Maps

CHAPTER 2 BOOLEAN ALGEBRA

Combinational Logic Circuits Part II -Theoretical Foundations

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

Chapter 2 Combinational Logic Circuits

ELCT201: DIGITAL LOGIC DESIGN

Chapter 2 Boolean Algebra and Logic Gates

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

UNIVERSITI TENAGA NASIONAL. College of Information Technology

Computer Organization I

Week-I. Combinational Logic & Circuits

1. Name the person who developed Boolean algebra

EEA051 - Digital Logic 數位邏輯 吳俊興高雄大學資訊工程學系. September 2004

Chapter 7 Logic Circuits

ENG2410 Digital Design Combinational Logic Circuits

Transcription:

-3. Spiral / Unit 3 Minterm and Maxterms Canonical Sums and Products 2- and 3-Variable Boolean Algebra Theorems DeMorgan's Theorem Function Synthesis use Canonical Sums/Products

-3.2 Outcomes I know the difference between combinational and sequential logic and can name examples of each. I understand latency, throughput, and at least technique to improve throughput I can identify when I need state vs. a purely combinational function I can convert a simple word problem to a logic function (TT or canonical form) or state diagram I can use Karnaugh maps to synthesize combinational functions with several outputs I understand how a register with an enable functions & is built I can design a working state machine given a state diagram I can implement small logic functions with complex CMOS gates

SYNTHESIZING LOGIC FUNCTIONS -3.3

Primes between -7 s Count of Inputs -3.4 The Problem Given a logic function, how do we arrive at a circuit to implement this combinational function? X Y Z P I3 I2 I C C

-3.5 Combining Functions Given intermediate functions F and F2, how could you use AND, OR, NOT to make G X Y Z F F2 G X Y Z F F2 G

-3.6 Combining Functions Given intermediate functions F and F2, how could you use AND, OR, NOT to make G X Y Z F F2 G X Y Z F F2 G X Y Z F F2 F F2 F*F2 G = F*F2

-3.7 Combining Functions Given intermediate functions F and F2, how could you use AND, OR, NOT to make H X Y Z F F2 H X Y Z F F2 H

-3.8 Question Is there a set of functions (F, F2, etc.) that would allow you to build ANY 3- variable function X Y Z F Fn?? Think simple, think many X Y Z F F2 Fn????????? X Y Z m m m2 m3 m4 m5 m6 m7????????? OR together any combination of m I s

-3.9 Defining Minterms Remember these minterms are intermediate functions that we'll use to build larger functions Write the expression for each minterm of F(x,y,z) Minterms Row # Minterm Expression x y z m m m 2 m 3 m 4 m 5 m 6 m 7 m m 2 m 2 3 m 3 4 m 4 5 m 5 6 m 6 7 m 7

-3. Applying Minterms to Synthesize a Function Each numbered minterm checks whether the inputs are equal to the corresponding combination. When the inputs are equal, the minterm will evaluate to and thus the whole function will evaluate to. x y z P use m 2 m 3 m 5 m 7 P = m 2 + m 3 + m 5 + m 7 = x yz + x yz + xy z + xyz when x,y,z = {,,} = 2 then P = + + + = + + + = when x,y,z = {,,} = 5 then P = + + + = + + + = when x,y,z = {,,} = 5 then P = + + + = + + + =

-3. Checkers / Decoders The m i functions on the previous slide are just AND gate checkers That combination can be changed by adding inverters to the inputs We can think of the AND gate as checking or decoding a specific combination and outputting a when it matches. X Y Z F X Y Z F x y z m5 x y z m AND gate decoding (checking for) combination AND gate decoding (checking for) combination

-3.2 Minterms A minterm can be generated for every combination of inputs Each minterm is the AND ing of variables that will evaluate to for only that combination A minterm checks or decodes a specific input combination and outputs when found Minterm 3 = x y z = m 3 Minterm 5 = x y z = m 5 To make the minterm, complement the variables that equal and leave the variables in their true form that equal. X Y Z F

-3.3 Using Decoders to Implement Functions Given an any logic function, it can be implemented with the superposition of decoders/checkers X Y Z F

-3.4 Using Decoders to Implement Functions Given an any logic function, it can be implemented with the superposition of decoders X Y Z F x y z A X Y Z A

-3.5 Using Decoders to Implement Functions Given an any logic function, it can be implemented with the superposition of decoders X Y Z F x y z A X Y Z A B x y z B

-3.6 Using Decoders to Implement Functions Given an any logic function, it can be implemented with the superposition of decoders X Y Z F x y z A X Y Z A B C x y z B x y z C

-3.7 Using Decoders to Implement Functions Given an any logic function, it can be implemented with the superposition of decoders X Y Z F x y z A X Y Z A B C F x y z B F x y z C

-3.8 Using Decoders to Implement Functions Given an any logic function, it can be implemented with the superposition of decoders X Y Z F x y z A X Y Z A B C F x y z B F x y z C F(,,) =

-3.9 Using Decoders to Implement Functions Given an any logic function, it can be implemented with the superposition of decoders X Y Z F x y z A X Y Z A B C F x y z B F x y z C F(,,) =

-3.2 Using Decoders to Implement Functions Given an any logic function, it can be implemented with the superposition of decoders X Y Z F x y z A X Y Z A B C F x y z B F x y z C F(,,) =

-3.2 Minterm Definition Minterm: A product term where each input variable of a function appears as exactly one literal f(x,y,z) => x y z xyz x y x+y+z

-3.22 Minterms Consider F(A,B) One minterm per combination of the input variables Only one minterm can evaluate to at any time m m m 2 m 3 A B F A B A B A B A B

-3.23 Finding Equations/Circuits Given a function and checkers (called decoders) for each combination, we just need to OR together the checkers where F = 3-bit number {x,y,z} Checker for Checker for Checker for Checker for Checker for Checker for Checker for Checker for Assume we use ANDgate decoders that output a when the combination is found F X Y Z F

-3.24 Control Signal Generation Other control signals are a function of the opcode We could write a full truth table or (because we are only implementing a small subset of instructions) simply decode the opcodes of the specific instructions we are implementing and use those intermediate signals to generate the actual control signals OpCode (Instruc.[3:26]) Control Unit Jump Branch MemRead MemWrite MemtoReg ALUSrc RegDst RegWrite ALUOp[:] Could generate each control signal by writing a full truth table of the 6-bit opcode OpCode (Instruc.[3:26]) Decoder (Minterms) R-Type LW SW BEQ Jump Control Unit Jump Branch MemRead MemWrite MemtoReg ALUSrc RegDst RegWrite ALUOp[:] Simpler for human to design if we decode the opcode and then use individual instruction signals to generate desired control signals

[5:] PC [25:] [3:26] -3.25 Control Signal Truth Table OpCode [5:] R- Type LW SW BEQ J Jump Branch Reg Dst ALU Src Memto- Reg X X Reg Write Mem Read Mem Write ALU Op[] ALU Op[] 4 A + B Addr. Instruc. I-Cache Sh. 26 Left 2 28 [25:2] [2:6] [5:] 5 5 5 RegDst Control Read Reg. # Read Reg. 2 # Write Reg. # Write Data RegWrite Read data Read data 2 Register File 32 Jump MemRead & MemWrite ALUOp[:] MemtoReg RegDst ALUSrc 6 Sign Extend 32 INST[5:] ALUOp[:] Jump Address Sh. Left 2 Branch ALUSrc Next Instruc. Address ALU + Zero Res. ALU control Branch Address PCSrc MemRead Addr. Write Data Read Data D-Cache MemWrite Jump MemtoReg

[5:] PC [25:] [3:26] -3.26 Control Signal Truth Table OpCode [5:] R- Type LW SW BEQ J Jump Branch Reg Dst ALU Src Memto- Reg X X X X X X X X X Reg Write Mem Read Mem Write ALU Op[] ALU Op[] 4 A + B Addr. Instruc. I-Cache Sh. 26 Left 2 28 [25:2] [2:6] [5:] 5 5 5 RegDst Control Read Reg. # Read Reg. 2 # Write Reg. # Write Data RegWrite Read data Read data 2 Register File 32 Jump MemRead & MemWrite ALUOp[:] MemtoReg RegDst ALUSrc 6 Sign Extend 32 INST[5:] ALUOp[:] Jump Address Sh. Left 2 Branch ALUSrc Next Instruc. Address ALU + Zero Res. ALU control Branch Address PCSrc MemRead Addr. Write Data Read Data D-Cache MemWrite Jump MemtoReg

-3.27 Control Signal Logic Op[5] Op[4] Op[3] Op[2] Op[] Op[] Decoder R-Type LW SW BEQ J Jump Branch RegDst ALUSrc MemtoReg RegWrite MemRead MemWrite ALUOp ALUOp

-3.28 Using products of maxterms to implement a function MAXTERMS

-3.29 Question Is there a set of functions (F, F2, etc.) that would allow you to build ANY 3- variable function X Y Z F Fn?? Think simple, think many X Y Z F F2 Fn????????? X Y Z m m m2 m3 m4 m5 m6 m7????????? OR together any combination of m I s

-3.3 Question OR this set of functions would also work. X Y Z F Fn?? X Y Z M M M2 M3 M4 M5 M6 M7????????? AND together any combination of M I s G G = M M3 M6

-3.3 Defining Maxterms Remember these maxterms are intermediate functions that we'll use to build larger functions Write the expression for each Maxterm of F(x,y,z) Maxterms Row # Maxterm x y z M M M 2 M 3 M 4 M 5 M 6 M 7 M M 2 M 2 3 M 3 4 M 4 5 M 5 6 M 6 7 M 7

-3.32 Applying Maxterms to Synthesize a Function Each numbered maxterm checks whether the inputs are equal to the corresponding combination. When the inputs are equal, the maxterm will evaluate to and thus the whole function will evaluate to. x y z P use M M M 4 M 6 P = M M M 4 M 6 = (x+y+z) (x+y+z ) (x +y+z) (x +y +z) when x,y,z = {,,} = then P = (++) (++ ) ( ++) ( + +) = = when x,y,z = {,,} = 6 then P = (++) (++ ) ( ++) ( + +) = = when x,y,z = {,,} = 7 then P = (++) (++ ) ( ++) ( + +) = =

-3.33 Maxterm Definition Maxterm: A sum term where each input variable of a function appears exactly once in that term (either in its true or complemented form) f(x,y,z) => x +y +z x+y+z y+z x y z

-3.34 Checkers / Decoders An OR gate only outputs for combination That combination can be changed by adding inverters to the inputs We can think of the OR gate as checking or decoding a specific combination and outputting a when it matches. x y z OR gate decoding (checking for) combination F X Y Z F x y z OR gate decoding (checking for) combination F X Y Z F

-3.35 Finding Equations/Circuits Given a function and checkers (called decoders) for each combination, we just need to AND together the checkers where F = 3-bit number {x,y,z} Checker for Checker for Checker for Checker for Checker for Checker for Checker for Checker for Assume we use ORgate decoders that output a when the combination is found F X Y Z F

LOGIC FUNCTION NOTATION -3.36

-3.37 Canonical Sums We OR together all the minterms where F = ( = SUM or OR of all the minterms) F = m 2 +m 3 +m 5 +m 7 m m Canonical Sum: F = xyz (2,3,5,7) List the minterms where F is. m 2 m 3 m 4 m 5 m 6 m 7 X Y Z F

-3.38 Canonical Products We AND together all the maxterms where F = F = M M M 4 M 6 M M Canonical Product: F = xyz (,,4,6) List the maxterms where F is. M 2 M 3 M 4 M 5 M 6 M 7 X Y Z F

-3.39 Canonical Form Practice X Y Z G P. 6 and 6 in the Lecture Notes X Y Z F

-3.4 Logic Functions A logic function maps input combinations to an output value ( or ) 3 possible representations of a function Equation Schematic Truth Table Can convert between representations Truth table is only unique representation* * Canonical Sums/Products (minterm/maxterm) representation provides a standard equation/schematic form that is unique per function

-3.4 Unique Representations Canonical => Same functions will have same representations Truth Tables along with Canonical Sums and Products specify a function uniquely Equations/circuit schematics are NOT inherently canonical Truth Table x y z P P x y, Canonical Sum (2,3,5,7 ), z ON-Set of P (minterms) Yields SOP equation, AND-OR circuit P x y, Canonical Product (,,4,6 ), z OFF-Set of P (maxterms) Yields POS equation, OR-AND circuit

-3.42 Example: Automobile Buzzer Consider an automobile warning Buzzer that sounds if you leave the Key in the ignition and the Door is open OR the Headlights are on and the Door is open. We can easily derive an equation and implementation: B = KD + HD Key in Ignition Door Opened Headlights on Door Opened K D H D B Warning Buzzer B = K D + H D

-3.43 Example: Automobile Buzzer But we see that we can alter this equation From B = KD + HD To B = D(K+H) Buzzer sounds if the Door is open and either the Key is in the Ignition or the Headlights are on Which is better? What is the canonical minterm/maxterm representation? Door Opened Key in Ignition Headlights on D K H B Warning Buzzer B = (K+H) D Key in Ignition Door Opened Headlights on Door Opened K D H D B Warning Buzzer B = K D + H D

-3.44 Example Form Given a function, B(D,K,H) we can define the minterm functions (which serve as intermediate functions) and then generate the overall function from the minterms B = Σ B = Π Row D K H Minterm Designation Maxterm Designation B D K H m D+K+H M D K H m D+K+H M 2 D K H m 2 D+K +H M 2 3 D K H m 3 D+K +H M 3 4 D K H m 4 D +K+H M 4 5 D K H m 5 D +K+H M 5 6 D K H m 6 D +K +H M 6 7 D K H m 7 D +K +H M 7

-3.45 2 & 3 Variable Theorems T6 X+Y = Y+X T6' X Y = Y X Commutativity T7 (X+Y)+Z = X+(Y+Z) T7' (X Y) Z = X (Y Z) Associativity T8 XY+XZ = X(Y+Z) T8 (X+Y)(X+Z) = X+YZ Distribution & Factoring T9 X + XY = X T9 X(X+Y) = X Covering T XY + XY = X T (X+Y)(X+Y ) = X Combining T XY + X Z + YZ = XY + X Z T (X+Y)(X +Z)(Y+Z) = (X+Y)(X +Z) Consensus DM (X+Y)' = X' Y' DM' (X Y)'=X'+Y' DeMorgan's

-3.46 DeMorgan s Theorem Inverting output of an AND gate = inverting the inputs of an OR gate Inverting output of an OR gate = inverting the inputs of an AND gate A function s inverse is equivalent to inverting all the inputs and changing AND to OR and vice versa A B Out A B Out A B A+B A B Out A B Out A+B A B

= -3.47 AND-OR / NAND-NAND Canonical Sums yield AND-OR Implementation NAND-NAND Implementation

= NOR-NOR Implementation -3.48 OR-AND / NOR-NOR Canonical Products yield OR-AND Implementation =

-3.49 Example: Automobile Buzzer Convert each implementation to use either just NOR or just NAND gates + inverters Door Opened Key in Ignition Headlights on D K H B Warning Buzzer B = (K+H) D Key in Ignition Door Opened Headlights on Door Opened K D H D B Warning Buzzer B = K D + H D

-3.5 Convert to NAND-NAND Convert the 2-to- mux below to use just NAND or NOR gates?

-3.5 Logic Synthesis Describe the function Usually with a truth table Find the sum of products or product of sums expression Fewer 's in the output => use canonical sum Fewer 's in the output => use canonical product Use Boolean Algebra (T8-T) to find a simplified expression

Primes between -7-3.52 Exercise Synthesize this function in two ways First use the canonical sum Then use the canonical product T8 XY+XZ = X(Y+Z) T8 (X+Y)(X+Z) = X+YZ T9 X + XY = X T9 X(X+Y) = X T XY + XY = X T (X+Y)(X+Y ) = X T XY + X Z + YZ = XY + X Z T (X+Y)(X +Z)(Y+Z) = (X+Y)(X +Z) X Y Z P

-3.53 Exercise 2 Synthesize this function in two ways First use the canonical sum Then use the canonical product T8 XY+XZ = X(Y+Z) T8 (X+Y)(X+Z) = X+YZ T9 X + XY = X T9 X(X+Y) = X T XY + XY = X T (X+Y)(X+Y ) = X T XY + X Z + YZ = XY + X Z T (X+Y)(X +Z)(Y+Z) = (X+Y)(X +Z) I3 I2 I M M Encode the highest input ID (ie. 3, 2, or ) that is ON (=)

s Count of Inputs -3.54 Exercise 3 Synthesize this function in two ways First use the canonical sum Then use the canonical product T8 XY+XZ = X(Y+Z) T8 (X+Y)(X+Z) = X+YZ T9 X + XY = X T9 X(X+Y) = X T XY + XY = X T (X+Y)(X+Y ) = X T XY + X Z + YZ = XY + X Z T (X+Y)(X +Z)(Y+Z) = (X+Y)(X +Z) I3 I2 I C C