COSC3330 Computer Architecture Lecture 2. Combinational Logic

Similar documents
Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

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

Logic Design Combinational Circuits. Digital Computer Design

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

Karnaugh Maps (K-Maps)

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

211: Computer Architecture Summer 2016

CPE100: Digital Logic Design I

Prove that if not fat and not triangle necessarily means not green then green must be fat or triangle (or both).

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

CSE140: Components and Design Techniques for Digital Systems. Logic minimization algorithm summary. Instructor: Mohsen Imani UC San Diego

CHAPTER1: Digital Logic Circuits Combination Circuits

Digital Design 2. Logic Gates and Boolean Algebra

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

CPE100: Digital Logic Design I

Chapter 2 Combinational Logic Circuits

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

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

Week-I. Combinational Logic & Circuits

CS 226: Digital Logic Design

Possible logic functions of two variables

MODULAR CIRCUITS CHAPTER 7

Logic. Combinational. inputs. outputs. the result. system can

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

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

Logic Design. Chapter 2: Introduction to Logic Circuits

CMSC 313 Lecture 19 Combinational Logic Components Programmable Logic Arrays Karnaugh Maps

Logic. Basic Logic Functions. Switches in series (AND) Truth Tables. Switches in Parallel (OR) Alternative view for OR

CMSC 313 Lecture 19 Homework 4 Questions Combinational Logic Components Programmable Logic Arrays Introduction to Circuit Simplification

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

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

Digital System Design Combinational Logic. Assoc. Prof. Pradondet Nilagupta

CMSC 313 Lecture 16 Announcement: no office hours today. Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions.

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

Systems I: Computer Organization and Architecture

Combinational Logic Design Combinational Functions and Circuits

Chapter 2: Switching Algebra and Logic Circuits

Digital Circuit And Logic Design I. Lecture 3

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 Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

ELCT201: DIGITAL LOGIC DESIGN

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

ENG2410 Digital Design Combinational Logic Circuits

CSE140: Components and Design Techniques for Digital Systems. Decoders, adders, comparators, multipliers and other ALU elements. Tajana Simunic Rosing

CPE100: Digital Logic Design I

Number System conversions

Chap 2. Combinational Logic Circuits

Appendix A: Digital Logic. CPSC 352- Computer Organization

Chapter 7 Combinational Logic Networks

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

Slides for Lecture 19

Basic Gate Repertoire

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

CprE 281: Digital Logic

CMSC 313 Lecture 15 Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

T02 Tutorial Slides for Week 6

Combinational Logic (mostly review!)

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

Boolean Logic Continued Prof. James L. Frankel Harvard University

Lecture 2 Review on Digital Logic (Part 1)

Review: Additional Boolean operations

Chapter 4 Optimized Implementation of Logic Functions

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Lecture 22 Chapters 3 Logic Circuits Part 1

Contents. Chapter 3 Combinational Circuits Page 1 of 36

ECE 2300 Digital Logic & Computer Organization

CMSC 313 Lecture 16 Postulates & Theorems of Boolean Algebra Semiconductors CMOS Logic Gates

Combinational Logic Design Principles

Lecture 1. Notes. Notes. Notes. Introduction. Introduction digital logic February Bern University of Applied Sciences

Chapter 2 Boolean Algebra and Logic Gates

Part 5: Digital Circuits

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

Administrative Notes. Chapter 2 <9>

Chapter 2 Combinational Logic Circuits

CMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

Chapter 3 Combinational Logic Design

CS470: Computer Architecture. AMD Quad Core

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

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

MC9211 Computer Organization

Lecture 3. Title goes here 1. level Networks. Boolean Algebra and Multi-level. level. level. level. level

Logic Gates and Boolean Algebra

Boolean Algebra, Gates and Circuits

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

Lecture A: Logic Design and Gates

EECS Variable Logic Functions

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

CSE 140 Lecture 11 Standard Combinational Modules. CK Cheng and Diba Mirza CSE Dept. UC San Diego

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.

Ch 4. Combinational Logic Technologies. IV - Combinational Logic Technologies Contemporary Logic Design 1

Boolean Algebra & Logic Gates. By : Ali Mustafa

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

Computer organization

Chapter 3 Ctd: Combinational Functions and Circuits

This form sometimes used in logic circuit, example:

Chapter 2 Boolean Algebra and Logic Gates

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

Transcription:

COSC333 Computer rchitecture Lecture 2. Combinational Logic Instructor: Weidong Shi (Larry), PhD Computer Science Department University of Houston

Today Combinational Logic oolean lgebra Mux, DeMux, Decoder

Extra Credit Question Thanks for all who submitted

Z Konrad Zuse: the Z (938), Germany First binary programmable computer, completely mechanical Punchcard input, processing implemented with metal plates Konrad designed the first high level programming language 4

Zoom-in a System Component

Circuit logic circuit is composed of Inputs Outputs Functional specification Relationship between inputs and outputs Timing specification Delay from inputs to outputs inputs functional spec timing spec outputs 6

Circuits Nodes Inputs:,, C Outputs: Y, Z Internal: n Circuit elements E, E2, E3 E n E3 Y C E2 Z 7

Types of Logic Circuits Combinational Logic Outputs are determined by current values of inputs Thus, it is memoryless Sequential Logic Outputs are determined by previous and current values of inputs Thus, it has memory inputs functional spec timing spec outputs 8

Rules of Combinational Composition circuit is combinational if Every node of the circuit is either designated as an input to the circuit or connects to exactly one output terminal of a circuit element The circuit contains no cyclic paths Every path through the circuit visits each circuit node at most once Every circuit element is itself combinational Select combinational logic? 9

oolean Equations The functional specification of a combination logic is usually expressed as a truth table or a oolean equation Truth table is in a tabular form oolean equation is in a algebraic form Example: S = F(,, C in ) C out = F(,, C in ) Truth Table oolean equation

Terminology The complement of a variable is variable or its complement is called literal ND of one or more literals is called a product or implicant Example:, C, OR of one or more literals is called a sum Example: + Order of operations NOT has the highest precedence, followed by ND, then OR Example: Y = + C

Minterms minterm is a product (ND) of literals involving all of the inputs to the function Each row in a truth table has a minterm that is true for that row (and only that row) 2

Sum-of-Products (SOP) Form The function is formed by ORing the minterms for which the output is true Thus, a sum (OR) of products (ND terms) ll oolean equations can be written in SOP form Y minterm Y = F(, ) = + 3

oolean lgebra George oole We learned how to write a boolean equation given a truth table ut, that expression does not necessarily lead to the simplest set of logic gates One way to simplify boolean equations is to use boolean algebra Set of theorems It is like regular algebra, but in some cases simpler because variables can have only two values ( or ) Theorems obey the principles of duality: NDs and ORs interchanged, s and s interchanged 4

oolean Theorems of One Variable The prime ( ) symbol denotes the dual of a statement 5

oolean Theorems of One Variable T: Identity Theorem = + = = = T2: Null Element Theorem = + = = = 6

oolean Theorems of One Variable Idempotency Theorem = + = = = T4: Identity Theorem = = T5: Complement Theorem = + = = = 7

oolean Theorems of Several Variables 8

Simplifying oolean Expressions: Example Y = + = ( + ) T8 = () T5 = T 9

Simplifying oolean Expressions: Example 2 Y = ( + C) = ( ( + C)) T8 = ( ()) T2 = () T = () T7 = T3 2

DeMorgan s Theorem Powerful theorem in digital design Y = = + Y + Y Y = + = + Y Y 2

DeMorgan s Theorem

ubble Pushing Pushing bubbles backward (from the output) or forward (from the inputs) changes the body of the gate from ND to OR or vice versa Pushing a bubble from the output back to the inputs puts bubbles on all gate inputs Y Y Pushing bubbles on all gate inputs forward toward the output puts a bubble on the output and changes the gate body Y Y 23

ubble Pushing What is the oolean expression for this circuit? C D Y C D Y Y = + CD 24

Universal Gate gate which can be use to create any Logic gate. Two universal gates NND NOR 25

NOR as Universal Gate 26

From Logic to Gates Schematic diagram of a digital circuit showing the elements and the wires that connect them together Example: Y = C + C + C C C minterm: C minterm: C minterm: C ny oolean equation in the SOP form can be drawn like above Y 27

Circuit Schematic Rules Inputs are on the left (or top) side of a schematic Outputs are on the right (or bottom) side of a schematic Whenever possible, gates should flow from left to right Straight wires are better to use than wires with multiple corners C C minterm: C minterm: C minterm: C 28 Y

Circuit Schematic Rules (cont.) Wires always connect at a T junction dot where wires cross indicates a connection between the wires Wires crossing without a dot make no connection wires connect at a T junction wires connect at a dot wires crossing without a dot do not connect 29

Multiple Output Circuits 3 2 Y 3 Y 2 Y Y 3 2 Y 3 Y 2 Y Y 3

Don t Cares (X) 3 2 Y 3 Y 2 Y Y 3 2 X X X X Y 3 Y 2 Y Y X X Y 3 = 3 Y 2 = 3 2 Y = 3 2 Y = 3 2 3

Floating: Z Output is disconnected from the input if not enabled We say output is floating, high impedance, open, or high Z Tristate uffer E n implementation Example Y E Y Z Z 32

Where Is Tristate uffer Used for? Tristate buffer is used when designing hardware components sharing a communication medium called shared bus Many hardware components can be attached on a shared bus Only one component is allowed to drive the bus at a time The other components put their outputs to the floating What happen if you don t use the tristate buffer on shared bus? Hardware Device Hardware Device Hardware Device 2 shared bus Hardware Device 3 Hardware Device 4 Hardware Device 5 33

Timing There is always delay from input change to output change in real world One of the biggest challenges in circuit design is to make the circuit fast Y delay Y Time 34

Propagation & Contamination Delay Propagation delay t pd = max delay from input to output Contamination delay t cd = min delay for a change at the input to affect the output 35

Propagation & Contamination Delay Delay is caused by Transistor capacitance and resistance in a circuit Interconnection capacitance and resistance Reasons why t pd and t cd may be different Different rising and falling delays Multiple inputs and outputs, some of which are faster than others Circuits speeds are different depending on temperature Circuit slows down when hot Circuit speeds up when cold 36

Critical and Short Paths Critical Path C D n Short Path n2 Y Critical (Longest) Path: t pd = 2t pd_nd + t pd_or Short Path: t cd = t cd_nd 37

Digital Components Digital Components Mux Demux Decoder

Recap: Sum-of-Products (SOP) Form The function is formed by ORing the minterms for which the output is true Thus, a sum (OR) of products (ND terms) ll oolean equations can be written in SOP form Y minterm Y = F(, ) = + 39

Combinational uilding locks Combinational logic is often grouped into larger building blocks to build more complex systems 2 other very commonly used digital components Multiplexers Decoders 4

Multiplexer (Mux) Multiplexer selects an output from inputs based on the value of a select signal Multiplexer is many times called a mux Example: 2: Mux S D D Y Y = S D D + S D D + S D D +S D D = S D (D +D )+ S D (D +D ) = S D + S D S Y D D 4

Wider Muxes 4: Mux 4 inputs, output, and 2 select signals 8: Mux 8 inputs, output, and 3 select signals 6: Mux 6 inputs, output, and 4 select signal N: Mux N inputs, output, and log 2 N select signals 42

Multiplexers (Mux) 2 En 4-to- Mux 3 S S F Functionality: Selection of a particular input Route of N inputs () to the output F Require bits (S) N log 2 selection En(able) bit can disable the route and set F to

Multiplexers (Mux) w/out Enable S S F 2 4-to- Mux F 2 3 S S 3 F S S SS SS 2 SS3

Gate Diagram F S S S S S S S 2 3 S S S 2 3 45

4-to- Mux Input nalysis 2 3 S S 2 3 2 3 4: Mux S S F 2 3

Multiplexers (Mux) w/ Enable En En S S F X X 2 4-to- Mux F 3 S S 2 3 F En EnSS (SS SS EnSS SS2 S EnSS2 S 3) EnS S 3

4-to- Mux w/ Enable Logic S S F En (SS SS SS2 3 S F S ) 2 3 En

4-to- Mux w/ Enable Logic F EnS S EnS S EnS S EnS 2 3 S S S F 2 Reduce one Gate Delay by using 4-input ND gate for the 2 nd level 3 En

Real Multiplexer Chip 5

Demultiplexers (DeMux) D 2 4-to- Mux F -to-4 DeMux D D 2 3 S S S S D 3

DeMux Operations S S D3 D2 D D D -to-4 DeMux S S D D 2 D 3 D D S S S S D D 2 3 S S S S

DeMux Operations S S D D S S D3 D2 D D D2 D3 D D D D 2 3 S S S S SS S S

DeMux Input nalysis D D D2 D3 D D D2 D3 S S D3 D2 D D

DeMux Operations w/ Enable S S D D D2 D3 En S S D3 D2 D D X X En

Decoders Decoder asserts only one of outputs depending on the input combination N inputs, 2 N outputs One-hot because only one output is hot (HIGH) at a given time 56

Logic using Decoders Decoders can be combined with OR gates to build logic functions SOP form (ORing minterms) 2:4 Decoder Y = Y Minterm 57

Real Decoder Chip 74LS38 3 inputs, 8 outputs inputs outputs 58