Fundamentals of Computer Systems

Similar documents
Fundamentals of Computer Systems

Arithmetic Logic Unit. Digital Computer Design

Chapter 4. Combinational Logic

ALU Design. 1-bit Full Adder 4-bit Arithmetic circuits. Arithmetic and Logic Unit Flags. Add/Subtract/Increament/Decrement Circuit

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

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

Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library

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

Combinational Circuits

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

Tailoring the 32-Bit ALU to MIPS

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

Combinational Logic Use the Boolean Algebra and the minimization techniques to design useful circuits No feedback, no memory Just n inputs, m outputs

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

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

Question Total Possible Test Score Total 100

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE

1. Mark the correct statement(s)

CS Spring Combinational Examples - 1

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

Binary Arithmetic. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T.

Code No: R Set No. 1

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

COMBINATIONAL LOGIC CIRCUITS

Combinational Logic II

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

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

QUESTION BANK FOR TEST

ECE468 Computer Organization & Architecture. The Design Process & ALU Design

Chapter 5 Registers & Counters

Injntu.com Injntu.com Injntu.com R16

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

Lecture 5. Other Adder Issues

EECS 270 Midterm Exam

Chapter 3 Arithmetic for Computers

Computer Architecture Set Four. Arithmetic

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

Binary Adders: Half Adders and Full Adders

ECE 30 Introduction to Computer Engineering

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

Revision: August 31, E Main Suite D Pullman, WA (509) Voice and Fax

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

Digital logic fundamentals. Question Bank. Unit I

Chapter 6 Combinational-Circuit Building Blocks

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

CS 31: Intro to Systems Digital Logic

UNIT- V COMBINATIONAL LOGIC DESIGN

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

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Computer Architecture and Organization: L04: Micro-operations

Digital Logic Design (3)

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

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

Experiment 7 Arithmetic Circuits Design and Implementation


END-TERM EXAMINATION

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

ECE 341 Midterm Exam

Addition and multiplication

CS 151 Quiz 4. Instructions: Student ID. (Last Name) (First Name) Signature

Combinational Circuit Design

CPE300: Digital System Architecture and Design

CS8803: Advanced Digital Design for Embedded Hardware

Code No: R Set No. 1

Arithmetic Logic Unit (ALU)

Computer Architecture and Organization

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS

Chapter 3: part 3 Binary Subtraction

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

Writing Circuit Descriptions 8

Code No: R Set No. 1

Chapter 4. The Processor

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

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

Course Project Part 1

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

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

Learning Outcomes. Spiral 2-2. Digital System Design DATAPATH COMPONENTS

Week 7: Assignment Solutions

Chapter 4 Arithmetic Functions

CMPE 413/ CMSC 711. Project Specification: 16 bit 2 s complement Adder and 8 bit 2 s complement multiplier. GND. Input bus. Latches I[8]-I[15]

PESIT Bangalore South Campus

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates. Invitation to Computer Science, C++ Version, Third Edition

Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number. Chapter 3

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

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

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

University of Technology

Chapter 4. The Processor

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

Two-Level CLA for 4-bit Adder. Two-Level CLA for 4-bit Adder. Two-Level CLA for 16-bit Adder. A Closer Look at CLA Delay

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

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

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

IA Digital Electronics - Supervision I

CS/COE 0447 Example Problems for Exam 2 Spring 2011

Principles of Computer Architecture. Chapter 3: Arithmetic

Transcription:

Fundamentals of Computer Systems Combinational Logic Martha. Kim Columbia University Spring 6 /

Combinational Circuits Combinational circuits are stateless. Their output is a function only of the current input. Inputs Combinational Circuit Outputs /

Basic Combinational Circuits Encoders and Decoders Multiplexers Shifters Circuit Timing Critical and Shortest Paths Glitches rithmetic Circuits Ripple Carry dder dder/subtractor Carry Lookahead dder /

Overview: Decoder decoder takes a k bit input and produces k single-bit outputs. The input determines which output will be, all others. This representation is called one-hot encoding. O I O I O O 4 /

: Decoder The smallest decoder: one bit input, two bit outputs 5 /

:4 Decoder Decoder outputs are simply minterms. Those values can be constructed as a flat schematic (manageable at small sizes) or hierarchically, as below. B B : DEC B B B : DEC B B 6 /

:8 Decoder pplying hierarchical design again, the :4 DEC helps construct a :8 DEC. : DEC BC BC BC B C BC BC :4 DEC BC B C B C BC BC BC B C 7 /

Priority Encoder n encoder designed to accept any input bit pattern. I I I I V O O X X X X X X X X V = I + I + I + I O = I + I I O = I + I I I 8 /

Overview: Multiplexer (or Mux) mux has a k bit selector input and k data inputs (multi or single bit). It outputs a single data output, which has the value of one of the data inputs, according to the selector. D IN C B IN IN OUT B IN S S 9 /

: Mux Circuit There are a handful of implementation strategies. E.g., a truth table and k-map are feasible for a design of this size. S I I /

: Mux Circuit There are a handful of implementation strategies. E.g., a truth table and k-map are feasible for a design of this size. S I I I S I O

: Mux Circuit There are a handful of implementation strategies. E.g., a truth table and k-map are feasible for a design of this size. S I I I S I : Decoder! O /

4: Mux Circuit I I O I I EN EN EN EN :4 DEC S S /

Muxing Wider Values (Overview) I I O I I EN EN EN EN :4 DEC S S /

Muxing Wider Values (Components) X X X X Y Y Y Y EN X X X X Z Z Z Z Y Y Y Y /

Overview: Shifters shifter shifts the inputs bits to the left or to the right. IN n SHIFTER k CNTL n OUT There are various types of shifters. Barrel: Selector bits indicate (in binary) how far to the left to shift the input. L/R with enable: Two control bits (upper enables, lower indicates direction). In either case, bits may roll out or wraparound 4 /

Example: Barrel Shifter with Wraparound 8 SHIFTER 8 5 /

Implementation of Barrel Shifter with Wraparound (Part ) Main idea: wire up all possible shift amounts and use muxes to select correct one. IN IN IN IN OUT OUT OUT OUT

Implementation of Barrel Shifter with Wraparound (Part ) Main idea: wire up all possible shift amounts and use muxes to select correct one. IN IN IN IN CNTL, CNTL OUT OUT OUT OUT

Implementation of Barrel Shifter with Wraparound (Part ) Main idea: wire up all possible shift amounts and use muxes to select correct one. IN IN IN IN CNTL, CNTL OUT OUT OUT OUT

Implementation of Barrel Shifter with Wraparound (Part ) Main idea: wire up all possible shift amounts and use muxes to select correct one. IN IN IN IN CNTL, CNTL OUT OUT OUT OUT

Implementation of Barrel Shifter with Wraparound (Part ) Main idea: wire up all possible shift amounts and use muxes to select correct one. IN IN IN IN CNTL, CNTL OUT OUT OUT OUT

Implementation of Barrel Shifter with Wraparound (Part ) Main idea: wire up all possible shift amounts and use muxes to select correct one. IN IN IN IN CNTL, CNTL OUT OUT OUT OUT 6 /

Computation lways Takes Time 74LS There is a delay between inputs and outputs, due to: Limited currents charging capacitance The speed of light 7 /

The Simplest Timing Model In Out t p Each gate has its own propagation delay t p. When an input changes, any changing outputs do so after t p. Wire delay is zero. 8 /

More Realistic Timing Model In Out t p(max) t p(min) It is difficult to manufacture two gates with the same delay; better to treat delay as a range. Each gate has a minimum and maximum propagation delay t p(min) and t p(max). Outputs may start changing after t p(min) and stablize no later than t p(max). 9 /

Critical Paths and Short Paths B C D Y How slow can this be? /

Critical Paths and Short Paths B C D Y How slow can this be? The critical path has the longest possible delay. t p(max) = t p(max, ND) + t p(max, OR) + t p(max, ND) /

Critical Paths and Short Paths B C D Y How fast can this be? The shortest path has the least possible delay. t p(min) = t p(min, ND) /

Glitches glitch is when a single change in input values can cause multiple output changes. B F C Glitches may occur when there are multiple paths of different length from input I to output O.

Glitches glitch is when a single change in input values can cause multiple output changes. B F C Glitches may occur when there are multiple paths of different length from input I to output O.

Glitches glitch is when a single change in input values can cause multiple output changes. B F C Glitches may occur when there are multiple paths of different length from input I to output O.

Glitches glitch is when a single change in input values can cause multiple output changes. B F C Glitches may occur when there are multiple paths of different length from input I to output O. /

Preventing Single Input Glitches dditional terms can prevent single input glitches (at a cost of a few extra gates). B C B F C /

Preventing Single Input Glitches dditional terms can prevent single input glitches (at a cost of a few extra gates). B C B F C /

rithmetic: ddition dding two one-bit numbers: and B Produces a two-bit result: C and S (carry and sum) B C S B Half dder C S /

Full dder In general, due to a possible carry in, you need to add three bits: C o C i B C o S C i B C o S C i B S 4 /

Four-Bit Ripple-Carry dder B B B B B C o F C i F F F F S S 4 S S S S 5 /

Two s Complement dder/subtractor To subtract B from, add and B. Neat trick: carry in takes care of the + operation. B B B B SUBTRCT/DD F F F F S 4 S S S S 6 /

Overflow in Two s-complement Representation When is the result too positive or too negative? + + + + + + + + + + + 7 /

Overflow in Two s-complement Representation When is the result too positive or too negative? + + % + % + The result does not fit when the top two carry bits differ. n Bn n Bn + + + S n S n + + + + % Overflow 7 /

Ripple-Carry dders are Slow B B B B C C4 S S S S The depth of a circuit is the number of gates on a critical path. This four-bit adder has a depth of 8. n-bit ripple-carry adders have a depth of n. 8 /

Carry Generate and Propagate The carry chain is the slow part of an adder; carry-lookahead adders reduce its depth using the following trick: C B K-map for the carry-out function of a full adder For bit i, C i+ = i B i + i C i + B i C i = i B i + C i ( i + B i ) = G i + C i P i Generate G i = i B i sets carry-out regardless of carry-in. Propagate P i = i + B i copies carry-in to carry-out. 9 /

Carry Lookahead dder Expand the carry functions into sum-of-products form: C i+ = G i + C i P i C = G + C P C = G + C P = G + (G + C P )P = G + G P + C P P C = G + C P = G + (G + G P + C P P )P = G + G P + G P P + C P P P C 4 = G + C P = G + (G + G P + G P P + C P P P )P = G + G P + G P P + G P P P + C P P P P /

Carry-Lookahead dder Size and Timing B4 4 9 C4 Σ4 Carry out i has i + product terms, largest of which has i + literals. B B B C 5 4 6 5 7 The 748 Binary Carry-Lookahead dder (From National Semiconductor) 4 Σ Σ Σ If wide gates don t slow down, delay is independent of number of bits. More realistic: if limited to two-input gates, depth is O(log n). /