Conditional operations and decision-making
And now for the biggie – the conditional operation. Let’s consider the following recipe:
- Take two eggs.
- Separate the whites.
- Add sugar.
- Beat until stiff.
These actions are carried out sequentially. The first three actions are simple operations. The fourth action is very different from the previous three, and it is this action that gives the computer its power. It’s an operation that performs one of two actions, depending on the outcome of a test. In this case, the eggs are beaten, then tested. If they are not sufficiently stiff, the beating is continued, they are retested, and so on.
What makes a computer so powerful is its ability to take decisions. Without a decision-making capacity, a computer could not respond to its environment; it could perform only the same calculation over and over again. The foundation of human intelligence is also decision-making. If you play chess, you use decision...