Part II : Lecture III 240-334 By Wannarat.

Slides:



Advertisements
Similar presentations
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,
Advertisements

CMPE 325 Computer Architecture II
Cosc 2150: Computer Organization Chapter 9, Part 2 Integer multiplication and division.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 8 - Multiplication.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
Chapter 3 Arithmetic for Computers. Multiplication More complicated than addition accomplished via shifting and addition More time and more area Let's.
CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
361 div.1 Computer Architecture ECE 361 Lecture 7: ALU Design : Division.
Arithmetic IV CPSC 321 Andreas Klappenecker. Any Questions?
Computer Organization Multiplication and Division Feb 2005 Reading: Portions of these slides are derived from: Textbook figures © 1998 Morgan Kaufmann.
CSCE 212 Quiz 5 – 2/23/11 Write out the steps MIPS uses to do multiplication and say why each is necessary. – An example you might use for your explanation.
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
1 Lecture 8: Binary Multiplication & Division Today’s topics:  Addition/Subtraction  Multiplication  Division Reminder: get started early on assignment.
1 Lecture 4: Arithmetic for Computers (Part 5) CS 447 Jason Bakos.
1 Lecture 4: Arithmetic for Computers (Part 4) CS 447 Jason Bakos.
ECE 232 L9.Mult.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 9 Computer Arithmetic.
CS/COE0447 Computer Organization & Assembly Language
ECE232: Hardware Organization and Design
Lec 13Systems Architecture1 Systems Architecture Lecture 13: Integer Multiplication and Division Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan.
Multiplication of signed-operands
Lecture 6: Multiply, Shift, and Divide
Fixed and Floating Point Numbers Lesson 3 Ioan Despi.
Conversion to Larger Number of Bits Ex: Immediate Field (signed 16 bit) to 32 bit Positive numbers have implied 0’s to the left. So, put 16 bit number.
Cs 152 l6 Multiply 1 DAP Fa 97 © U.C.B. ECE Computer Architecture Lecture Notes Multiply, Shift, Divide Shantanu Dutt Univ. of Illinois at.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
05/03/2009CA&O Lecture 8,9,10 By Engr. Umbreen sabir1 Computer Arithmetic Computer Engineering Department.
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
Csci 136 Computer Architecture II – Multiplication and Division
Mohamed Younis CMCS 411, Computer Architecture 1 CMSC Computer Architecture Lecture 11 Performing Division March 5,
Chapter 3 Arithmetic for Computers. Chapter 3 — Arithmetic for Computers — 2 Arithmetic for Computers Operations on integers Addition and subtraction.
CDA 3101 Spring 2016 Introduction to Computer Organization
Integer Operations Computer Organization and Assembly Language: Module 5.
By Wannarat Computer System Design Lecture 3 Wannarat Suntiamorntut.
COMPUTER ORGANIZATION ARITHMETIC YASSER MOHAMMAD.
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
Arithmetic for Computers Chapter 3 1. Arithmetic for Computers  Operations on integers  Addition and subtraction  Multiplication and division  Dealing.
Computer System Design Lecture 3
More Binary Arithmetic - Multiplication
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
Computer Architecture & Operations I
Multiplication and Division basics
Computer Architecture & Operations I
Integer Multiplication and Division
MIPS mul/div instructions
Morgan Kaufmann Publishers Arithmetic for Computers
CSCI206 - Computer Organization & Programming
CS/COE0447 Computer Organization & Assembly Language
COMPUTING FUNDAMENTALS
Morgan Kaufmann Publishers
Morgan Kaufmann Publishers
Lecture 8: Binary Multiplication & Division
Multiplication & Division
CDA 3101 Summer 2007 Introduction to Computer Organization
Lecture 8: Addition, Multiplication & Division
Data Representation and Arithmetic Algorithms
Lecture 8: Addition, Multiplication & Division
CSCE 350 Computer Architecture
Topic 3c Integer Multiply and Divide
Computer Arithmetic Multiplication, Floating Point
ECEG-3202 Computer Architecture and Organization
Data Representation and Arithmetic Algorithms
October 15 Chapter 4 – Multiplication/Division Go to the State Fair!
Digital System Design II 数字系统设计2
Computer Architecture EECS 361 Lecture 6: ALU Design
Morgan Kaufmann Publishers Arithmetic for Computers
Chapter 4 計算機算數.
October 5 Register to vote! Go to the State Fair! (15-24 October)
Multiplying and Dividing Decimals by 10, 100, 1000
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
Presentation transcript:

Part II : Lecture III 240-334 By Wannarat

Multiplication 0010 (multiplicand) x 1011 (multiplier) ???? 240-334 By Wannarat

Unsign Combinational Multiplier 240-334 By Wannarat

Multiplication : First Version (Unsign) 240-334 By Wannarat

Multiplication : First Version (contd.) 240-334 By Wannarat

Analyze First Version 1 clock per cycle 50 % of bit in multiplicand always = 0 => 64-bit adder is wasted 0’s inserted in left of multiplicand as shifted => lead significant bits of product never changed once formed 240-334 By Wannarat

Multiplication : Second Version 240-334 By Wannarat

Multiplication : Second Version (Contd.) 240-334 By Wannarat

Analyze Second Version Product register wasted space that exactly matches size of multiplier Combine Multiplier register and Product register 240-334 By Wannarat

Multiplication : Third Version 240-334 By Wannarat

Multiplication : Third Version (Contd.) 240-334 By Wannarat

Analyze Third Version 2 steps per bit because multiplier & product combined MIPS registers Hi, Lo are left and right half of product 240-334 By Wannarat

Booth’s Algorithm 240-334 By Wannarat

Example : 2 x 7 240-334 By Wannarat

Example : 2 x -3 240-334 By Wannarat

Shifter : 2 kinds 240-334 By Wannarat

Part III : Lecture III 240-334 By Wannarat

Divide 240-334 By Wannarat

Divide : First Version 240-334 By Wannarat

Divide : First Version (Contd.) 240-334 By Wannarat

Analyze First Version 50% bits in divisor always 0 =>1/2 of 64-bit adder is wasted => 1/2 divisor is wasted 1 step cannot produce a 1 in quotient bit => Switch order to shift first 240-334 By Wannarat

Divide : Second Version 240-334 By Wannarat

Divide : Second Version (Contd.) 240-334 By Wannarat

Analyze Second Version Eliminate Quotient register by combining with Remainder as shifted left 240-334 By Wannarat

Divide : Third Version 240-334 By Wannarat

Divide : Third Version (Contd.) 240-334 By Wannarat

Analyze Third Version Do Analyze by yourself 240-334 By Wannarat

Floating Point : IEEE754 240-334 By Wannarat

Floating-point Representation -0.75 = -3/4 = -3/22 = -11/ 22 = -0.11 = -1.1x 2-1 = (-1)s x (1 + signifiand) x 2 (exponent-127) = (-1) x (1+.1000 0000) x 2(126-127) 1 01111110 1000 0000 0000 0000 0000 000 S E M 1-bit 8-bit 23-bit 240-334 By Wannarat

Floating-point Addition 9.999 x 101 + 1.610x10-1 Step1 : Change exponent as : 1.610 x 10 -1 = 0.016 x 101 Step2 : Add significands 9.999 (10) + 0.016 (10) 10.015 (10) Sum = 10.015 x 101 240-334 By Wannarat

Floating-point Addition 9.999 x 101 + 1.610x10-1 Step3 : correct it (normalization) : 10.015 x 10 1 = 1.0015 x 102 Step4 : Four digits for significand 1.002 x 102 240-334 By Wannarat

Example Floating-point Addition 0.5 + (-0.4375) 0.5 = 1/2 = 1/21 = 0.1 x 20 = 1.00 x 2-1 -0.4375 = -7/16 = -7/24 = - 0.0111 = -1.110 x 2-2 step 1 : -0.111 x 2-1 step 2 : 1.0x 2-1 + (-0.111 x 2-1)=0.001 x 2-1 step 3 : 1.0 x 2 -4 step 4 : 0.0625 240-334 By Wannarat

Multiplication Floating-point Study in Text Book by yourself. 240-334 By Wannarat

Next on Lecture 4 240-334 By Wannarat