CH.3 Floating Point Hardware and Algorithms 3/10/2016 1.

Slides:



Advertisements
Similar presentations
Spring 2013 Advising Starts this week! CS2710 Computer Organization1.
Advertisements

Fixed Point Numbers The binary integer arithmetic you are used to is known by the more general term of Fixed Point arithmetic. Fixed Point means that we.
Arithmetic in Computers Chapter 4 Arithmetic in Computers2 Outline Data representation integers Unsigned integers Signed integers Floating-points.
Lecture 16: Computer Arithmetic Today’s topic –Floating point numbers –IEEE 754 representations –FP arithmetic Reminder –HW 4 due Monday 1.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
Computer ArchitectureFall 2007 © September 5, 2007 Karem Sakallah CS 447 – Computer Architecture.
1  2004 Morgan Kaufmann Publishers Chapter Three.
CSE 378 Floating-point1 How to represent real numbers In decimal scientific notation –sign –fraction –base (i.e., 10) to some power Most of the time, usual.
Arithmetic III CPSC 321 Andreas Klappenecker. Any Questions?
Floating Point Numbers
CPSC 321 Computer Architecture ALU Design – Integer Addition, Multiplication & Division Copyright 2002 David H. Albonesi and the University of Rochester.
ECEN 248 Integer Multiplication, Number Format Adopted from Copyright 2002 David H. Albonesi and the University of Rochester.
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
Computer Arithmetic Nizamettin AYDIN
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
ECE232: Hardware Organization and Design
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
S. Rawat I.I.T. Kanpur. Floating-point representation IEEE numbers are stored using a kind of scientific notation. ± mantissa * 2 exponent We can represent.
07/19/2005 Arithmetic / Logic Unit – ALU Design Presentation F CSE : Introduction to Computer Architecture Slides by Gojko Babić.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
9.4 FLOATING-POINT REPRESENTATION
Computer Arithmetic II Instructor: Mozafar Bag-Mohammadi Spring 2006 University of Ilam.
Floating Point Representations CDA 3101 Discussion Session 02.
Computer Arithmetic II Instructor: Mozafar Bag-Mohammadi Ilam University.
CSC 221 Computer Organization and Assembly Language
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
Integer & Floating Point Representations CDA 3101 Discussion Session 05.
COMP201 Computer Systems Floating Point Numbers. Floating Point Numbers  Representations considered so far have a limited range dependent on the number.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Floating Point Arithmetic
Floating-Point Representation We can store integers and characters easily in binary, but what about fractions? ¼ =.25 = 2.5 * *
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
CSPP58001 Floating Point Numbers. CSPP58001 Floating vs. fixed point Floating point refers to a binary decimal representation where there is not a fixed.
1 Ó1998 Morgan Kaufmann Publishers Chapter 4 計算機算數.
Floating Point Numbers Representation, Operations, and Accuracy CS223 Digital Design.
순천향대학교 정보기술공학부 이 상 정 1 3. Arithmetic for Computers.
Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU.
CH.3 Floating Point Hardware and Algorithms 2/18/
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
Floating Point Arithmetic – Part I
Chapter 9 Computer Arithmetic
William Stallings Computer Organization and Architecture 8th Edition
Floating Point Representations
Lecture 9: Floating Point
CS 232: Computer Architecture II
Expressible Numbers.
PRESENTED BY J.SARAVANAN. Introduction: Objective: To provide hardware support for floating point arithmetic. To understand how to represent floating.
William Stallings Computer Organization and Architecture 7th Edition
Outline Introduction Floating Point Arithmetic Adder Multiplier.
CSCE 350 Computer Architecture
Arithmetic Logical Unit
How to represent real numbers
How to represent real numbers
Computer Arithmetic Multiplication, Floating Point
ECEG-3202 Computer Architecture and Organization
Floating Point Hardware and Algorithms
Chapter 4 計算機算數.
Recent from Dr. Dan Lo regarding 12/11/17 Dept Exam
Presentation transcript:

CH.3 Floating Point Hardware and Algorithms 3/10/2016 1

Review 4-bit multiplier using 4-bit adder 32-bit multiplier using 32 bit adder + 32 multiplicand, 32-bit multiplier, 64-bit product, and a control unit  this is a sequential multiplier Improve performance. How?  What is performance? Define performance. Speed, flops, power consumption, etc.  Improve performance through hardware optimization;  Example multiplier  Improve performance through better algorithms  Example: multiplier  Improve performance through better data representation. 3/10/2016 2

Floating point numbers 3/10/ Why do we need them? To represent very large number and very small number. To represent a larger range of number with a given size in bits. Lets consider a 4 bit container Lets consider a 8 bit container Now lets look at some data sizes, An astronautical unit (Au)is the distance between the earth and the sun in meters. 150,000,000,000 meters Size of Helium atom: 1 angstrom: meters See more details on units of measurement hereunits of measurement here

FP Representation 3/10/ SExponentFraction Value = (-1) S X F X 2 E 32 bit single precision 64 bit double precision On to IEEE 754 format

Nothing is simple (IEEE 754 not yet) Consider the representation of real number. Eg.: or Lets see how we can go from this human readable form to IEEE 754  Goals: you want to represent as large a range as possible  You want to include features that will optimize processing Exponent, fraction, sign of exponent, sign of fraction or  X X /10/

Binary Representation Now lets look at binary representation Eg X X 2 -4 How will you add these numbers? How will you multiply these? When you answer these questions, you find that it will help to have the numbers in (i) fractional form, (ii) normalized, and (iii) exponents mapped to a positive range by adding a bias. Also it is possible to represent a larger range by implying the leading 1 in the normalized fraction and a single zero. 3/10/2016 6

IEE754 Format A floating point number will be represented by a normalized fraction with implied leading 1, biased exponent mapped onto a positive range (no sign needed) and only sign bit is for the entire number. In other words: Fp = (S, normalized fraction, biased E) is equivalent (-1) S X (1 + fraction) X 2 (E-bias) Lets look at some examples. 3/10/2016 7

Floating Point Operation: Addition Now lets look at floating point arithmetic unit. We will examine only addition. 3/10/2016 8

FP Addition and Multiplication 3/10/ Components: operands, ALU, control, comparison, shifters, normalize, round Control ALUs