Floating Point Binary Numbers (OCR A Level Computer Science)
Revision Note
Author
Robert HamptonExpertise
Computer Science Content Creator
Floating Point Binary
What is Floating Point Binary?
Floating point binary addresses the limitations of fixed-point binary in representing a wide array of real numbers
It allows for both fractional and whole-number components
It accommodates extremely large and small numbers by adjusting the floating point
It optimises storage and computational resources for most applications
Representation of floating point
The appearance of floating-point binary is mostly the same except for the presence the decimal point
An example positive floating point number
In the example above, an 8-bit number can represent a whole number and fractional elements
The point is always placed between the whole and fractional values
The consequence of floating point binary is a significantly reduced maximum value
The benefit of floating point binary is increased precision
Representation of negative floating point
Negative numbers can also be represented in floating point form using two's Complement
The MSB is used to represent the negative offset of the number, and the bits that follow it are used to count upwards
The fractional values are then added to the whole number
Converting Denary to Floating Point
Denary to floating point binary
Example: Convert 6.75 to floating point binary
Step 1: Represent the number in fixed point binary.
-8 | 4 | 2 | 1 | . | 0.5 | 0.25 |
---|---|---|---|---|---|---|
0 | 1 | 1 | 0 | . | 1 | 1 |
Step 2: Move the decimal point.
0 | . | 1 | 1 | 0 | 1 | 1 |
Step 3: Calculate the exponent
The decimal point has moved three places to the left and therefore has an exponent value of three.
-4 | 2 | 1 |
---|---|---|
0 | 1 | 1 |
Step 4: Calculate the final answer:
Mantissa: 011011
Exponent: 011
Converting Floating Point to Denary
Binary floating point to denary
Example: Convert this floating point number to denary:
Mantissa - 01100
Exponent - 011
Step 1: Write out the binary number.
0 | . | 1 | 1 | 0 | 0 |
Step 2: Work out the exponent value.
The exponent value is 3.
-4 | 2 | 1 |
---|---|---|
0 | 1 | 1 |
Step 3: Move the decimal point three places to the right.
-8 | 4 | 2 | 1 | . | 0.5 |
---|---|---|---|---|---|
0 | 1 | 1 | 0 | . | 0 |
Step 4: Calculate the final answer: 6
Normalising Floating Point Binary
A floating point number is said to be normalised when it starts with 01 or 10.
Why normalise?
Ensures a consistent format for floating point representation
Makes arithmetic and comparisons more straightforward
Steps to Normalise a Floating Point Number
Shift the decimal point left or right until it starts with a 01 or 10
Adjust the exponent value accordingly as you move the decimal point
Moving the point to the left increases the exponent and vice versa.
Example
Before normalisation:
Mantissa = 0.0011
Exponent = 0010 (2)
After normalisation:
Mantissa = 0.1100 – Decimal point has moved 2 places to right so it starts with 01
Exponent = 0000 (0) - Exponent has been reduced by 2
You've read 0 of your 0 free revision notes
Get unlimited access
to absolutely everything:
- Downloadable PDFs
- Unlimited Revision Notes
- Topic Questions
- Past Papers
- Model Answers
- Videos (Maths and Science)
Did this page help you?