Logic Design (Part 2) Combinational Logic Circuits (Chapter 3)

Similar documents
Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

There are only 16 possible 2-input gates Let s examine all of them. Some we already know, others are just silly.

2008 The McGraw-Hill Companies, Inc. All rights reserved.

2/8/2017. SOP Form Gives Good Performance. ECE 120: Introduction to Computing. K-Maps Can Identify Single-Gate Functions

Fundamentals of Computer Systems

Digital Logic Design (3)

CS 31: Intro to Systems Digital Logic

CS470: Computer Architecture. AMD Quad Core

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

Identity. p ^ T p p _ F p. Idempotency. p _ p p p ^ p p. Associativity. (p _ q) _ r p _ (q _ r) (p ^ q) ^ r p ^ (q ^ r) Absorption

Chapter 4. Combinational Logic

Fundamentals of Computer Systems

1. Mark the correct statement(s)

LECTURE 4. Logic Design

Propositional Calculus. Math Foundations of Computer Science

Objectives: 1. Design procedure. 2. Fundamental circuits. 1. Design procedure

COMBINATIONAL LOGIC CIRCUITS

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Parallel logic circuits

Boolean logic. Boolean Algebra. Introduction to Computer Yung-Yu Chuang NOT AND NOT

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Lecture 7 Logic Simplification

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION

T insn-mem T regfile T ALU T data-mem T regfile

Building a Virtual Computer

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

Combinational Circuits

Computer Organization and Levels of Abstraction

Combinational Circuits

Computer Organization and Levels of Abstraction

6. Combinational Circuits. Building Blocks. Digital Circuits. Wires. Q. What is a digital system? A. Digital: signals are 0 or 1.

Arithmetic Logic Unit (ALU)

Combinational Circuits Digital Logic (Materials taken primarily from:

Digital Fundamentals

211: Computer Architecture Summer 2016

Combinational Logic II

QUESTION BANK FOR TEST

Experiment 4 Boolean Functions Implementation

IT 201 Digital System Design Module II Notes

Digital Circuits ECS 371

Recitation Session 6

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

Digital Logic Design Exercises. Assignment 1

Chapter 3. Boolean Algebra and Digital Logic

Software and Hardware

COMP combinational logic 1 Jan. 18, 2016

CS February 17

Transistor: Digital Building Blocks

Chap-2 Boolean Algebra

Lecture (05) Boolean Algebra and Logic Gates

CS8803: Advanced Digital Design for Embedded Hardware

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

(Refer Slide Time 6:48)

At this point in our study of digital circuits, we have two methods for representing combinational logic: schematics and truth tables.

E40M. Binary Numbers, Codes. M. Horowitz, J. Plummer, R. Howe 1

Computer Organization

11.1. Unit 11. Adders & Arithmetic Circuits

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

EECS150 Homework 2 Solutions Fall ) CLD2 problem 2.2. Page 1 of 15

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Boolean Algebra and Logic Gates

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

Boolean Logic CS.352.F12

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Chapter 2. Boolean Expressions:

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

Introduction. Chapter 4. Instruction Execution. CPU Overview. University of the District of Columbia 30 September, Chapter 4 The Processor 1

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

7/25/2016. Example: Addition of Unsigned Bit Patterns. ECE 120: Introduction to Computing. Adding Two Non-Negative Patterns Can Overflow

CprE 281: Digital Logic

Music. Numbers correspond to course weeks EULA ESE150 Spring click OK Based on slides DeHon 1. !

R10. II B. Tech I Semester, Supplementary Examinations, May

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Injntu.com Injntu.com Injntu.com R16

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Experiment 3: Logic Simplification

Mark Redekopp, All rights reserved. EE 352 Unit 8. HW Constructs

Combinational Logic. Prof. Wangrok Oh. Dept. of Information Communications Eng. Chungnam National University. Prof. Wangrok Oh(CNU) 1 / 93

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

Binary Adders: Half Adders and Full Adders

DIRECTORATE OF TECHNICAL EDUCATION DIPLOMA IN ELECTRICAL AND ELECTRONICS ENGINEERING II YEAR M SCHEME IV SEMESTER.

END-TERM EXAMINATION

Simplification of Boolean Functions

4. Write a sum-of-products representation of the following circuit. Y = (A + B + C) (A + B + C)

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

Combinational Logic Worksheet

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

2.6 BOOLEAN FUNCTIONS

Introduction to Boole algebra. Binary algebra

SYNERGY INSTITUTE OF ENGINEERING & TECHNOLOGY,DHENKANAL LECTURE NOTES ON DIGITAL ELECTRONICS CIRCUIT(SUBJECT CODE:PCEC4202)

Arithmetic-logic units

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Topics of this Slideset. CS429: Computer Organization and Architecture. Digital Signals. Truth Tables. Logic Design

ELCT201: DIGITAL LOGIC DESIGN

Section 001. Read this before starting! You may use one sheet of scrap paper that you will turn in with your test.

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Code No: R Set No. 1

GC03 Boolean Algebra

Transcription:

Digital Logic Circuits Logic Design (Part ) Combinational Logic Circuits (Chapter 3) ² We saw how we can build the simple logic gates using transistors ² Use these gates as building blocks to build more complex combinational circuits Decoder: based on value of n-bit input control signal, select one of N outputs Multiplexer: based on value of N-bit input control signal, select one of N inputs. dder: add two binary numbers any boolean function ased on slides McGraw-Hill dditional material 4/5/6 Lewis/Martin dditional material 8 Roth dditional material Taylor dditional material 3 Farmer dditional material 4 Narahari Digital Logic Design Current ummary ² MO transistors used as switches to implement logic functions. n-type: connect to GND, turn on (with ) to pull down to p-type: connect to +.9V, turn on (with ) to pull up to ² asic gates: NOT, NND Logic functions are usually expressed with ND, OR, and NOT ² Review: a little theory behind combinational logic design and some basic combinational devices DeMorgan s Law Combinational logic devices: Ø Decoder, Multiplexer, dder, PL oolean lgebra review from C 3 (Discrete ) oolean lgebra George oole Famous Mathematician/Logician Ø oolean lgebra branch of lgebra, where variables can only have values of true () or false () Ø Instead of +, -, x, /, oolean operators: ND(x), OR(+), NOT(!) NOT is simply an Inverter With oolean lgebra: Ø We create functions using boolean variables and operators Ø ny logical function can be expressed in terms of the three elementary operations: ND, OR and NOT Ø oolean functions can be rearranged and sometimes simplified by applying algebraic identities ig idea you can write a logical function as a boolean algebraic expression and then use various identities to rewrite that function in an equivalent (usually simpler) form. 3-4

oolean Functions function can be thought of as a mapping from inputs to outputs. Ø Think of a black box with n binary inputs and binary output We can express the action of this function in terms of a truth table which says what the output should be for every input pattern. This function implements a binary adder! C in Truth table (describes behavior) C in oolean Functions ² Function on boolean variables F(x,y) x, y are boolean variables ( or values) F(x,y) is a boolean output ² If numbers are represented using binary, then all functions are boolean functions dd lock Diagram 3-5 Completeness: Very Important Concept ² It can be shown that any truth table (i.e. any binary function of binary variables) can be reduced to combinations of the ND & NOT functions, or of the OR & NOT functions. This result extends also to functions of more than two variables Methodology: Karnaugh Maps ² In fact, it turns out to be convenient to use a basic set of three logic gates: oolean Function ² Output(s) is a function of input boolean variables ² y = f(x,y, ) ² The operators used are any of the boolean logic operators ND, OR, NOT, NND, etc. ² How do we represent boolean functions? ND, OR & NOT or NND, NOR & NOT In fact, can implement all logic functions using just NND!

Representation of Logic Functions ² logic function can be represented as a truth table a logic expression a logic circuit ² Example f = a.(b.c + d) + a.c = a.b.c + a.d + a.c a b c d f a b c d f Truth Table to oolean Function ² Definition: literal is a boolean variable x or its complement x x means x= in truth table ² Definition: minterm is product (ND) of literals where each variable/literal appears once in the term ² Disjunctive normal form (DNF): an OR of minterms DNF gives a two level circuit implementation Truth Table to DNF: ² simple boolean function for output F For each row where F=, find minterm Ø Ex: if F= when x=, x=, x3= then minterm= (x x x3) oolean function in DNF is sum ( OR) of all minterms where F= How to design combinational circuit Combinational and equential Circuits ² nalyze the problem Determine inputs and outputs (they must be binary) ² Determine boolean variables inputs x,x, Outputs y, y, ² Derive truth table Value of each yi for each combination of inputs x,x, ² For simple circuit, find DNF from truth table ² To find optimal (minimum size) -level circuit, derive Karnaugh map and find terms ² circuit is a collection of devices that are physically connected by wires Combinational circuit equential circuit ² In Combinational circuit the input determines output ² In sequential circuit, the input and the previous state (previous values) determine output and next state Need circuit to implement concept of storage 3

Combinational Devices ² Use basic gates to build more complex combinational logic functions ² dder: add two binary numbers ² Decoder: enable one of many outputs ² Multiplexer: select one of many inputs Problem ² No one will buy your new computer design unless it can do at least some math, say, like adding! ² How to build hardware for adding binary numbers using what we have learnt so far? ² First look at the function performed by addition we saw this last week it by bit addition, right to left, propagate carry Inputs:, and Carry-in Output: sum bit and carry-out (to next bit position) inary rithmetic: Half dder ² Logical Function: Half dder, implement Carry Out: um C out H (C out ) um Half dder s Logic Function: UM=(( ND ) OR ( ND )) C=( ( ND ) OR ( ND ) OR ( ND ) ) Realize though: C= ( ND ), this isn t always best way! Chaining asic Components Together: ² Let s create an incrementer Input: Output: = + Why? Recall how to create C number? We flip bits then add ² pproach # (impractical) Use PL-like techniques to implement circuit Problem: 8 or 56 rows, 8 output columns In theory, possible; in practice, intractable Ø Imagine a 6-bit incrementer! ² pproach # (pragmatic) Create a -bit incrementer circuit Replicate it 6 times We already have! half adder can be used to just add 8 8 + 8-bit incrementer (just adds ) + 4

One-bit Incrementer ² Implement a single-column of an incrementer using a half adder C out n n + n + C in This is the same operation as a half adder We can call it a half adder or -bit incrementer n H (C out ) um ame functionality, just relabeled inputs N-bit Incrementer ² Chain N -bit incrementers together + 3 + + 3 + 3 3 4 4 + but how do we start off the least-significant bit? 4-bit incrementer implemented using 4, -bit half-adders N-bit Incrementer, continued ² How do we handle the least-significant bit? + + C in = No longer needed; implicitly encoded with C in We carry in a + + +... ddition: Full dders ² There is a limit with the half adder It can t implement multiple-bit addition H um (C out ) C out + It works for least significant bit, but won t work for the next C in F um + C out um We need an adder that has 3 inputs and outputs 3- um 5

Truth Table Carry In Out Carry Out Truth Table for inary ddition Carry In Out Carry Out Full dder -bit Full dder Carry OUT Carry IN ² dd two bits and carry-in, produce one-bit sum and carry-out. C in C out UM-OUT 6

N-bit dder Four-bit dder ² Use the building block of the full-adder to build N-bit adder Need to connect carry-out to carry-in of next significant bit N-bit dder dd dd dd... 6 6 + 6 : useful for detecting overflow 3-7 : assumed to be zero if not present Truth Table Carry In Out Carry Out 7

How about a subtractor? ² uild a subtracter from out multi-bit adder Calculate = + Negate Recall = NOT() + pproach# pproach# We carry in a (no longer need incrementer) Can we put this together? ² In a CPU, we d like to do OTH addition and subtraction Can we give the CPU the ability to choose between two pieces of hardware? Yes! Ø We need another small piece of logic to do it: MUX 6 6 6 + 6 adder 6 6 6 6 adder 6 Now, let s create an adder/subtracter 3-3 The Multiplexer (MUX) The selector ² elector/chooser of signals Imagine witching Railroad Tracks Multi-way switch -to- Mux 4-to- Mux = O Problem: electing one of many ² You have m input signals and you want to use the logical value on one of them determined by a set control signals/wires n control signals Each student sends a signal ( or ) I want to select Tim s signal so I can process his answer Ø Need to give Tim s code of to select his answer m O n Input selects or to attach to O output cts like an IF/ELE statement 3-3 out 8

Multiplexer (MUX) C D Out 4-to- MUX: Out takes the value of,, C or D depending on the value of (,,, ) In general, a MUX has Ø n data inputs Ø n select (or control) lines Ø and output. It behaves like a channel selector. Out =.. +.. + C.. + D.. C D [:] The Multiplexer (MUX) ² In general N select bits chooses from N inputs n incredibly useful building block ² Multi-bit muxes Can switch an entire bus or group of signals witch n-bits with n muxes with the same select bits 6 6 6 6 6 Out dder/ubtracter - pproach # dder ubtracter 6 6 6 6 6 6 6 dder/ubtracter 6 dd/ub 6 6 6 6 6 dder/ubtracter - pproach # 6 6 dder 6 6 ubtracter 6 6 dder/ubtracter dd/ub 6 6 6 6 6 9

nother useful device the Decoder ² You have an n bit binary number assigned as unique ID to each student. How do we select & physically connect to a specific student with ID y? ² In /W, a case /switch statement: One of the cases will be evaluated depending on value of input ² cenario: 4 light bulbs, switch one of them ON depending on bit input oolean function for decoder ² Need to select one of four: bits needed to encode the four outcomes a a ² 4 outputs associated with each signal x 3 x x x ² What is the boolean function? ² When is each x i set to : x = a.a (NOT a ND NOT a ) x = a.a x = a.a x 3 = a.a Truth table Decoder a a x x x x 3 i =, iff, is n n input decoder has n outputs. i = i = i = 3, iff, is, iff, is - Tim, iff, is Output i is iff the binary value of the n-bit input is i. t any time, exactly one output is, all others are. -bit decoder (4 input decoder)

Combinational vs. equential ² Combinational Circuit always gives the same output for a given set of inputs Ø ex: adder always generates sum and carry, regardless of previous inputs ² equential Circuit stores information output depends on stored information (state) plus input Ø so a given input might produce different outputs, depending on the stored information example: vending machine Ø Current total increases when you insert coins Ø output depends on previous state useful for building memory elements and state machines Next.. equential Circuits ² First we need to build a device that can store a bit uilding memory follows ² How to model sequential circuits/machines Finite state machine ² How to build a sequential circuit? Limitations of sequential machines..more in Foundations course ² can we use a sequential circuit to control how computations take place in a processor?