Перейти к содержанию

Этот урок ещё не переведён на русский язык, поэтому показан на английском.

Начало урока

Memory: Numbered Cells

Before we can understand programs, languages, networks or security, we need a machine to stand on. This whole course is built on one idealized machine, and this lesson lays down its first part: memory. Everything else in the course will be derived from a few assumptions like this one — nothing will ever have to be memorized on faith.

Learning goals: after this lesson you can describe the memory of the idealized machine in one sentence, explain what an address is, say exactly what a cell can and cannot hold, and explain why this deliberately simplified model is still honest.

Start with the question

A computer clearly "remembers" things: your text, your photos, the program it is running. So ask the honest question: what does that remembering physically look like? What is actually there?

The answer of our idealized machine is almost shockingly plain. Memory is one long row of identical cells, numbered in order: cell 0, cell 1, cell 2, cell 3, and so on to some large final number. That is the whole picture. There are no shelves for text, no albums for photos, no folders. Just numbered cells in a row.

The three rules of memory

Rule 1 — The cells are numbered in order. Every cell has a number: 0, 1, 2, 3, … The number of a cell is called its address. The address is not written inside the cell — it is the cell's position in the row, the way a house number is the house's position on a street. Because the numbering is consecutive, if you know where the row starts, you can find any cell by pure counting.

Продолжите этот урок на YourAIZone

В полном уроке — объяснение целиком, разобранные примеры, частые ошибки, тесты с мгновенной проверкой и ИИ-репетитор. Начните сразу как гость или создайте аккаунт, чтобы сохранять прогресс.

В полном уроке

  • Объяснение целиком
  • Разобранные примеры
  • Частые ошибки и как их избежать
  • Тестовые вопросы: 3
  • ИИ-репетитор, который отвечает на вопросы по теме
  • Отслеживание прогресса для ученика, родителей и учителя