Skip to content

The Program Lies in Memory as Data

Beginning of the lesson

The Program Lies in Memory as Data

Every previous lesson was preparation for this one. Today the course states the central idea of all computing — the fact that makes languages possible, machines universal, and (much later) attacks conceivable. Like every deep truth here, it is derived, not announced: three old statements meet, and the conclusion is forced.

Learning goals: derive that programs are numbers in ordinary cells; dissect one machine command into its parts by a reading agreement; and state the consequence that changes everything — programs can be treated, and created, as data.

Start with the question — and the forced answer

The processor performs actions in sequence. Something must tell it which actions, in which order — the program. Where is the program, and what is it made of?

Assemble what the course already knows. The action set is small and fixed — so each action can be given a permanent number: say 1 = read, 2 = write, 3 = add, 4 = compare, 5 = move to another place in the program. A sequence of actions then becomes a sequence of numbers. And numbers live in memory cells — the same cells as everything else, because there are no other cells. Conclusion, with no exit:

The program is numbers, stored in ordinary memory cells, side by side with the data it works on. Not "loaded into a special instruction compartment" — there is no such compartment. One memory, one substance, two roles.

This design has a name worth knowing once — the von Neumann architecture, after the mathematician who articulated it — and virtually every machine you have ever touched is built this way.

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 2
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers