In the real world, things happen in more or less continuous ways. When you walk, you don’t take steps in discrete movements, but rather as a flowing series of motions (which has been described as “controlled falling”). When the valve for a garden hose is adjusted, it isn’t set to some discrete amount of water flow in gallons or liters per minute. It just gets set to produce an output that “looks about right,” and it would be very difficult to get it back to that same exact level on the following day. Digital electronics handle changes as discrete steps or values, not as a continuum; this difference in how numbers are handled leads to a need to translate from one domain to another.
Mathematics and computer science define two basic types of numbers: integer and real. An integer is simply a whole number: –5, 0, 1, 2, and so on. The real world is the domain of real numbers, and there are a lot of them out there. Between 0 and 1, for example, there is an infinite set of real numbers.
A real number can represent any value (a point) along a continuous number line from –infinity to +infinity. The set of real numbers can be further divided into rational and irrational numbers. The set of integers is also a subset of the set of real numbers.
Rational numbers can be expressed as the ratio of two whole numbers (such as 12/1, 6/4 or 2/40), which is why they are called rational numbers, not because they make sense. They can also be written in decimal notion (such ...