Lecture 10: Combinational Circuits

Similar documents
6: Combinational Circuits

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

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

Combinational Circuits

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

Arithmetic Logic Unit (ALU)

Combinational Circuits Digital Logic (Materials taken primarily from:

ECEN 468 Advanced Logic Design

Parallel logic circuits

Software and Hardware

Computer Organization and Levels of Abstraction

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

Binary Adders: Half Adders and Full Adders

Introduction to Boole algebra. Binary algebra

QUESTION BANK FOR TEST

Arithmetic-logic units

Computer Organization and Levels of Abstraction

24 Nov Boolean Operations. Boolean Algebra. Boolean Functions and Expressions. Boolean Functions and Expressions

UC Berkeley College of Engineering, EECS Department CS61C: Combinational Logic Blocks

UC Berkeley College of Engineering, EECS Department CS61C: Combinational Logic Blocks

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

CSC 220: Computer Organization Unit 10 Arithmetic-logic units

Von Neumann Architecture

Basic Arithmetic (adding and subtracting)

Register Transfer Language and Microoperations (Part 2)

Gate-Level Minimization. section instructor: Ufuk Çelikcan

Chapter 4 Arithmetic Functions

Lecture (04) Boolean Algebra and Logic Gates

Lecture (04) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee

ECE 341 Midterm Exam

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26)

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

REGISTER TRANSFER AND MICROOPERATIONS

REGISTER TRANSFER AND MICROOPERATIONS

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

Boolean Functions (10.1) Representing Boolean Functions (10.2) Logic Gates (10.3)

Electronic Engineering Part 1 Laboratory Experiment. Digital Circuit Design 1 Combinational Logic. (3 hours)

Digital Logic Design Exercises. Assignment 1

Combinational and sequential circuits (learned in Chapters 1 and 2) can be used to create simple digital systems.

ENGIN 112. Intro to Electrical and Computer Engineering

END-TERM EXAMINATION


Review. Pipeline big-delay CL for faster clock Finite State Machines extremely useful You ll see them again in 150, 152 & 164

CS 261 Fall Mike Lam, Professor. Combinational Circuits

REGISTER TRANSFER LANGUAGE

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

DIGITAL ELECTRONICS. P41l 3 HOURS

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

CS61C : Machine Structures

CARLETON UNIVERSITY. Laboratory 2.0

Solutions - Homework 2 (Due date: February 5 5:30 pm) Presentation and clarity are very important! Show your procedure!

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

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING, THE UNIVERSITY OF NEW MEXICO ECE-238L: Computer Logic Design Fall 2013.

Computer Architecture and Organization: L04: Micro-operations

Experiment 7 Arithmetic Circuits Design and Implementation

CS/COE 0447 Example Problems for Exam 2 Spring 2011

Topics. Computer Organization CS Exam 2 Review. Infix Notation. Reverse Polish Notation (RPN)

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

CHAPTER 4: Register Transfer Language and Microoperations

Review. Steps to writing (stateless) circuits: Create a logic function (one per output)

EE292: Fundamentals of ECE

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

Combinational Logic II

1 /10 2 /12 3 /16 4 /30 5 /12 6 /20

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

Lecture #21 March 31, 2004 Introduction to Gates and Circuits

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

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

Chapter 3 Arithmetic for Computers

Chapter 4. Combinational Logic

1. Mark the correct statement(s)

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

Combinational Circuits

Lecture (03) Binary Codes Registers and Logic Gates

COMP combinational logic 1 Jan. 18, 2016

Arithmetic Circuits. Design of Digital Circuits 2014 Srdjan Capkun Frank K. Gürkaynak.

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

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

UPY14602-DIGITAL ELECTRONICS AND MICROPROCESSORS Lesson Plan

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Propositional Calculus. Math Foundations of Computer Science

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

20 Calculus and Structures

5. Minimizing Circuits

II/IV B.Tech (Regular/Supplementary) DEGREE EXAMINATION. Answer ONE question from each unit.

Chapter 2 Basic Logic Circuits and VHDL Description

Computer Organization (Autonomous)

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

CS 261 Fall Mike Lam, Professor. Logic Gates

ECE3663 Design Project: Design Review #1

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

Reference Sheet for C112 Hardware

Logic, Words, and Integers

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function.

Introduction to Digital Logic Missouri S&T University CPE 2210 Registers

Lec-6-HW-3-ALUarithmetic-SOLN

Arithmetic Logic Unit. Digital Computer Design

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

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

Transcription:

Computer Architecture Lecture : Combinational Circuits Previous two lectures.! TOY machine. Net two lectures.! Digital circuits. George Boole (85 864) Claude Shannon (96 2) Culminating lecture.! Putting it all together and building a TOY machine. COS26: General Computer Science http://www.cs.princeton.edu/~cos26 2 Digital Circuits Wires What is a digital sstem?! Digital: signals are or.! Analog: signals var continuousl. Wh digital sstems?! Accurac and reliabilit.! Staggeringl fast and cheap. Basic abstractions.! On, off.! Switch that can turn something on or off. Wires.! Propagate logical values from place to place.! Signals "flow" from left to right. A drawing convention, sometimes violated Actuall: flow from producer to consumer(s) of signal Digital circuits and ou.! Computer microprocessors.! Antilock brakes.! Cell phones. Input Output 3 4

Logic Gates Multiwa AND Gates Logical gates.! Fundamental building blocks. AND(,, 2, 3, 4, 5, 6, 7 ).! if all inputs are.! otherwise. ' NOT AND OR 5 6 Multiwa OR Gates Boolean Algebra OR(,, 2, 3, 4, 5, 6, 7 ).! if at least one input is.! otherwise. Histor.! Developed b Boole to solve mathematical logic problems (847).! Shannon first applied to digital circuits (937). Basics.! Boolean variable: value is or.! Boolean function: function whose inputs and outputs are,. Relationship to circuits.! Boolean variables: signals.! Boolean functions: circuits. 7 8

Truth Table Truth Table for Functions of 2 Variables Truth table.! Sstematic method to describe Boolean function.! One row for each possible input combination.! N inputs! 2 N rows. Truth table.! 6 Boolean functions of 2 variables. ever 4-bit value represents one Truth Table for All Boolean Functions of 2 Variables AND Truth Table AND(, ) ZERO AND XOR Truth Table for All Boolean Functions of 2 Variables NOR EQ ' ' NAND OR ONE AND 9 Truth Table for Functions of 3 Variables Universalit of AND, OR, NOT Truth table.! 6 Boolean functions of 2 variables. ever 4-bit value represents one! 256 Boolean functions of 3 variables. ever 8-bit value represents one! 2^(2^N) Boolean functions of N variables! Some Functions of 3 Variables z AND OR MAJ ODD An Boolean function can be epressed using AND, OR, NOT.! "Universal."! XOR(,) = ' ' Epressing XOR Using AND, OR, NOT ' ' ' ' ' ' XOR Notation ' Eercise: {AND, NOT}, {OR, NOT}, {NAND}, {AND, XOR} are universal. Meaning NOT AND OR 2

Sum-of-Products Translate Boolean Formula to Boolean Circuit An Boolean function can be epressed using AND, OR, NOT.! Sum-of-products is sstematic procedure. form AND term for each in truth table of Boolean function OR terms together Use sum-of-products form.! XOR(, ) = ' '. Epressing MAJ Using Sum-of-Products z MAJ 'z 'z z' z 'z 'z z' z 3 4 Translate Boolean Formula to Boolean Circuit Simplification Using Boolean Algebra Use sum-of-products form.! MAJ(,, z) = 'z 'z z' z. Man possible circuits for each Boolean function.! Sum-of-products not necessaril optimal in: number of gates (space) depth of circuit (time)! MAJ(,, z) = 'z 'z z' z = z z. size = 8, depth = 3 size = 4, depth = 2 5 6

Epressing a Boolean Function Using AND, OR, NOT ODD Parit Circuit Ingredients.! AND gates.! OR gates.! NOT gates.! Wire. ODD(,, z).! if odd number of inputs are.! otherwise. Epressing ODD Using Sum-of-Products Instructions.! Step : represent input and output signals with Boolean variables.! Step 2: construct truth table to carr out computation.! Step 3: derive (simplified) Boolean epression using sum-of products.! Step 4: transform Boolean epression into circuit. z ODD ''z 'z' 'z' z ''z 'z' 'z' z 7 8 ODD Parit Circuit Let's Make an Adder Circuit ODD(,, z).! if odd number of inputs are.! otherwise. Goal: = z for 4-bit integers.! We build 4-bit adder: 9 inputs, 4 outputs.! Same idea scales to 28-bit adder.! Ke computer component. 2 4 8 7 3 5 7 9 6 6 6 Step.! Represent input and output in binar. 3 2 3 2 c z 3 z 2 z z 3 2 3 2 z 3 z 2 z z 9 2

Let's Make an Adder Circuit Let's Make an Adder Circuit Goal: = z for 4-bit integers. c Goal: = z for 4-bit integers. c 3 c = c 2 c 3 2 3 2 Step 2. (first attempt)! Build truth table. 3 2 Step 2. (do one bit at a time)! Build truth table for carr bit. 3 2! Wh is this a bad idea? z 3 z 2 z z! Build truth table for summand bit. z 3 z 2 z z 28-bit adder: 2 256 rows > # electrons in universe! c. 3 2 4-Bit Adder Truth Table 3 2 z 3 z 2 z z 2 8 = 52 rows! Carr Bit i i c i c i Summand Bit i i c i z i 2 22 Let's Make an Adder Circuit Let's Make an Adder Circuit Goal: = z for 4-bit integers. c 3 c = c 2 c Goal: = z for 4-bit integers. 3 2 Step 3.! Derive (simplified) Boolean epression. 3 2 Step 4.! Transform Boolean epression into circuit. z 3 z 2 z z! Chain together -bit adders. Carr Bit Summand Bit i i c i c i MAJ i i c i z i ODD 23 24

Let's Make an Adder Circuit Subtractor Goal: = z for 4-bit integers. Step 4.! Transform Boolean epression into circuit.! Chain together -bit adders. Subtractor circuit: z = -.! One approach: design like adder circuit.! Better idea: reuse adder circuit. 2's complement: to negate an integer, flip bits, then add 3 2 - - 3 2 carr z 3 z 2 z z 4-Bit Subtractor Interface 4-Bit Subtractor Implementation 25 26 Arithmetic Logic Unit: Interface Arithmetic Logic Unit: Implementation ALU Interface.! Add, subtract, bitwise and, bitwise or, shift left, shift right, cop.! Associate 3-bit integer with 5 primar ALU operations. ALU performs operations in parallel control wires select which result ALU outputs Input Input 2 6 6 ~ carr in op 2, - & ^ <<, >> input 2 Input Input 2 6 6 shift direction ALU subtract 3 ALU select 6 27 op 2, - & ^ <<, >> input 2 subtract & ^^ << >> shift direction MUX 3 ALU control 6 28

Summar Lessons for software design appl to hardware design!! Interface describes behavior of circuit.! Implementation gives details of how to build it. Laers of abstraction appl with a vengeance!! On/off.! Controlled switch (transistor).! Gates (AND, OR, NOT).! Boolean circuit (MAJ, ODD).! Adder.!.! Arithmetic logic unit.!.! TOY machine. 29