Computer Science AS OCR
-
1-1-structure-and-function-of-the-processor as5 主题
-
1-2-types-of-processor as3 主题
-
1-3-input-output-and-storage as2 主题
-
2-1-systems-software as8 主题
-
2-3-software-development as5 主题
-
2-4-types-of-programming-language as4 主题
-
3-1-compression-encryption-and-hashing as3 主题
-
3-2-databases as3 主题
-
3-3-networks as8 主题
-
3-4-web-technologies as13 主题
-
html as
-
css as
-
css-styling as
-
javascript as
-
variables-and-constants-in-javascript as
-
outputs-in-javascript as
-
selection-in-javascript- as
-
for-loops-in-javascript- as
-
while-loops-in-javascript- as
-
strings-in-javascript- as
-
operators-in-javascript- as
-
nested-statements-in-javascript as
-
functions-and-procedures-in-javascript as
-
html as
-
4-1-data-types as8 主题
-
4-2-data-structures as4 主题
-
4-3-boolean-algebra as1 主题
-
5-1-computing-related-legislation as4 主题
-
5-2-moral-and-ethical-issues as9 主题
-
6-1-thinking-abstractly as3 主题
-
6-2-thinking-ahead as1 主题
-
6-3-thinking-procedurally as3 主题
-
6-4-thinking-logically as2 主题
-
6-5-thinking-concurrently as2 主题
-
7-1-programming-techniques as9 主题
-
8-1-standard-algorithms-and-big-o-notation as8 主题
floating-point-binary-numbers- as
Exam code:H046
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
Mantissa and exponent
-
In A Level Computer Science, the mantissa and exponent are the two main components of a floating point number:
-
Mantissa
-
The part of the number that holds the actual digits of the value
-
It represents the precision of the number but does not determine its scale
-
-
Exponent
-
Controls how far the binary point moves, effectively scaling the number up or down
-
A larger exponent moves the point to the right (making a larger number), while a smaller exponent moves it to the left (making a smaller number)
-
-
-
For example, in standard scientific notation, the decimal number
3.14 × 10³has:-
Mantissa:
3.14(the significant digits) -
Exponent:
3(which shifts the decimal point three places to the right)
-
-
Floating point binary works similarly but in base-2
-
Instead of multiplying by powers of 10, it multiplies by powers of 2 using a binary exponent
Representation of floating point
-
The appearance of floating-point binary is mostly the same except for the presence the decimal point

-
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
-
-
Decode a normalised floating point binary number
-
In A Level Computer Science, you may be given a floating point number made up of two parts:
-
A 4-bit mantissa (in two’s complement)
-
A 4-bit exponent (also in two’s complement)
-
-
For example:
-
1101 1111 -
Mantissa =
1101 -
Exponent =
1111
-
Step 1: Convert the exponent to denary
-
The exponent is stored in 4-bit two’s complement, so:
-
If the first bit is 0 → it’s a positive number
-
If the first bit is 1 → it’s negative
-
-
Example:
Exponent: 1111 → two’s complement = -1
Step 2: Convert the mantissa to binary
-
The mantissa is also in 4-bit two’s complement
-
Convert it to a denary number.
-
Then convert it to a binary value, assuming the binary point goes just after the first bit (because it’s normalised)
-
Example:
Mantissa: 1101 → two’s complement = -3
Binary of 3 = 011
So -3 in normalised binary = -0.110 (we assume a leading 1 is implied)
Step 3: Shift the binary point
-
Now shift the binary point by the exponent value.
-
If exponent is positive, move the point to the right
-
If exponent is negative, move it to the left
-
-
Example:
Start with: -0.110
Exponent = -1
Shift the point 1 place left → -0.0110
Step 4: Convert to denary
-
Now convert the final binary number into denary
-0.0110 =
0 × ½ = 0
1 × ¼ = 0.25
1 × ⅛ = 0.125
0 × 1/16 = 0
Final value = -0.25 - 0.125 = -0.375
-
Answer: –0.375
Responses