The World of the Computer: Six (+1) Key Programming Concepts

Most programmers (and by most, I mean the overwhelming majority) use imperative programming techniques that would have been familiar to their distant ancestors in the 1970s. Those techniques may be wrapped up in objects, but still basically push bits around using assignment, indexing, loops, conditionals, and function calls. — Greg Wilson

There are just six crucial programming operations. These six are sufficient to express any computation in any field*, whether it is a scientific calculation, altering the pixels in an image, transmitting a file across a network, compiling a report from a database, or triggering the iginition in a car. Since these operations are instructions to the computer to do things we first need a model of a computer. Here's one sufficient to understand most of the programming we will do in this course.

.

It doesn't look very much like the computer in front of you. There is no monitor, no keyboard, no mouse, no system unit. That's because it is a functional diagram of a computer not a physical diagram, and from a programming point of view, from the computer's point of view, this is all there is to a computer. In fact this is all there is to any computer. They all share these components.

The six operations consist of three elementary operations:

and three control structures,


* See The structured program theorem.