Floating Point Converter
Convert between decimal and normalised floating point binary using two's complement for both mantissa and exponent. Matches the AQA A Level CS (7517) specification §4.5.4.8.
📖 Learn Step-by-StepClick bits to toggle between 0 and 1.
Mantissa
Exponent
0
Mantissa = 0
Exponent = 0
Normalised: Yes
Working:
- Sign bit = 0 → positive number
- Mantissa: 0 = 0
- Exponent (two's complement): 0000 = 0
- Result: 0 × 2^0 = 0
Floating Point Practice Questions
FP to Decimal (8-bit mantissa, 4-bit exponent)
Mantissa
| ± | 2⁻¹ | 2⁻² | 2⁻³ | 2⁻⁴ | 2⁻⁵ | 2⁻⁶ | 2⁻⁷ |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 |
Exponent
| −8 | 4 | 2 | 1 |
|---|---|---|---|
| 0 | 0 | 1 | 1 |
Your Answer (decimal value):
FP to Decimal (negative mantissa)
Mantissa
| ± | 2⁻¹ | 2⁻² | 2⁻³ | 2⁻⁴ | 2⁻⁵ |
|---|---|---|---|---|---|
| 1 | 0 | 1 | 1 | 0 | 0 |
Exponent
| −8 | 4 | 2 | 1 |
|---|---|---|---|
| 0 | 0 | 1 | 0 |
Your Answer (decimal value):
Decimal to FP (positive value)
Given decimal value: 2.75
Mantissa
| ± | 2⁻¹ | 2⁻² | 2⁻³ | 2⁻⁴ | 2⁻⁵ | 2⁻⁶ | 2⁻⁷ |
|---|---|---|---|---|---|---|---|
Exponent
| −8 | 4 | 2 | 1 |
|---|---|---|---|
Click bits to toggle between 0 and 1.
FP to Decimal (simple positive)
Mantissa
| ± | 2⁻¹ | 2⁻² | 2⁻³ | 2⁻⁴ | 2⁻⁵ | 2⁻⁶ | 2⁻⁷ |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
Exponent
| −8 | 4 | 2 | 1 |
|---|---|---|---|
| 0 | 1 | 0 | 0 |
Your Answer (decimal value):
Decimal to FP (negative value)
Given decimal value: -3.5
Mantissa
| ± | 2⁻¹ | 2⁻² | 2⁻³ | 2⁻⁴ | 2⁻⁵ | 2⁻⁶ | 2⁻⁷ |
|---|---|---|---|---|---|---|---|
Exponent
| −8 | 4 | 2 | 1 |
|---|---|---|---|
Click bits to toggle between 0 and 1.
Quick reference — how AQA floating point works
AQA represents floating point numbers as mantissa × 2exponent. Both mantissa and exponent use two's complement.
Mantissa (two's complement fixed-point):
- MSB is the sign bit (0 = positive, 1 = negative)
- Remaining bits represent the fractional part: 2⁻¹, 2⁻², 2⁻³ …
- Positive value: simply sum the place values
- Negative value: −1 + sum of fractional place values
Normalisation rules:
- Positive normalised: mantissa starts 0.1…
- Negative normalised: mantissa starts 1.0…
- Normalisation maximises precision by avoiding leading zeros/ones
Exponent (two's complement integer):
- Standard two's complement — MSB has negative weight
- For 8 bits: range −128 to +127