Skip to 0 minutes and 2 secondsBefore we go any further into looking at how a computer processor works, we need to look at how a computer can store data. Here we have an image of a memory cell. It consists of a transistor and a capacitor. A transistor allows a capacitor to be charged. A fully charged capacitor would represent a 1, and a discharged capacitor would represent a 0. These memory cells can be arranged in a grid. As an example, here is a grid that is eight memory cells across. Any one of these cells can be accessed and a 1 or 0 written into the memory cell. Because any particular memory cell can be accessed at random, this is called random access memory, or RAM for short.

Skip to 0 minutes and 49 secondsThere are actually many different types of memory cell and many different types of RAM as well. However, it's easiest to simplify this and think of RAM as a table of numbers. We have the address, which codes which memory cells the data is written into, and the data itself, which is the contents of those memory cells. It would either be an 8-bit, 16-bit, 32-bit, or even 64-bit number. Just like with our transistors in our CPUs, we can get billions of memory cells on these RAM modules.

Storing bits and bytes

Before we go any further into looking at how a computer processor works, we need to look at how a computer can store data.

Image showing a memory cell. Current flows through a transistor onto one side of a capacitor, with the other side of the capacitor connected to ground.

Above is a diagram of a memory cell, consisting of a transistor and a capacitor (a component which can hold an electric charge). The transistor allows the capacitor to be charged. A fully charged capacitor would represent a one, and a discharged capacitor would represent zero.

These memory cells can be arranged in a grid. As an example, in the diagram below they are arranged in a grid that is eight memory cells across. Any of these cells can be accessed, and a one or zero written into the memory cell.

Animation showing the memory cell from the previous image zooming backwards to take up 1 slot in a 4x4 grid of identical cells. This then zooms back to slot into an 8x8 grid.

Because any particular memory cell can be accessed at random, this is called Random Access Memory, or RAM for short.

An 8x8 array of blue boxes representing memory cells. A black 1 or 0 is visible on each cell, and these are all changing independently.

There are actually many different types of memory cell, and many different types of RAM. However, we don’t need to worry about the details, so we can think of RAM as a table of numbers.

A table with two columns, labelled "Address" and "Data". The addresses count up from 0 to 13, while each piece of data is an 8 digit binary number.

We can use addresses to tell us which memory cells a piece of data is written into. The data itself is the content of those cells. Depending on circumstances, it will be an 8-bit, 16-bit, 32-bit or even 64-bit number (so each address corresponds to 8 single bit memory cells, or to 16, etc.)

And just like with transistors in our CPUs, we can get billions of memory cells on RAM modules, like the one below.

An image of a RAM module, with 8 chips on it and some gold-plated connectors at the bottom.

Share this video:

This video is from the free online course:

How Computers Work: Demystifying Computation

Raspberry Pi Foundation