Fixed Point Notation

Learn how to represent numbers with fractional parts using fixed point notation.

Fractions in binary

We have learned how to represent whole numbers – positive and negative – in binary, and how to divide with binary numbers, but you might be wondering how we would represent fractions.

Representing fractions in binary is essential because we need fractions when simulating many real-world scenarios using computers.

Let’s have a look at the decimal technique of representing non-integer numbers:

For every place beyond the decimal point, i.e., on the right of the units (10010^0) place, the value is equivalent to 110n\frac{1}{10^n}. The first place after the decimal has a place value of 10110^{-1} or 0.10.1, the second place has 10210^{-2} or 0.010.01, and so on.

So place values on the left of the decimal point increase in powers of 1010, and decrease in powers of 1010 to the right. Can we propose something similar for the binary system? There are two methods for representing fractional numbers in binary. One is fixed point notation, which we will look at in this lesson, and the other is floating point notation, which we will look at in the rest of this chapter.

Get hands-on with 1200+ tech skills courses.