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

Similar documents
Spiral 1 / Unit 3

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

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

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

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

MC9211 Computer Organization

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

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

Spiral 1 / Unit 5. Karnaugh Maps

Boolean Algebra. Boolean Variables, Functions. NOT operation. AND operation. AND operation (cont). OR operation

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

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

Learning Objectives. Boolean Algebra. In this chapter you will learn about:

EE 209 Spiral 1 Exam Solutions Name:

Lecture 4: More Boolean Algebra

Goals for Lecture. Binary Logic and Gates (MK 2.1) Binary Variables. Notation Examples. Logical Operations

Chapter 2 : Boolean Algebra and Logic Gates

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

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

ECE/Comp Sci 352 Digital System Fundamentals Quiz # 1 Solutions

Chapter 2 Combinational

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

Digital Circuit And Logic Design I. Lecture 3

Digital Design. Digital Design

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

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

Working with Combinational Logic. Design example: 2x2-bit multiplier

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

DIGITAL LOGIC CIRCUITS

211: Computer Architecture Summer 2016

Why digital? Overview. Number Systems. Binary to Decimal conversion

CHAPTER1: Digital Logic Circuits Combination Circuits

Review: Single-Cycle Processor. Limits on cycle time

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

Number Systems 1(Solutions for Vol 1_Classroom Practice Questions)

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 2

Working with combinational logic

This form sometimes used in logic circuit, example:

Digital Logic Design. Malik Najmus Siraj

Boolean Algebra and Logic Gates

Chapter 2: Switching Algebra and Logic Circuits

BOOLEAN ALGEBRA TRUTH TABLE

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

3. PRINCIPLES OF COMBINATIONAL LOGIC

Combinational Logic (mostly review!)

Logic Design 2013/9/26. Introduction. Chapter 4: Optimized Implementation of Logic Functions. K-map

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 2 Circuit Optimization

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

ENGR 303 Introduction to Logic Design Lecture 3. Dr. Chuck Brown Engineering and Computer Information Science Folsom Lake College

EC 413 Computer Organization

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

Chapter 2. Introduction. Chapter 2 :: Topics. Circuits. Nodes. Circuit elements. Introduction

Textbook: Digital Design, 3 rd. Edition M. Morris Mano

Boolean Algebra, Gates and Circuits

Chapter-2 BOOLEAN ALGEBRA

Digital Design 2. Logic Gates and Boolean Algebra

University of Technology

Chapter 2 Boolean Algebra and Logic Gates

EC-121 Digital Logic Design

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

CSE370 HW3 Solutions (Winter 2010)

Contents. Chapter 2 Digital Circuits Page 1 of 30

14:332:231 DIGITAL LOGIC DESIGN. Combinational Circuit Synthesis

Simlification of Switching Functions

Theory of Logic Circuits. Laboratory manual. Exercise 1

Chapter 2 Boolean Algebra and Logic Gates

Systems I: Computer Organization and Architecture

Lecture 2 Review on Digital Logic (Part 1)

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

Logic Design Combinational Circuits. Digital Computer Design

Chap 2. Combinational Logic Circuits

Boolean Algebra & Logic Gates. By : Ali Mustafa

Unit 2 Session - 6 Combinational Logic Circuits

Combinational Logic Design Principles

Boolean Algebra and Logic Gates

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Karnaugh Maps (K-Maps)

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

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

Simplifying Logic Circuits with Karnaugh Maps

CSC9R6 Computer Design. Practical Digital Logic

L2: Combinational Logic Design (Construction and Boolean Algebra)

UNIT 5 KARNAUGH MAPS Spring 2011

Unit 8A Computer Organization. Boolean Logic and Gates

COSC3330 Computer Architecture Lecture 2. Combinational Logic

DIGITAL LOGIC CIRCUITS

The Karnaugh Map COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Digital Logic Design. Combinational Logic

Gate-Level Minimization

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Copyright 2007 Elsevier 2-<101>

Digital- or Logic Circuits. Outline Logic Circuits. Logic Voltage Levels. Binary Representation

Standard Expression Forms

CS/EE 181a 2008/09 Lecture 4

CHAPTER 7. Exercises 17/ / /2 2 0

CHAPTER 7. Solutions for Exercises

Unit 2 Boolean Algebra

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

12/31/2010. Overview. 10-Combinational Circuit Design Text: Unit 8. Limited Fan-in. Limited Fan-in. Limited Fan-in. Limited Fan-in

Transcription:

-3. -3.2 Outcomes Spiral / Unit 3 Minterm and Materms Canonical Sums and Products 2 and 3 Variable oolean lgebra Theorems emorgan's Theorem unction Snthesis use Canonical Sums/Products Mark Redekopp I know the difference between combinational and sequential logic and can name eamples of each. I understand latenc, throughput, and at least technique to improve throughput I can identif when I need state vs. a purel 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 snthesie 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 comple CMOS gates -3.3-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 SYNTHESIZING LOGIC UNCTIONS Primes between -7 s Count of Inputs

-3.5-3.6 Combining unctions Combining unctions Given intermediate functions and 2, how could ou use N, OR, NOT to make G X Y Z 2 G Given intermediate functions and 2, how could ou use N, OR, NOT to make G X Y Z 2 G 2 G 2 G 2 2 *2 G = *2-3.7-3.8 Combining unctions Question Given intermediate functions and 2, how could ou use N, OR, NOT to make H X Y Z 2 H Is there a set of functions (, 2, etc.) that would allow ou to build NY 3 variable function X Y Z n?? 2 H Think simple, think man 2 n????????? X Y Z m m m2 m3 m4 m5 m6 m7????????? OR together an combination of m I s

efining Minterms -3.9 ppling Minterms to Snthesie a unction -3. Remember these minterms are intermediate functions that we'll use to build larger functions the epression for each minterm of (,,) 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. Minterms Row # Minterm Epression 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 P use m 2 m 3 m 5 m 7 P = m 2 + m 3 + m 5 + m 7 = + + + when,, = {,,} = 2 then P = + + + = + + + = when,, = {,,} = 5 then P = + + + = + + + = when,, = {,,} = 5 then P = + + + = + + + = s / ecoders -3. Minterms -3.2 The m i functions on the previous slide are just N gate checkers That combination can be changed b adding inverters to the inputs We can think of the N gate as checking or decoding a specific combination and outputting a when it matches. N gate decoding (checking for) combination m5 N gate decoding (checking for) combination m minterm can be generated for ever combination of inputs Each minterm is the N ing of variables that will evaluate to for onl that combination minterm checks or decodes a specific input combination and outputs when found Minterm 3 = = m 3 Minterm 5 = = m 5 To make the minterm, complement the variables that equal and leave the variables in their true form that equal.

-3.3-3.4 Using ecoders to Implement unctions Given an an logic function, it can be decoders/checkers Using ecoders to Implement unctions Given an an logic function, it can be decoders X Y Z -3.5-3.6 Using ecoders to Implement unctions Given an an logic function, it can be decoders Using ecoders to Implement unctions Given an an logic function, it can be decoders X Y Z X Y Z C C

-3.7-3.8 Using ecoders to Implement unctions Given an an logic function, it can be decoders Using ecoders to Implement unctions Given an an logic function, it can be decoders X Y Z C X Y Z C C C (,,) = -3.9-3.2 Using ecoders to Implement unctions Given an an logic function, it can be decoders Using ecoders to Implement unctions Given an an logic function, it can be decoders X Y Z C X Y Z C C C (,,) = (,,) =

Minterm efinition -3.2 Minterms -3.22 Minterm: product term where each input variable of a function appears as eactl one literal f(,,) => ++ Consider (,) One minterm per combination of the input variables Onl one minterm can evaluate to at an time m m m 2 m 3 inding Equations/Circuits -3.23 Control Signal Generation -3.24 Given a function and checkers (called decoders) for each combination, we just need to OR together the checkers where = 3-bit number {,,} for for for for for for for for ssume we use Ngate decoders that output a when the combination is found Other control signals are a function of the opcode We could write a full truth table or (because we are onl implementing a small subset of instructions) simpl 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 ranch Mem Mem MemtoReg LUSrc Regst Reg LUOp[:] Could generate each control signal b writing a full truth table of the 6-bit opcode OpCode (Instruc.[3:26]) ecoder (Minterms) R-Tpe LW SW EQ Control Unit ranch Mem Mem MemtoReg LUSrc Regst Reg LUOp[:] Simpler for human to design if we decode the opcode and then use individual instruction signals to generate desired control signals

OpCode [5:] R Tpe Control Signal Truth Table LW SW EQ J ranch Reg st LU Src Memto Reg Reg Mem Mem LU Op[] X X -3.25 LU Op[] OpCode [5:] R Tpe Control Signal Truth Table LW SW EQ J ranch Reg st LU Src Memto Reg Reg Mem Mem LU Op[] X X X X X X X X X -3.26 LU Op[] Sh. Left 2 26 28 ddress 32 Net Instruc. ddress Sh. Left 2 26 28 ddress 32 Net Instruc. ddress 4 + [25:] [3:26] Mem & Mem LUOp[:] MemtoReg Control Regst LUSrc Reg Sh. Left 2 ranch + ranch ddress PCSrc 4 + [25:] [3:26] Mem & Mem LUOp[:] MemtoReg Control Regst LUSrc Reg Sh. Left 2 ranch + ranch ddress PCSrc PC [25:2] Reg. # 5 [2:6] Reg. 2 # 5 ddr. data [5:] Reg. # Instruc. 5 I-Cache data 2 ata Regst Register ile [5:] 6 Sign 32 Etend INST[5:] LUOp[:] LUSrc LU Zero Res. LU control Mem ddr. ata ata -Cache Mem MemtoReg PC [25:2] Reg. # 5 [2:6] Reg. 2 # 5 ddr. data [5:] Reg. # Instruc. 5 I-Cache data 2 ata Regst Register ile [5:] 6 Sign 32 Etend INST[5:] LUOp[:] LUSrc LU Zero Res. LU control Mem ddr. ata ata -Cache Mem MemtoReg Control Signal Logic -3.27-3.28 Op[5] Op[4] Op[3] Op[2] Op[] Op[] ecoder R-Tpe LW SW EQ J ranch Regst LUSrc MemtoReg Reg Mem Mem LUOp LUOp Using products of materms to implement a function MXTERMS

-3.29-3.3 Question Question Is there a set of functions (, 2, etc.) that would allow ou to build NY 3 variable function X Y Z n?? OR this set of functions would also work. X Y Z n?? Think simple, think man X Y Z M M M2 M3 M4 M5 M6 M7? G 2 n????????? X Y Z m m m2 m3 m4 m5 m6 m7????????? OR together an combination of m I s???????? N together an combination of M I s G = M M3 M6-3.3-3.32 efining Materms ppling Materms to Snthesie a unction Remember these materms are intermediate functions that we'll use to build larger functions the epression for each Materm of (,,) Materms Each numbered materm checks whether the inputs are equal to the corresponding combination. When the inputs are equal, the materm will evaluate to and thus the whole function will evaluate to. Row # Materm 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 P use M M M 4 M 6 P = M M M 4 M 6 = (++) (++ ) ( ++) ( + +) when,, = {,,} = then P = (++) (++ ) ( ++) ( + +) = = when,, = {,,} = 6 then P = (++) (++ ) ( ++) ( + +) = = when,, = {,,} = 7 then P = (++) (++ ) ( ++) ( + +) = =

Materm efinition -3.33 s / ecoders -3.34 Materm: sum term where each input variable of a function appears eactl once in that term (either in its true or complemented form) f(,,) => + + ++ + n OR gate onl outputs for combination That combination can be changed b 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. OR gate decoding (checking for) combination OR gate decoding (checking for) combination inding Equations/Circuits -3.35-3.36 Given a function and checkers (called decoders) for each combination, we just need to N together the checkers where = 3-bit number {,,} for for for for for for for for ssume we use ORgate decoders that output a when the combination is found LOGIC UNCTION NOTTION

-3.37-3.38 Canonical Sums Canonical Products We OR together all the minterms where = ( = SUM or OR of all the minterms) We N together all the materms where = = m 2 +m 3 +m 5 +m 7 m m Canonical Sum: = (2,3,5,7) List the minterms where is. m 2 m 3 m 4 m 5 m 6 m 7 = M M M 4 M 6 M M Canonical Product: = (,,4,6) List the materms where is. M 2 M 3 M 4 M 5 M 6 M 7-3.39-3.4 Canonical orm Practice Logic unctions P. 6 and 6 in the Lecture Notes X Y Z G 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 onl unique representation* * Canonical Sums/Products (minterm/materm) representation provides a standard equation/schematic form that is unique per function

-3.4-3.42 Unique Representations Canonical => Same functions will have same representations Truth Tables along with Canonical Sums and Products specif a function uniquel Equations/circuit schematics are NOT inherentl canonical Truth Table P Canonical Sum P (2,3,5,7,, ) ON-Set of P (minterms) Yields SOP equation, N-OR circuit Canonical Product P (,,4,6,, ) O-Set of P (materms) Yields POS equation, OR-N circuit Eample: utomobile uer Consider an automobile warning uer that sounds if ou leave the Ke in the ignition and the oor is open OR the Headlights are on and the oor is open. We can easil derive an equation and implementation: = K + H Ke in Ignition Headlights on K H Warning uer = K + H -3.43-3.44 Eample: utomobile uer ut we see that we can alter this equation rom = K + H To = (K+H) uer sounds if the oor is open and either the Ke is in the Ignition or the Headlights are on Which is better? What is the canonical minterm/materm representation? Eample orm Given a function, (,K,H) we can define the minterm functions (which serve as intermediate functions) and then generate the overall function from the minterms = Σ = Π Row K H Minterm esignation Materm esignation K H m +K+H M K H m +K+H M 2 K H m 2 +K +H M 2 Ke in Ignition Headlights on K H Warning uer = (K+H) Ke in Ignition Headlights on K H Warning uer = K + H 3 K H m 3 +K +H M 3 4 K H m 4 +K+H M 4 5 K H m 5 +K+H M 5 6 K H m 6 +K +H M 6 7 K H m 7 +K +H M 7

-3.45-3.46 2 & 3 Variable Theorems emorgan s Theorem T6 X+Y = Y+X T6' X Y = Y X Commutativit T7 (X+Y)+Z = X+(Y+Z) T7' (X Y) Z = X (Y Z) ssociativit T8 XY+XZ = X(Y+Z) T8 (X+Y)(X+Z) = X+YZ istribution & actoring T9 X + XY = X T9 X(X+Y) = X Covering T XY + XY = X T (X+Y)(X+Y ) = X Combining Inverting output of an N gate = inverting the inputs of an OR gate Inverting output of an OR gate = inverting the inputs of an N gate function s inverse is equivalent to inverting all the inputs and changing N to OR and vice versa Out + Out T XY + X Z + YZ = XY + X Z T (X+Y)(X +Z)(Y+Z) = (X+Y)(X +Z) Consensus M (X+Y)' = X' Y' M' (X Y)'=X'+Y' emorgan's Out + Out -3.47-3.48 N OR / NN NN Canonical Sums ield N OR Implementation NN NN Implementation OR N / NOR NOR Canonical Products ield OR N Implementation NOR NOR Implementation =

-3.49-3.5 Eample: utomobile uer Convert each implementation to use either just NOR or just NN gates + inverters Convert to NN NN Convert the 2 to mu below to use just NN or NOR gates? Ke in Ignition Headlights on K H Warning uer = (K+H) Ke in Ignition Headlights on K H Warning uer = K + H -3.5-3.52 Logic Snthesis escribe the function Usuall with a truth table ind the sum of products or product of sums epression ewer 's in the output => use canonical sum ewer 's in the output => use canonical product Use oolean lgebra (T8 T) to find a simplified epression Eercise Snthesie this function in two was irst 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) Primes between -7 X Y Z P

Eercise 2 Snthesie this function in two was irst 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 -3.53 T (X+Y)(X +Z)(Y+Z) = (X+Y)(X +Z) Eercise 3 Snthesie this function in two was irst 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 -3.54 T (X+Y)(X +Z)(Y+Z) = (X+Y)(X +Z) I3 I2 I M M Encode the highest input I (ie. 3, 2, or ) that is ON (=) s Count of Inputs I3 I2 I C C