Lec 13Systems Architecture1 Systems Architecture Lecture 13: Integer Multiplication and Division Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan.

Slides:



Advertisements
Similar presentations
Lec 12Systems Architecture1 Systems Architecture Lecture 12: Design of the MIPS ALU Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or all.
Advertisements

Chapter 3 Arithmetic for Computers. Exam 1 CSCE
Systems Architecture Lecture 5: MIPS Instruction Set
Datorteknik IntegerMulDiv bild 1 MIPS mul/div instructions Multiply: mult $2,$3Hi, Lo = $2 x $3;64-bit signed product Multiply unsigned: multu$2,$3Hi,
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 8 - Multiplication.
Lecture 15: Computer Arithmetic Today’s topic –Division 1.
CMPT 334 Computer Organization Chapter 3 Arithmetic for Computers [Adapted from Computer Organization and Design 5 th Edition, Patterson & Hennessy, ©
Lecture Objectives: 1)Perform binary division of two numbers. 2)Define dividend, divisor, quotient, and remainder. 3)Explain how division is accomplished.
Chapter 3 Arithmetic for Computers. Multiplication More complicated than addition accomplished via shifting and addition More time and more area Let's.
361 div.1 Computer Architecture ECE 361 Lecture 7: ALU Design : Division.
Lecture 9 Sept 28 Chapter 3 Arithmetic for Computers.
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 4: Arithmetic / Data Transfer Instructions Partially adapted from Computer Organization.
Integer Multiplication and Division ICS 233 Computer Architecture and Assembly Language Dr. Aiman El-Maleh College of Computer Sciences and Engineering.
Computer Organization Multiplication and Division Feb 2005 Reading: Portions of these slides are derived from: Textbook figures © 1998 Morgan Kaufmann.
Chap 3.3~3.5 Construction an Arithmetic Logic Unit (ALU) Jen-Chang Liu, Spring 2006.
Integer Multiplication and Division
1 Lecture 8: Binary Multiplication & Division Today’s topics:  Addition/Subtraction  Multiplication  Division Reminder: get started early on assignment.
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 6: Logic/Shift Instructions Partially adapted from Computer Organization and Design, 4.
Lecture Objectives: 1)Explain the relationship between addition and subtraction with twos complement numbering systems 2)Explain the concept of numeric.
Multiplication CPSC 252 Computer Organization Ellen Walker, Hiram College.
07/19/2005 Arithmetic / Logic Unit – ALU Design Presentation F CSE : Introduction to Computer Architecture Slides by Gojko Babić.
July 2005Computer Architecture, The Arithmetic/Logic UnitSlide 1 Part III The Arithmetic/Logic Unit.
Lecture 6: Multiply, Shift, and Divide
Chapter 3 Arithmetic for Computers (Integers). Florida A & M University - Department of Computer and Information Sciences Arithmetic for Computers Operations.
05/03/2009CA&O Lecture 8,9,10 By Engr. Umbreen sabir1 Computer Arithmetic Computer Engineering Department.
Integer Multiplication and Division
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
Integer Multiplication and Division ICS 233 Computer Architecture and Assembly Language Dr. Aiman El-Maleh College of Computer Sciences and Engineering.
Csci 136 Computer Architecture II – Multiplication and Division
COE 308: Computer Architecture (T032) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
EI 209 Chapter 3.1CSE, 2015 EI 209 Computer Organization Fall 2015 Chapter 3: Arithmetic for Computers Haojin Zhu ( )
Division Check for 0 divisor Long division approach – If divisor ≤ dividend bits 1 bit in quotient, subtract – Otherwise 0 bit in quotient, bring down.
CDA 3101 Spring 2016 Introduction to Computer Organization
Integer Multiplication, Division Arithmetic shift Twice the number of places MIPS multiply unit. mult, multu Significant bits Mfhi, mflo, div, divu Arithmetic.
Lec 11Systems Architecture1 Systems Architecture Lecture 11: Arithmetic for Computers Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or all.
Integer Multiplication and Division COE 301 Computer Organization Dr. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University.
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.
Integer Multiplication and Division ICS 233 Computer Architecture & Assembly Language Prof. Muhamed Mudawar College of Computer Sciences and Engineering.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Computer System Design Lecture 3
Computer Architecture & Operations I
Integer Multiplication, Division Arithmetic shift
Multiplication and Division basics
Computer Architecture & Operations I
Integer Multiplication and Division
MIPS mul/div instructions
Morgan Kaufmann Publishers Arithmetic for Computers
Morgan Kaufmann Publishers
Morgan Kaufmann Publishers
Morgan Kaufmann Publishers
Lecture 8: Binary Multiplication & Division
Multiplication & Division
CDA 3101 Summer 2007 Introduction to Computer Organization
CDA 3101 Spring 2016 Introduction to Computer Organization
CS352H: Computer Systems Architecture
Lecture 8: Addition, Multiplication & Division
Lecture 8: Addition, Multiplication & Division
Systems Architecture I
Systems Architecture I (CS ) Lecture 16: Exceptions
Systems Architecture Lecture 5: MIPS Instruction Set
Systems Architecture I
CDA 3101 Summer 2007 Introduction to Computer Organization
Systems Architecture I
Systems Architecture II
Computer Arithmetic Multiplication, Floating Point
Systems Architecture I (CS ) Lecture 17: Exceptions
Systems Architecture I
Morgan Kaufmann Publishers Arithmetic for Computers
Presentation transcript:

Lec 13Systems Architecture1 Systems Architecture Lecture 13: Integer Multiplication and Division Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or all figures from Computer Organization and Design: The Hardware/Software Approach, Third Edition, by David Patterson and John Hennessy, are copyrighted material (COPYRIGHT 2004 MORGAN KAUFMANN PUBLISHERS, INC. ALL RIGHTS RESERVED).

Lec 13Systems Architecture2 Introduction Objective: To provide hardware support for MIPS integer multiplication and divide instructions. To understand how to implement multiplication and division in hardware. Topics –Review MIPS ALU design –Review integer multiplication and division –MIPS integer multiply and divide instructions –Multiplication algorithms –Division algorithms –Multiply/Divide unit

Lec 13Systems Architecture3 Support for SLT and Overflow Detection

Lec 13Systems Architecture4 MIPS ALU

Lec 13Systems Architecture5 MIPS Integer Multiply and Divide Hi and Lo registers –mfhi –mflo Signed and unsigned multiply –mult –multu Divide instructions –div –divu –quotient is available in Lo and remainder in Hi

Lec 13Systems Architecture More complicated than addition –accomplished via shifting and addition More time and more microchip area We will look at 3 versions based on a simple algorithm we learned in elementary school: 0010 (multiplicand) __x_1011 (multiplier) Negative numbers: convert and multiply –there are better techniques, we won’t look at them Multiplication in Hardware

Lec 13Systems Architecture Multiplication Hardware – Algorithm 1 Datapath Control

Lec 13Systems Architecture8

Lec 13Systems Architecture9 Multiplication Hardware – Algorithm 2 Datapath Control

Lec 13Systems Architecture Multiplication Hardware – Algorithm 3 Note: Multiplier starts in right half of product. Datapath Control

Lec 13Systems Architecture11

Lec 13Systems Architecture Fast Multiplication Hardware Unroll the addition “loop” Use bit adders Each adder produces 32-bits and a carry-out The least significant bit of each intermediate sum is a bit of the product. The other 31 bits and the carry-out are passed along to the next adder.

12 October 2015Chapter 3 — Arithmetic for Computers 13 Faster Multiplier Uses multiple adders –Cost/performance tradeoff Can be pipelined Several multiplication performed in parallel

Lec 13Systems Architecture14 Division Hardware – Algorithm 1

Lec 13Systems Architecture15 Division Hardware – Algorithm 3

Lec 13Systems Architecture16