# Architectural breakdown: Memory

In this post I’ll continue to try and explain away the various bits of the architecture that will make up my relay computer project — this time it’s the memory. Here again is the architecture I’ll be building against (from the Harry Porter Relay Computer)

In my last post I wrote about the computer registers, each of which can store a binary value — they’re typically very fast although there’s a fixed number of them (in this computer there’s eight ‘general registers’ A, B, C, D, M1, M2, X and Y). Needless to say we wouldn’t be able to do anything too exciting if we’re limited to only 8 storage slots and that’s where the memory comes in — it’s not as fast (relatively) as the registers but it can hold many, many more values.

You can think of memory as a set of pigeon holes with a finite number of slots/holes that can each hold one value at a time. Each hole has a unique label on it so that we can refer back to it and find a value we placed earlier. The memory in this computer holds 8-bit values (also known as one byte … 1 byte = 8 bits) in each slot and there are 32,768 slots in total. This memory would be described as 32K because it can hold 32 kilobytes or 32 x 1024 bytes — note that there’s 1024 bytes to a kilobyte rather than 1000 as you might expect because everything is based on binary and the base-2 numbering system again. It’s worth noting that the values that are put in memory only stick around as long as there’s a power supply connected — as soon as the power is gone so are the values. You may have heard of memory being described as RAM (Random Access Memory) — this is so called because you can access the values in memory in a random fashion, that is, in any order.