How computers work
A computer stores everything, from photos to programs, as patterns of 0s and 1s, and works on them with tiny switches. Six units go from the bottom up: binary numbers, bytes and text, logic gates, adding with gates, the CPU's fetch, decode and execute cycle, and memory. You can flip bits, wire gates, watch carries ripple through an adder and step a small computer through its program one phase at a time.
Progress
- 1Bits and binary numbersEight switches can show 256 different patterns, enough for every number from 0 to 255.
- 2Bytes, hexadecimal and textThe letter A is stored as 65, or 01000001. In UTF-8 a Korean syllable such as U+D55C takes three bytes.
- 3Logic gatesIntel's first microprocessor, the 4004 of 1971, held 2,300 transistors. They were wired into gates, and gates are all a processor is made of.
- 4How gates add numbersOne XOR and one AND gate are enough to add two bits. Chain four full adders and you can add any two numbers from 0 to 15.
- 5What a CPU doesA 3 GHz processor ticks 3 billion times a second, one tick every third of a nanosecond.
- 6Memory and storageWith 32-bit addresses a processor can name 4,294,967,296 bytes, exactly 4 GiB. Switch the power off and RAM forgets all of it.
Sources for this course (9)
- (checked 2026-10-17; reordered 2026-10-19: standards first, then official documentation, then the teaching model and calculations, history sources last)
- Standards: NIST, "Prefixes for binary multiples" (physics.nist.gov/cuu/Units/binary.html: IEC approved kibi, mebi, gibi in December 1998; 1 B = 8 bit; 1 MiB = 1 048 576 B; 1 MB = 1 000 000 B; 1 GiB = 1 073 741 824 B; historical note: memory makers usually mean 2²⁰ bytes by megabyte, storage makers 1 000 000, and the "1.44 MB" diskette uses a megabyte of 1 024 000 bytes)
- IETF RFC 20 "ASCII format for Network Interchange" (1969, 7-bit codes, A = 65, a = 97, 0 = 48)
- IETF RFC 3629 "UTF-8, a transformation format of ISO 10646" (2003: 1 to 4 octets per character, ASCII unchanged, code points up to U+10FFFF, U+0800 to U+FFFF take three octets, "the first octet of a multi-octet sequence indicates the number of octets", example U+D55C U+AD6D U+C5B4 = ED 95 9C EA B5 AD EC 96 B4)
- Official documentation: MDN Web Docs, "<color>" (hexadecimal colour notation #RRGGBB)
- Intel, "Intel Chips" timeline poster (2012: Intel 4004 of 1971 with 2,300 transistors; 2nd generation Core 2010 with 1.16 billion)
- Claude E. Shannon, "A Symbolic Analysis of Relay and Switching Circuits", Transactions of the AIEE vol. 57 (1938)
- abstract of his MIT master's thesis. Computer History Museum, The Silicon Engine, "1947: Invention of the Point-Contact Transistor" (Bardeen and Brattain, December 1947, germanium)
- John von Neumann, "First Draft of a Report on the EDVAC" (30 June 1945, Moore School, reprinted in IEEE Annals of the History of Computing 15:4, 1993).
Checked: 2026-10-17