Theory: Computer Organization vs. Architecture & Components
This course is about what is inside a computer and how it runs programs. Before looking at any circuit or instruction, we need two words that are used throughout the subject (Null & Lobur, Ch. 1): organization and architecture. We then look at the three basic parts every computer has, and finish by learning to read a computer advertisement, which is full of units (GHz, GB, ns, …) that the rest of the course explains.
Computer Organization vs. Computer Architecture
Intuition. Think of a car. The driver sees a steering wheel, pedals and a gear stick: that is the interface they program the car through. The mechanic sees the engine, the fuel injection and the wiring that make those controls actually work. Two cars can have the same controls (same “architecture”) but completely different engines (different “organization”).
| Computer organization | Computer architecture |
|---|
| What it covers | All the physical aspects of the computer system | The logical aspects of the system as seen by the programmer |
| Typical examples | Circuit design, control signals, memory types (SRAM, DRAM), bus design, clock rate, how a multiplier is built | Instruction set, instruction formats, data types, addressing modes, number of programmer-visible registers |
| Question it answers | How does each component work, and how are the components connected to one another? | What can the machine do, i.e. how do the components work together to perform tasks (programs)? |
| Who cares most | Hardware designers / engineers | Programmers, compiler and OS writers |
A handy test: “Would a programmer writing a correct program need to know this?” If yes, it is architecture. If the program would run exactly the same and only the speed, cost or physical build changes, it is organization.
Same architecture, different organization is very common. Every x86-64 processor from Intel and AMD runs the same machine programs (same architecture), yet the chips inside are built very differently (different organization). That is why you can install the same Windows on either one.
Mini-example
“Does the computer have a multiply instruction?” → architecture (the programmer can use it or not). “Is multiplication done by a fast dedicated multiplier circuit or by repeated shift-and-add?” → organization (the program is the same; only the speed differs).
The Lecture’s Mac and Windows Examples
The lecture applies the same split to two whole systems. Here the word “architecture” is used in a broader sense: the logical platform that software and users see (operating system design, file system, services), as opposed to the physical hardware.
| macOS (Apple) | Windows (Microsoft) |
|---|
| Organization (physical) | Apple M1 chip, Thunderbolt ports, Retina display | Intel or AMD processors, various motherboard types, USB peripherals |
| Architecture (logical, as seen by software/users) | Unix-based system, APFS file system, integration with iCloud and Apple services (incl. App Store) | Windows NT-based system, NTFS file system, Microsoft services such as OneDrive and Office 365 |
Mini-example
A Windows laptop is upgraded from an Intel motherboard to an AMD motherboard, and NTFS and OneDrive still work exactly as before. Only the organization changed; the architecture the software sees is the same.
The Three Basic Components of a Computer
At the most basic level, a computer is a device consisting of three components:
- A processor (CPU) to interpret and execute programs.
- A memory to store both data and programs.
- A mechanism for transferring data to and from the various components, including devices outside the computer: the input/output (I/O) system (and the buses that connect everything).
Diagram loads as you scroll.
Notice that memory stores both data and programs. Keeping the program in memory (instead of in wiring) is the stored-program concept, the core idea of the von Neumann model in section 1.3.
Mini-example
Classify: hard disk → I/O (a storage device outside main memory, reached through the I/O system); RAM → memory; the ALU and registers → processor; USB port → I/O (transfer mechanism).
Reading a Computer Advertisement
Null & Lobur open the book with an advertisement like this one (the lecture shows it next to a present-day mini-PC spec sheet, which uses the same vocabulary):
FOR SALE: OBSOLETE COMPUTER - CHEAP! CHEAP! CHEAP!
* Intel i7 Quad Core, 3.9GHz
* 1600MHz 32GB DDR3 SDRAM
* 128KB L1 cache, 2MB L2 cache
* 1TB SATA hard drive (7200 RPM)
* 10 USB ports, 1 serial port, 4 PCI expansion slots
(1 PCI, 1 PCIx16, 2 PCIx1), Bluetooth, and HDMI
* 24" widescreen LCD monitor, 16:10 aspect ratio,
1920x1200 WUXGA, 300 cd/m2, active matrix, 1000:1 (static),
8ms, 24-bit color (16.7 million colors), VGA/DVI input, 2 USB ports
* 16x CD/DVD +/- RW drive
* 1GB PCIe video card
* PCIe sound card
* Integrated 10/100/1000 Ethernet
Every line maps onto one of the three components:
| Ad line | Component | Meaning |
|---|
| Intel i7 Quad Core, 3.9 GHz | Processor | 4 independent processing cores on one chip; the system clock ticks 3.9×109 times per second |
| 1600 MHz 32 GB DDR3 SDRAM | Memory | 32 GB of main memory (RAM). SDRAM = synchronous dynamic RAM; DDR3 = 3rd generation “double data rate” (transfers on both clock edges); 1600 MHz = memory bus speed |
| 128 KB L1 cache, 2 MB L2 cache | Memory (inside/next to the CPU) | Small, very fast memories that hold copies of recently used data so the CPU does not wait for slow RAM. L1 is closest/fastest/smallest, L2 is bigger and slower |
| 1 TB SATA hard drive (7200 RPM) | I/O (storage) | 1 terabyte of permanent storage on spinning platters (7200 revolutions per minute) attached via the SATA interface |
| USB, serial, PCI/PCIe slots, Bluetooth, HDMI | I/O (transfer mechanisms) | Ports connect external devices; expansion slots (PCI, PCI Express) are connectors on the motherboard’s bus for adding cards |
| LCD monitor … 8 ms, 24-bit color | I/O (output) | Display; 8 ms = response time; 24 bits per pixel → 224=16,777,216 colors |
| 1 GB PCIe video card, PCIe sound card | I/O | Add-on cards in PCIe slots; the video card has its own 1 GB memory |
| 10/100/1000 Ethernet | I/O (network) | Network interface that can run at 10, 100 or 1000 megabits per second |
Bus = a set of wires shared by components to move data, addresses and control signals. Port = a connector through which an external device plugs into a bus (USB, HDMI, serial). Cache = a small fast memory holding copies of frequently used data. Hertz (Hz) = cycles per second, a measure of clock rate (speed).
Units and Prefixes
Computers measure three kinds of quantities, and the prefixes mean different things depending on the quantity:
| Prefix | Symbol | Power of 10 | Power of 2 | Power of 2 (exact value) |
|---|
| Kilo | K | 103 | 210 | 1,024 |
| Mega | M | 106 | 220 | 1,048,576 |
| Giga | G | 109 | 230 | 1,073,741,824 |
| Tera | T | 1012 | 240 | 1,099,511,627,776 |
| Peta | P | 1015 | 250 | ≈1.126×1015 |
Rule of thumb (Null & Lobur):
- Memory size (RAM, cache) is measured in powers of 2, because addresses are binary: 1 KB = 210 bytes, 1 GB = 230 bytes.
- Speed / frequency (Hz) and data rates (bits per second) use powers of 10: 1 GHz = 109 Hz, 1 Mbps = 106 bits/s.
- Disk/SSD capacity is advertised by manufacturers in powers of 10: 1 TB = 1012 bytes.
To remove the ambiguity, the IEC defined binary prefixes KiB, MiB, GiB, TiB (kibi-, mebi-, gibi-, tebibyte) for 210,220,230,240. Many operating systems still display GiB values with the label “GB”, which is why a “1 TB” drive shows up as about 931 GB.
Small quantities (time, mostly) always use powers of 10:
| Prefix | Symbol | Value | Typical use |
|---|
| milli | m | 10−3 (one thousandth) | disk access and display response times (ms) |
| micro | µ | 10−6 (one millionth) | old transistor switching times, I/O timings (µs) |
| nano | n | 10−9 (one billionth) | CPU clock cycles, RAM access (ns) |
| pico | p | 10−12 (one trillionth) | gate delays (ps) |
Byte and bit: 1 byte (B) = 8 bits (b). Storage uses capital B, network speeds use lowercase b (Mbps = megabits per second).
Frequency ↔ time: a clock of frequency f ticks once every T=f1 seconds. So 1 MHz → 1 µs, 1 GHz → 1 ns.
Mini-example
A 2 GHz clock: T=2×1091=0.5×10−9 s =0.5 ns. A memory of 4 GB holds 4×230=22×230=232=4,294,967,296 bytes.
Worked Examples
Exercise 1
Classify each item as an issue of computer organization or computer architecture:
(a) the instruction set of the CPU; (b) the type of RAM chips (DDR3 vs DDR4); (c) the addressing modes available to the programmer; (d) the control signals that move data between registers; (e) the data types the instructions support (e.g. 16-bit two’s-complement integers); (f) the clock speed; (g) whether the machine has a “multiply” instruction; (h) whether multiplication is done by a dedicated circuit or by shift-and-add.
Show solution ↓Hide solution ↑
Solution
Apply the test: does a programmer need to know it to write a correct program?
| Item | Classification | Reason |
|---|
| (a) instruction set | Architecture | It is exactly what the programmer writes programs with |
| (b) RAM chip type | Organization | Physical memory technology; programs run unchanged |
| (c) addressing modes | Architecture | Programmer chooses how operands are addressed |
| (d) control signals | Organization | Internal hardware timing, invisible to the program |
| (e) data types | Architecture | Programmer must know how numbers are represented |
| (f) clock speed | Organization | Changes only how fast the program runs |
| (g) has a multiply instruction | Architecture | Programmer can (or cannot) use it |
| (h) how multiply is built | Organization | Same result, only speed/cost differ |
Architecture: (a), (c), (e), (g). Organization: (b), (d), (f), (h).
Exercise 2
The advertised computer has a 3.9 GHz processor and 1600 MHz memory.
(a) How long is one processor clock cycle, in nanoseconds?
(b) How long is one memory bus cycle?
(c) Roughly how many processor cycles pass during one memory bus cycle?
Show solution ↓Hide solution ↑
Solution
Frequencies use powers of 10, and T=1/f.
(a)
TCPU=3.9×109 Hz1=0.2564×10−9 s≈0.256 ns(b)
Tmem=1600×106 Hz1=1.6×1091=0.625×10−9 s=0.625 ns(c)
TCPUTmem=0.25640.625≈2.44(equivalently 1600 MHz3900 MHz=2.4375)So the processor goes through about 2.4 cycles for every memory bus cycle. Real RAM needs many bus cycles per access, so the CPU would wait a lot. This is exactly why the ad also lists cache: small fast memory that keeps the CPU supplied.
Check: 0.256 ns×3.9×109≈1 s ✓.
Exercise 3
The ad lists 32 GB of RAM, a 128 KB L1 cache and a 2 MB L2 cache.
(a) Give each size exactly in bytes as a power of 2 and as a number.
(b) How many times larger is L2 than L1?
(c) How many times larger is main memory than the L2 cache?
Show solution ↓Hide solution ↑
Solution
Memory sizes use powers of 2: K = 210, M = 220, G = 230.
(a)
- L1: 128 KB=27×210=217=131,072 bytes
- L2: 2 MB=21×220=221=2,097,152 bytes
- RAM: 32 GB=25×230=235=34,359,738,368 bytes
(b) 217221=24=16 → L2 is 16 times larger than L1.
(c) 221235=214=16,384 → main memory is 16,384 times larger than L2.
Check (b): 16×131,072=2,097,152 ✓.
Exercise 4
A customer installs the advertised 1 TB hard drive, but the operating system reports its capacity as only about “931 GB”. Explain the difference with a calculation.
Show solution ↓Hide solution ↑
Solution
The drive maker uses powers of 10 for disk capacity:
1 TB=1012=1,000,000,000,000 bytesThe operating system divides by powers of 2 (1 GiB=230=1,073,741,824 bytes) but labels the result “GB”:
2301012=1,073,741,8241,000,000,000,000≈931.3 GiBNothing is missing: the same number of bytes is just measured with a larger unit. In tebibytes: 1012/240≈0.909 TiB.
Check: 931.3×1,073,741,824≈1.0000×1012 ✓.
Exercise 5
(a) The hard drive spins at 7200 RPM. How long does one revolution take, in milliseconds? What is the average rotational delay (half a revolution)?
(b) The monitor’s response time is 8 ms. How many clock cycles of the 3.9 GHz processor pass in 8 ms?
(c) Express 8 ms in µs and in ns.
Show solution ↓Hide solution ↑
Solution
(a) Revolutions per second: 7200/60=120 rev/s. Time per revolution:
1201 s=0.008333 s=8.33 msAverage rotational delay =21×8.33=4.17 ms.
(b)
8×10−3 s×3.9×109 cycles/s=31.2×106=31,200,000 cycles(c) 8 ms=8×10−3 s=8,000×10−6 s=8,000 μs=8,000,000 ns.
Moral: mechanical and display devices work in milliseconds, the CPU works in fractions of a nanosecond, so a millisecond is millions of CPU cycles. This speed gap drives the design of memory hierarchies and I/O systems later in the course.
Exercise 6
The monitor is 1920 × 1200 pixels with 24-bit color.
(a) How many different colors can each pixel show?
(b) How many bytes of video memory are needed to hold one full screen image? Give the answer in bytes and in MB (binary).
(c) Does the 1 GB video card have enough memory for it?
Show solution ↓Hide solution ↑
Solution
(a) 24 bits per pixel give 224=16,777,216≈16.7 million colors (matches the ad).
(b) Pixels: 1920×1200=2,304,000. Each pixel needs 24/8=3 bytes:
2,304,000×3=6,912,000 bytesIn binary megabytes: 6,912,000/220=6,912,000/1,048,576≈6.59 MB.
(c) 1 GB=1024 MB, and 1024/6.59≈155, so the card can hold about 155 full screens: plenty (the rest is used for textures, 3-D data, etc.).