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.
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.
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.
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 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!