Sign, mantissa and exponent


The sign bit

When we want to store negative numbers in binary we can use a sign bit to identify if a number is positive or negative. The sign bit is the first bit in a binary number:

Example 1: The number 5 in signed binary

0 1 0 1 0

Example 2: The number -5 in signed binary

1 1 0 1 0

A 1 on the signed bit indicates a negative number, while a 0 indicates a positive number.

Mantisa and Exponent

0 . 1 0 1 1 0 1 0 0 0 1 1

In this example the green is the sign bit, the cyan is the mantissa and the pink is the exponent:

  • Sign bit: Determines if the number is positive or negative.
  • Mantissa: The number itself.
  • Exponent: The power of 2.