The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Arithmetic Circuits II Anselmo Lastra.

Slides:



Advertisements
Similar presentations
Arithmetic for Computers
Advertisements

Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 4 – Arithmetic Functions Logic and Computer.
Lecture Adders Half adder.
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
Overview Iterative combinational circuits Binary adders
Chapter 6 Arithmetic. Addition Carry in Carry out
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Chapter # 5: Arithmetic Circuits Contemporary Logic Design Randy H
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
1 COMP541 Arithmetic Circuits Montek Singh Mar 20, 2007.
Digital Arithmetic Wen-Hung Liao, Ph.D.. Objectives Perform binary addition, subtraction, multiplication, and division on two binary numbers. Add and.
Overview Iterative combinational circuits Binary adders
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Binary Addition Binary Multiplication Section 4.5 and 4.7.
CS 105 Digital Logic Design
Lecture 12: Computer Arithmetic Today’s topic –Numerical representations –Addition / Subtraction –Multiplication / Division 1.
Binary Arithmetic Stephen Boyd March 14, Two's Complement Most significant bit represents sign. 0 = positive 1 = negative Positive numbers behave.
Logical Circuit Design Week 8: Arithmetic Circuits Mentor Hamiti, MSc Office ,
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 4 – Arithmetic Functions Logic and Computer.
Chapter # 5: Arithmetic Circuits
Chapter 6-1 ALU, Adder and Subtractor
Chapter 4 Register Transfer and Micro -operations
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 4 – Arithmetic Functions Logic and Computer.
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
Arithmetic Functions and Circuits
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Arithmetic Functions BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Micro Operation. MICROOPERATIONS Computer system microoperations are of four types: - Register transfer microoperations - Arithmetic microoperations -
Arithmetic Logic Unit (ALU) Anna Kurek CS 147 Spring 2008.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
1 CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits 4-1,2: Iterative Combinational Circuits and Binary Adders.
1 Arithmetic I Instructor: Mozafar Bag-Mohammadi Ilam University.
COMP541 Arithmetic Circuits
Combinational Circuits
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
COMP541 Arithmetic Circuits
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Arithmetic: Part II.
Arithmetic Operations
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
Other Arithmetic Functions Section 4-5
Addition, Subtraction, Logic Operations and ALU Design
1 Fundamentals of Computer Science Combinational Circuits.
Chapter 4 Register Transfer and Microoperations Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
Two’s and one’s complement arithmetic CLOCK ARITHMETIC.
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.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
Chapter 8 Computer Arithmetic. 8.1 Unsigned Notation Non-negative notation  It treats every number as either zero or a positive value  Range: 0 to 2.
CS151 Introduction to Digital Design Chapter 4: Arithmetic Functions and HDLs 4-1: Iterative Combinational Circuits 4-2: Binary Adders 1Created by: Ms.Amany.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
Computer System Design Lecture 3
Addition and Subtraction
Combinational Circuits
Chapter 4 Register Transfer and Microoperations
Digital Arithmetic Wen-Hung Liao, Ph.D..
CSCI206 - Computer Organization & Programming
ECE/CS 552: Arithmetic and Logic
CSCI206 - Computer Organization & Programming
King Fahd University of Petroleum and Minerals
ECE/CS 552: Integer Multipliers
Arithmetic Circuits (Part I) Randy H
EE207: Digital Systems I, Semester I 2003/2004
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
Overview Iterative combinational circuits Binary adders
ECE 352 Digital System Fundamentals
Combinational Circuits
Presentation transcript:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Arithmetic Circuits II Anselmo Lastra

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 2 Overflow Two cases of overflow for addition of signed numbers ♦ Two large positive numbers overflow into sign bit Not enough room for result ♦ Two large negative numbers added Same – not enough bits Carry out can be OK

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 3 Examples 4-bit signed numbers – 7 ♦ Generates carry but result OK ♦ Generates no C out, but overflowed

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 4 Overflow Detection Condition is that either C n-1 or C n is high, but not both

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 5 Multiplier Multiply by doing single-bit multiplies and shifts Look at combinational circuit to do this

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 6 Combinational Multiplier AND computes A 0 B 0 Half adder computes sum. Will need FA for larger multiplier.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 7 Larger Multiplier

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 8 Sequential Multiply Imagine doing over time rather than in parallel ♦ Bitwise multiply ♦ Shift ♦ Add If we have time later in semester we’ll look at fancier multipliers

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 9 Contraction Can implement other functions ♦ Like increment, decrement By using basic arithmetic circuits ♦ Adder And removing unused portions This is called contraction

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 10 Example: Incrementing Very common ♦ Next address computation Specialize an adder

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 11 Eliminate Unneeded Gates

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 12 Multiplication by Constant What if constant is a power of two? What is the circuit?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 13 Multiplication by Pwr of 2 Just wires Division by pwr of 2 similar

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 14 Arbitrary Constant

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 15 Contraction Not Always Best Sometimes it pays to rethink the function Example of decrementer in book

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 16 Sign Extension Changing size of number common in instruction sets ♦ 16-bit immediate to register, for example Can’t just add zeros (zero fill) ♦ Would turn 4-bit -5 (1011) to 8-bit +11 ( ) Sign extend (fill with left digit) ♦ 1011 to

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 17 We’ve Covered Adders ♦ Ripple carry ♦ Carry lookahead Subtracting unsigned numbers ♦ New design for adder-subtractor Signed numbers ♦ Signed addition/subtraction Multiplication – just basic Modified Circuits