120 likes | 345 Views
Floating Point Notation. Introduction. Objectives. At the end of this session students will : Represent real numbers using floating point representation Explain how floating point numbers are stored. Anticipatory set. Floating Point Notation .
E N D
Floating Point Notation Introduction
Objectives • At the end of this session students will : • Represent real numbers using floating point representation • Explain how floating point numbers are stored.
Floating Point Notation • There are four components to standard form representation: • The signof the number • The fractional part (mantissa) • The base • The exponent • + 5.64367 x 104 Exponent Sign Base Mantissa
Floating Point Notation • Binary fractions can be stored in a similar fashion, using the SEM format • The Sign of the number • The Exponent • The fractional part (Mantissa) Where with the use of 8bits takes the following format: Sign Exponent Mantissa • 1bit 3bits 4bits
Decimal to Floating Point Notation Example: Store 11.112 using the SEM Format Step 1 : Normalise the mantissa. 1.111 x 21 Step 2: The exponent (sign and the integer) is expressed in binary using 3 bits 2 =010 Step 3: The sign of the number. 0 because it’s positive Sign Exponent Mantissa SEM • 0001 1.111
Guided Practise Chapter 5 Exercise 4 Question 1
Floating Point Notation to Decimal Example: What is the decimal equivalent to 10111011? Step 1 : first bit is negative - Step 2: The next 3 bits represent the exponent 101 = -1 Step 3: last four is the mantissa so: 1.011 x 2-1 = 0.1011 = 0.6875 Sign Exponent Mantissa SEM • 1 101 1.011
Guided Practise Chapter 5 Exercise 4 Question 2