Skip to content

Real Numbers

In C, whole numbers like int are represented as 2s complement. But it cannot represent real numbers like float or double. Many real-world applications involve computations no only on whole numbers but also real numbers. As we will see later, due to the finite number of bits, any representation of real numbers are really just an approximation of the actual numbers.

There are two major kinds of the approximation:

  1. Fixed-Point Representation
  2. Floating-Point Representation