Binary Adder DesignSpring 2003 1 Binary Adders. Binary Adder DesignSpring 2003 2 n-bit Addition –Ripple Carry Adder –Conditional Sum Adder –(Carry Lookahead.

Slides:



Advertisements
Similar presentations
ECE2030 Introduction to Computer Engineering Lecture 13: Building Blocks for Combinational Logic (4) Shifters, Multipliers Prof. Hsien-Hsin Sean Lee School.
Advertisements

Full Adder Display. Topics A 1 bit adder with LED display Ripple Adder Signed/Unsigned Subtraction Hardware Implementation of 4-bit adder.
Chapter 4 -- Modular Combinational Logic. Decoders.
Comparator.
Lecture Adders Half adder.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Arithmetic See: P&H Chapter 3.1-3, C.5-6.
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
ECE 331 – Digital System Design
Arithmetic CPSC 321 Computer Architecture Andreas Klappenecker.
1  2004 Morgan Kaufmann Publishers Chapter Three.
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Lecture 8 Arithmetic Logic Circuits
1 Chapter 4: Arithmetic Where we've been: –Performance (seconds, cycles, instructions) –Abstractions: Instruction Set Architecture Assembly Language and.
Arithmetic I CPSC 321 Andreas Klappenecker. Administrative Issues Office hours of TA Praveen Bhojwani: M 1:00pm-3:00pm.
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
1  1998 Morgan Kaufmann Publishers Chapter Four Arithmetic for Computers.
ENGIN112 L14: Binary Adder Subtractor October 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 14 Binary Adders and Subtractors.
Chapter 3 Arithmetic for Computers. Arithmetic Where we've been: Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Calculator Lab Overview Note: Slides Updated 10/8/12
1 Bits are just bits (no inherent meaning) — conventions define relationship between bits and numbers Binary numbers (base 2)
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Digital Arithmetic and Arithmetic Circuits
ECE2030 Introduction to Computer Engineering Lecture 12: Building Blocks for Combinational Logic (3) Adders/Subtractors, Parity Checkers Prof. Hsien-Hsin.
Chapter 6-1 ALU, Adder and Subtractor
CSE 241 Computer Organization Lecture # 9 Ch. 4 Computer Arithmetic Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
1 EGRE 426 Fall 08 Chapter Three. 2 Arithmetic What's up ahead: –Implementing the Architecture 32 operation result a b ALU.
1  1998 Morgan Kaufmann Publishers Arithmetic Where we've been: –Performance (seconds, cycles, instructions) –Abstractions: Instruction Set Architecture.
Csci 136 Computer Architecture II – Constructing An Arithmetic Logic Unit Xiuzhen Cheng
Computing Systems Designing a basic ALU.
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
1 Lecture 12 Time/space trade offs Adders. 2 Time vs. speed: Linear chain 8-input OR function with 2-input gates Gates: 7 Max delay: 7.
1 Arithmetic I Instructor: Mozafar Bag-Mohammadi Ilam University.
Computer Architecture Lecture 3 Combinational Circuits Ralph Grishman September 2015 NYU.
Combinational Circuits
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Computer Architecture Lecture 16 Fasih ur Rehman.
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
1 ELEN 033 Lecture 4 Chapter 4 of Text (COD2E) Chapters 3 and 4 of Goodman and Miller book.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
C-H1 Lecture Adders Half adder. C-H2 Full Adder si is the modulo- 2 sum of ci, xi, yi.
Addition, Subtraction, Logic Operations and ALU Design
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Fundamentals of Computer Science Combinational Circuits.
CML CML CS 230: Computer Organization and Assembly Language Aviral Shrivastava Department of Computer Science and Engineering School of Computing and Informatics.
순천향대학교 정보기술공학부 이 상 정 1 3. Arithmetic for Computers.
Prof. Hsien-Hsin Sean Lee
Lec 11Systems Architecture1 Systems Architecture Lecture 11: Arithmetic for Computers Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or all.
ECE/CS 552: Arithmetic I Instructor:Mikko H Lipasti Fall 2010 University of Wisconsin-Madison Lecture notes partially based on set created by Mark Hill.
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
Lecture #23: Arithmetic Circuits-1 Arithmetic Circuits (Part I) Randy H. Katz University of California, Berkeley Fall 2005.
Computer Arthmetic Chapter Four P&H. Data Representation Why do we not encode numbers as strings of ASCII digits inside computers? What is overflow when.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
9/23/2004Comp 120 Fall September Chapter 4 – Arithmetic and its implementation Assignments 5,6 and 7 posted to the class web page.
May 2, 2001System Architecture I1 Systems Architecture I (CS ) Lecture 11: Arithmetic for Computers * Jeremy R. Johnson May 2, 2001 *This lecture.
By Wannarat Computer System Design Lecture 3 Wannarat Suntiamorntut.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Based on slides from D. Patterson and www-inst.eecs.berkeley.edu/~cs152/ COM 249 – Computer Organization and Assembly Language Chapter 3 Arithmetic For.
Computer System Design Lecture 3
Exercise: Add these two single precision IEEE 754 numbers: … …0 Left number: 1.101x24 Right number: 1.011x 22= x24.
ECE 331 – Digital System Design
CSE Winter 2001 – Arithmetic Unit - 1
King Fahd University of Petroleum and Minerals
Arithmetic Circuits (Part I) Randy H
Arithmetic Logical Unit
Presentation transcript:

Binary Adder DesignSpring Binary Adders

Binary Adder DesignSpring n-bit Addition –Ripple Carry Adder –Conditional Sum Adder –(Carry Lookahead Adder)

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Ripple Carry Adder

Binary Adder DesignSpring Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

Binary Adder DesignSpring Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

Binary Adder DesignSpring Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

Binary Adder DesignSpring Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

Binary Adder DesignSpring Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

Binary Adder DesignSpring Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

Binary Adder DesignSpring Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

Binary Adder DesignSpring Conditional Sum Adder

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

Binary Adder DesignSpring Carry Lookahead Adder Main principle: combine carry computations of substrings Carry into bit position i: c[i] is computed from bits: a[i-1:0],b[i-1:0], cin condition:

Binary Adder DesignSpring Carry Lookahead Adder Main principle: combine carry computations of substrings Carry into bit position i: c[i] is computed from bits: a[i-1:0],b[i-1:0], cin condition: Definition propagate signals: Definition generate signals:

Binary Adder DesignSpring Carry Lookahead Adder Definition propagate signals: Definition generate signals: for i>0: for i=0: relation to carries: Computation of the signals, : for i>0: for i=0:

Binary Adder DesignSpring Carry Lookahead Adder Combination of carry and propagate signals:

Binary Adder DesignSpring Carry Lookahead Adder Combination of carry and propagate signals:

Binary Adder DesignSpring Carry Lookahead Adder Combination of carry and propagate signals:

Binary Adder DesignSpring Carry Lookahead Adder Combination of carry and propagate signals: Given two such pairs of generate and propagate signals and we define the operation :

Binary Adder DesignSpring Carry Lookahead Adder Carry computation based on computation of generate and propagate signals:

Binary Adder DesignSpring Carry Lookahead Adder Carry computation based on computation of generate and propagate signals:

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder Structure Implementation using Parallel Prefix Computation

Binary Adder DesignSpring Parallel Prefix Computation For associative operation o, we define Parallel Prefix Operation: n-bit INPUT: n-bit OUTPUT: Compute the operation o on all prefixes of X[n:1]

Binary Adder DesignSpring Carry Lookahead Adder Parallel Prefix Computation: n=1:n=2^k:

Binary Adder DesignSpring Carry Lookahead Adder Parallel Prefix Computation:

Binary Adder DesignSpring Carry Lookahead Adder Parallel Prefix Computation:

Binary Adder DesignSpring Carry Lookahead Adder Parallel Prefix Computation:

Binary Adder DesignSpring Carry Lookahead Adder Parallel Prefix Computation:

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder cost:

Binary Adder DesignSpring Carry Lookahead Adder delay:

Binary Adder DesignSpring Carry Lookahead Adder Example for n=8 –design –computation of

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Carry Lookahead Adder

Binary Adder DesignSpring Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

Binary Adder DesignSpring Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

Binary Adder DesignSpring Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

Binary Adder DesignSpring Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

Binary Adder DesignSpring Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

Binary Adder DesignSpring Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1): assumption: add/sub result is representable with n bits

Binary Adder DesignSpring Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1): assumption: add/sub result is representable with n bits Detection of the case that the result can not be represented with n bits (overflow)

Binary Adder DesignSpring Overflow Overflow: result too large for finite computer word –e.g., adding two n-bit numbers does not yield an n-bit number note that overflow term is somewhat misleading, 1000 it does not mean a carry “overflowed” Detecting Overflow –No overflow when adding a positive and a negative number –No overflow when signs are the same for subtraction –Overflow occurs when the value affects the sign: overflow when adding two positives yields a negative or, adding two negatives gives a positive or, subtract a negative from a positive and get a negative or, subtract a positive from a negative and get a positive –Consider the operations A + B, and A – B Can overflow occur if B is 0 ? Can overflow occur if A is 0 ?

Binary Adder DesignSpring Effects of Overflow An exception (interrupt) occurs –Control jumps to predefined address for exception –Interrupted address is saved for possible resumption Details based on software system / language –example: flight control vs. homework assignment correct sign has to be computed even for overflows –branches should also work correctly after overflows –neg signal:

Binary Adder DesignSpring Overflow & Sign Overflow detection:

Binary Adder DesignSpring Overflow & Sign Overflow detection:

Binary Adder DesignSpring Overflow & Sign Overflow detection:

Binary Adder DesignSpring Overflow & Sign Overflow detection:

Binary Adder DesignSpring Overflow & Sign Overflow detection:

Binary Adder DesignSpring Overflow & Sign Overflow detection:

Binary Adder DesignSpring Overflow & Sign Overflow detection:

Binary Adder DesignSpring Overflow & Sign Overflow detection:

Binary Adder DesignSpring Overflow & Sign Sign condition:

Binary Adder DesignSpring Overflow & Sign Sign condition: consider sign extended sum:

Binary Adder DesignSpring Overflow & Sign Sign condition: consider sign extended sum: sign computation:

Binary Adder DesignSpring Overflow & Sign Sign condition: consider sign extended sum: sign computation:

Binary Adder DesignSpring Overflow & Sign Sign condition: consider sign extended sum: sign computation:

Binary Adder DesignSpring Overflow & Sign Sign condition: consider sign extended sum: sign computation:

Binary Adder DesignSpring Design of an Add/Subtract Unit

Binary Adder DesignSpring Design of an Add/Subtract Unit

Binary Adder DesignSpring Design of an Add/Subtract Unit

Binary Adder DesignSpring Design of an Add/Subtract Unit

Binary Adder DesignSpring Design of an Add/Subtract Unit

Binary Adder DesignSpring Design of an Add/Subtract Unit