Floating Point & Character Representation (SQA National 5 Computing Science): Revision Note
Exam code: X816 75
Floating point
What is floating point?
Computers use floating point to store real numbers, numbers that have a fractional part
Floating point representation is similar to scientific notation, but it uses base 2 (binary) instead of base 10 (denary)
A floating point number is made up of two parts:
The mantissa
The exponent
Mantissa
The part of the number that holds the sequence of significant digits that make up the number
Controls the precision of the number
Does not change the scale of the number
Exponent
The part that shows how far the binary point moves
Controls the size or scale of the number
A larger exponent moves the point to the right (making a larger number)
A smaller exponent moves the point to the left (making a smaller number)
Example
In scientific notation
0.8916 × 10³
Mantissa = 8916
Exponent = 3
The same idea applies in binary, but it uses powers of 2 instead of powers of 10
Examiner Tips and Tricks
Floating point representation allows fractions to be stored in binary form
You do not need to calculate binary floating point values in the National 5 exam
Worked Example
A weather station recorded the maximum wind speed as 47.3 meters per second. This value would be stored in a computer system using floating-point representation as shown below:
0.473×102
Identify the mantissa and the exponent in the above floating-point representation.
Component | Value |
|---|---|
Mantissa | |
Exponent |
[2]
Answer
Component | Value |
|---|---|
Mantissa | 473 [1 mark] |
Exponent | 2 [1 mark] |
Extended ASCII
What is extended ASCII?
Extended ASCII is a character set used to represent text on a computer system
It uses 8 bits for each character, giving 256 unique codes (2⁸ = 256)
Each character, letters, numbers or symbols, is given a unique binary code
This means that text can be stored and processed consistently on different computer systems
How extended ASCII is used
Extended ASCII is used to represent:
Upper and lower case letters
Numbers 0–9
Punctuation marks and special characters (for example !, @, #, £)
Additional symbols such as mathematical signs or accented letters
Calculating storage using extended ASCII
Each character requires 8 bits (1 byte) of storage
Formula:
Bits required = number of characters × 8
Examples:
“SERVER” has 6 characters → 6 × 8 = 48 bits
“GRK_0183_J” has 10 characters → 10 × 8 = 80 bits
“Par Tee” has 7 characters (including the space) → 7 × 8 = 56 bits
Sometimes you may be asked the reverse calculation:
Formula:
Characters stored = total bits ÷ 8
For example, 80 bits ÷ 8 = 10 characters
Worked Example
A small online book retailer uses extended ASCII code to store information.
The retailer wants to send a promotional code via email. This code, including all letters and the mandatory dash symbol, uses a total of 96 bits of storage.
Calculate the maximum number of characters that the promotional code can contain.
[1]
Answer
96 bits÷8 bits per character = 12 characters [1 mark]
Unlock more, it's free!
Did this page help you?