Normalised Floating Point Numbers

Slides:



Advertisements
Similar presentations
COMP2130 Winter 2015 Storing signed numbers in memory.
Advertisements

1 IEEE Floating Point Revision Guide for Phase Test Week 5.
Lecture 3 Number Representation 2 This week – Recap Addition – Addition circuitry – Subtraction of integers in binary – Representing numbers with fractional.
1 Lecture 3 Bit Operations Floating Point – 32 bits or 64 bits 1.
Floating Point Numbers
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
Convert Decimal to Floating point number [IEEE 754]
Objectives: (1) To write a number in scientific notation. (2) To perform calculations with numbers written in scientific notation.
Floating Point Representations CDA 3101 Discussion Session 02.
The Teacher CP4 Binary and all that… CP4 Revision.
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
The Teacher CP4 Binary and all that… CP4 Revision.
Fractions in Binary.
CSPP58001 Floating Point Numbers. CSPP58001 Floating vs. fixed point Floating point refers to a binary decimal representation where there is not a fixed.
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
Floating Point in Binary 1.Place Value Chart:
Floating Point Binary A2 Computing OCR Module 2509.
Floating Point Numbers
CS 160 Lecture 4 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013.
Representation of Data (Part II) Computer Studies Notes: chapter 19 Ma King Man.
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
Learning Objectives 3.3.1f - Describe the nature and uses of floating point form 3.3.1h - Convert a real number to floating point form Learn how to normalise.
FLOATING-POINT NUMBER REPRESENTATION
Floating Point Numbers
Lesson Objectives Aims You should know about: Binary numbers ‘n’ that.
Floating Point Numbers
Introduction to Numerical Analysis I
Nat 4/5 Computing Science Lesson 1: Binary
Floating Point Representations
Department of Computer Science Georgia State University
Fundamentals of Computer Science
Data Representation Covering… Binary addition / subtraction
Objectives Today: P4 Data Types – Floating Points P4 Variable Quiz P3 Iteration and Selection Practical Are you logged on? Then come around the table Unit.
A brief comparison of integer and double representation
Introduction To Computer Science
Floating Point Representations
CSCI 198: Lecture 4: Data Representation
CSCI 161: Lecture 4: Data Representation
A Level Computing Component 2
PRESENTED BY J.SARAVANAN. Introduction: Objective: To provide hardware support for floating point arithmetic. To understand how to represent floating.
Addition and Substraction
CS1010 Programming Methodology
Number Representations
Floating Point Representation
CSCI206 - Computer Organization & Programming
Scientific Notation.
Applying Exponent Rules: Scientific Notation
Computer Science 210 Computer Organization
Scientific Notation.
Scientific Notation IPC.
Scientific Notation CP Chemistry.
Approximations and Round-Off Errors Chapter 3
Significant Figures and Scientific Notation
Topic 1: Data Representation
Starter Using the fingers on only one hand, what is the highest number you can count to? Rules: You must start at 1 You must count sequentially (i.e.
Scientific Notation Mrs. Nielsen Chemistry.
Representation of real numbers
Binary to Decimal Conversion
COMS 161 Introduction to Computing
CS 286 Computer Architecture & Organization
Data Binary Arithmetic.
SCIENTIFIC NOTATION ... a way to express very small or very large numbers that is often used in "scientific" calculations where the analysis must be very.
Scientific Notation Very large numbers and very small numbers are written in scientific notation.
Chapter3 Fixed Point Representation
Floating Point Binary Part 1
Numbers with fractions Could be done in pure binary
39 32 Exponent Sign 31 Mantissa 30 Operations are perfomred with an implied binary point between bits 31 and 30. When the implied most significant.
Number Representations
Presentation transcript:

Normalised Floating Point Numbers Normalised Floating Point Binary Numbers – accurate data representation using a specificed format

Question 1 Represent +1.5 in the following format: 4 bits for the mantissa 4 bits for the exponent In Normalised format

Required Format = Mantissa Exponent

In order for it to be Normalised 1 The POINT needs to go between the first two bits AND… Mantissa Exponent

In order for it to be Normalised 2 Both bits need to be different. E.g. 10 or 01 (not 11 or 00) Mantissa Exponent

0.110 1.1 Step 2 Step 1 CONVERT THE NUMBER INTO BINARY What would it look like if normalised? 0.110 1.1

0.110 1.1 Step 3 How many places has the decimal moved? (note to Get it from its NORMALISED FORM BACK TO ORIGINAL?) 0.110 1.1 ORIGINAL NORMALISED

0.110 1.1 Step 3 How many places has the decimal moved? (note to Get it from its NORMALISED FORM BACK TO ORIGINAL?) 0.110 1.1 ORIGINAL NORMALISED

Step 4 Create the exponent (how many places to the right or left!) 0.110 0001 MANTISSA EXPONENT

+1.5 = 0.110 0001 MANTISSA EXPONENT

Question 2 Represent -6 in the following format: 4 bits for the mantissa 4 bits for the exponent In Normalised format

Required Format = Mantissa Exponent

In order for it to be Normalised 1 The POINT needs to go between the first two bits AND… Mantissa Exponent

In order for it to be Normalised 2 Both bits need to be different. E.g. 10 or 01 (not 11 or 00) Mantissa Exponent

1010. 1.010 Step 2 Step 1 CONVERT THE NUMBER INTO BINARY What would it look like if normalised? 1010. 1.010

1.010 1010. Step 3 How many places has the decimal moved? (note to Get it from its NORMALISED FORM BACK TO ORIGINAL?) 1.010 1010. Always do your calculations to find the exponent on the NORMALISED number. Move the point where it would be in the original and that gives you your exponent! ORIGINAL NORMALISED

1.010 1010 Step 3 How many places has the decimal moved? (note to Get it from its NORMALISED FORM BACK TO ORIGINAL?) 1.010 1010 ORIGINAL NORMALISED ALWAYS DO YOUR CALCULATION OF THE EXPONENT FROM THE NORMALISED NUMBER. MOVE THE POINT TO THE ORIGINAL PLACE AND MAKE NOTE OF Number and left or right

Step 4 Create the exponent (how many places to the right or left!) +3 1010. 0011 MANTISSA EXPONENT

-6 = 1010 0011 MANTISSA EXPONENT

Example A Level Questions PAST PAPER A LEVEL QUESTION AND ANSWERS Taken with permission from OCR Exam Board

Example A Level Questions For when you have a 16 bit number where the mantissa is 10bits and the exponent is 6 bits:  the largest positive number will be: Mantissa: 0.111111111 Exponent: 011111 the smallest positive number will be: Mantissa: 0.000000001 Exponent: 100000 the largest negative number will be: Mantissa: 1.000000000 Exponent: 011111 the smallest negative number will be: Mantissa: 1.111111111 Exponent: 100000 ? ? ? ? ? ? ? ?

June 2010

Using 5=Mantissa 3 = Exponent Spot the careless mistake