Creating a One Byte Floating Point Number

Introduction

Normally, IEEE 754 single precision floating point representation is wonderful. It allows you to represent a wide range of floating point values.

However, to explain how floating point addition and multiplication work, it's nicer to use a much smaller representation for floating point numbers. The additional bits in IEEE 754 single precision would make the examples more difficult to read.

So, we're going to create a 1 byte floating point representation. We'll loosely model it after IEEE 754 single precision.

Here are the specs.

Just to see if you know what's going on, represent the value -4.5ten in this representation.

Convert -4.5ten to binary and you get -100.1two.
Then write it in scientific notation as: - 1.001two X 22ten.

We can write this in our one byte format as:

sign exponent fraction
1 1001 001

Example 2

What if we wanted to represent 4.25ten in this representation?

On Your Own

Just for the fun of it, try coming up with an IEEE 754 halfword format using 11 bits for the fraction, 5 bits for the exponent, and 1 sign bit. Represent a few numbers in this representation. Decide what the bias should be. Model it after IEEE 754 single precision.

Web Accessibility