CodeNewbie Community 🌱

Cover image for What Everyone Must Know About Memory
ender minyard
ender minyard

Posted on • Updated on

What Everyone Must Know About Memory

What is memory, really?

The central processing unit, or CPU, controls everything that goes on inside a computer. The only reason anything happens on your computer screen is because the CPU reads instructions from memory and executes them forever without stopping.

Everything that is "stored" is stored in memory. The location of your cursor on the screen is stored in memory. What you see on the screen of your computer is the image of an area of memory.

Primary Memory

A computer has primary and secondary memory. The primary memory consists of RAM and ROM. The RAM is random access memory, which is read/write memory that loses its contents when the machine is shut off.
RAM semiconductor
ROM is read only memory that never loses its contents unless intentionally destroyed. An operating system would usually use ROM to store information the operating system needs as soon as the computer is turned on.

Secondary Memory

Unlike primary memory, secondary memory is not directly accessible by the central processing unit. Hard disk drives and USB flash drives are included under the umbrella of secondary memory.


Hard disk drives can hold terabytes of data. They are usually used to store a user's files. Sequential reads - reading a continuous chunk of data - is fast, but random access to hard disk drives is slow.

The CPU and Memory

The CPU contains registers, or internal variables, which control its operation. The program counter register holds the next instruction for the CPU to execute and the accumulator register holds the instruction currently being executed.

Computer memory is a numbered sequence of fixed-size storage locations. The number attached to each storage location is called its address. The size of a single storage location is called a byte.

The CPU sees memory as a string of bytes starting with address 0 and increasing to the maximum address. Each location in memory has a memory address represented as a binary number on the address bus circuitry. A bus is a subsystem that transfers data between computer components.


All modern computers that rely on this model are using the Von Neumann architecture.

Did I miss anything? Tell me more about memory 💽 in the comments!

Top comments (2)

tydch profile image

The insights shared in What Everyone Must Know About Memory were truly eye-opening. Just like the way we seek knowledge, caring for our memory is essential. By the way, have you heard about the benefits of mindfulness for memory retention? It's as intriguing as discovering a reliable Home Residential Window Caulking.

andrewbaisden profile image
Andrew Baisden

Great this was a good introduction.