# Largest and smallest numbers

Using a number line
When we discuss bigger and smaller numbers which can be negative or positive, it is useful to refer to a number line to help us avoid confusion about exactly what we are talking about. • As positive numbers get bigger, the number gets bigger. The smallest positive number is the one that is closest to zero but still positive.
• As negative numbers get bigger, the number actually gets smaller (further away from zero). The smallest negative number is the number that is closest to zero but still negative.

The largest and smallest values
Imagine you have a byte used to hold a floating-point number. In our byte, we will allow 5 bits for the mantissa and 3 bits for the exponent. Remember, both the mantissa and the exponent are always held as 2’s complement numbers.

The largest positive number

• The largest number that can be held in our byte is when both the mantissa and the exponent are the largest positive numbers that can be held.
• The largest mantissa that can be held is 01111. (Note that you must assume the mantissa is normalised, and so positive numbers always begin with 01).
• The largest exponent that can be held is 011. (Remember, this is a 2s complement number so the left most bit is negative, and in this case represents -4).The largest number that can be held is 0.1111 x 2011
• This is the same as 111.1, or 7.5 in decimal.

The smallest positive number