To fixed-point binary

Write your answer as a byte. Assume binary point is between bits 4 and 5.

Do not include a binary point in your answer.

Convert denary to fixed-point binary: 0

Fixed-point binary has the binary point at a fixed position. In this case, it's between bits 4 and 5:

  • Bits 7-4 represent whole numbers: 8, 4, 2, 1
  • Bits 3-0 represent fractions: 0.5, 0.25, 0.125, 0.0625

Example: Convert 6.75 to fixed-point binary

Place values: 8  4  2  1 . 0.5  0.25  0.125  0.0625
              0  1  1  0 . 1    1     0      0
6.75 = 4 + 2 + 0.5 + 0.25 = 01101100

Fixed-point binary represents decimal numbers by placing the binary point at a fixed position within the byte.

Understanding Fixed-Point

In this system, the binary point is between bits 4 and 5, giving us:

Bit position: 7    6    5    4  |  3     2      1       0
Place value:  8    4    2    1  |  0.5   0.25   0.125   0.0625
              Whole number part  |  Fractional part
Method

To convert a denary decimal to fixed-point binary:

  1. Separate the number into whole and fractional parts
  2. Convert the whole part to binary (bits 7-4)
  3. Convert the fractional part by checking which fractional place values sum to it (bits 3-0)
  4. Combine both parts into an 8-bit number
Example: Convert 10.625 to fixed-point binary
  • Whole part: 10 = 8 + 2 = 1010
  • Fractional part: 0.625 = 0.5 + 0.125 = 1010
  • Combined: 10101010
Limitations

Fixed-point can only represent certain decimal values exactly. For example:

  • 0.5, 0.25, 0.125, 0.0625 can be represented exactly
  • 0.1, 0.3, 0.7 cannot be represented exactly (would need more fractional bits)

References:

  • Wikibooks Computer Science A level (fixed-point): AQA