Organization vs architecture
When we talk about a computer’s design, it is important to separate two closely-related but distinct ideas: architecture and organization.
Computer architecture refers to the abstract model of the machine—the aspects visible to a programmer. This includes the instruction set (the set of operations the computer can perform), the supported data types (integers, floating-point numbers, characters, etc.), the memory model, and the addressing modes. Architecture defines what the computer does, not precisely how it is realized in a particular implementation. Architecture is the conceptual design and fundamental operational structure of a computer system. It is what the system can do and how the user sees it.
The analogy often offered is that the architecture of a computer is like a blueprint for a house. A blueprint tells you what rooms there are, what purposes they serve, how they are connected (e.g., by hallways, foyers, stairs, and doors), and which rooms have windows (we can see in and see out), and which rooms do not. However, you don’t know—or need to know—how the the builder will wire the house or install the plumbing.
Computer organization, on the other hand, describes the actual implementation of the architecture in hardware. This includes details such as the datapath (the circuits that carry out operations), control logic, pipeline structure, and the structure of memory and cache. Organization is concerned with how the machine performs the operations defined by the architecture. In this sense, computer organization addresses the operational units and the interconnections that implement the architectural specifications.
You may think of computer organization as how how the system is built, and how all of the hardware in the machine realizes the blueprint provided by the architecture.
Returning to the construction analogy, organization would be like an “as-built” account of the foundations, load bearing members, plumbing, wiring, and materials to build the house.
For example, the ARM architecture defines a particular instruction set. A simple ARM processor in a smartwatch and a powerful ARM processor in a smartphone both implement the same architecture, but their organizations differ drastically in terms of clock speed, cache design, and power management.
There are places where this analogy breaks down, but it’s a good way to start thinking about architecture and organization. It should also be clear that we cannot speak of organization without some understanding of architecture—we can’t build a house unless we can read the blueprint!
Basic components
When we think about a typical application, this may be millions of lines of code but as we know, the hardware on a computer can only execute low level instructions in what we know as machine code (which is binary). There are multiple layers of software that take us from this high level code to these lower level instructions. The two main system software components that we’ll focus on are the operating system, (Linux, macOS, Windows), and compilers and interpreters.
The operating system provides an interface between the software we write and the hardware. This is done though a variety of different services and functions.
Computers run on binary instructions, programming languages make these instructions easier to write and execute. Some languages are compiled and others are interpreted, but in either case, machine-level instructions must be produced in order for programs to run.
Compilers are tools that translate a program written in a high-level language into instructions that the hardware can actually execute in hardware. A compiler takes source code, and produces binary artifacts, some of which can be run, and others which serve as modules that can be linked to produce a larger application.
Some languages are interpreted. This means they aren’t directly converted to a binary executable, but instead are converted to some intermediate representation (e.g., bytecode) that is then executed by another program which is compiled.
Whether interpreted or compiled, translation from high-level code to machine instructions must take place somewhere.
Hardware
A modern computer system can be understood as four interacting parts: the CPU, memory, I/O devices, and the buses that connect them.
CPU
The CPU (central processing unit) is commonly described as the “brain” of the computer. That is, of course, a gross overstatement, but it is true that the CPU is where most of the work of computing is done (or in related components such as GPUs).
The CPU has two primary subsystems: the control unit, which directs the flow of instructions and data, and the datapath, which contains the arithmetic and logic unit (ALU) and registers. The ALU carries out basic operations such as addition, subtraction, and comparisons, while registers provide very small but extremely fast storage locations inside the CPU.
Memory hierarchy
The memory hierarchy organizes storage in layers, balancing speed and size.
At the very top are registers, which are the fastest but also the smallest in capacity. Registers are a component of the CPU and are not directly accessible by other components.
Just below the registers in the hierarchy are caches, small amounts of fast memory located close to the CPU to reduce the delay of accessing frequently used data. There may be more than one level of cache—CPU cache, system level cache (SLC). Because caches themselves are hierarchical, they’re often referred to as L1, L2, etc.—level one cache, level two cache, ans so on.
The next level is main memory (random access memory or “RAM”), which is larger but slower. Finally, secondary storage such as solid-state drives (SSDs) or hard drives provides massive capacity but at much lower speeds. This hierarchy exists because it is physically and economically impossible to build a single large, fast, inexpensive memory. By combining levels, systems achieve both speed and capacity.
Input / output devices
I/O (input / output) devices are the way the computer interacts with the outside world. Input devices include keyboards, mice, trackpads, cameras, microphones, touchscreens, and sensors (e.g., accelerometers, etc.). Output devices include monitors, speakers, and printers. Storage devices and networking equipment (WiFi, Bluetooth, Ethernet) are also part of the I/O system.
Finally, these components communicate via buses, which are shared communication pathways that carry data, memory addresses, and control signals. Modern systems often use multiple buses internally to manage communication bottlenecks.
Adapted from "Patterson and Hennessy, Computer Organization, ARM edition" by Surya Malik and Clayton Cafiero.
No generative AI was used in writing this material. This was written the old-fashioned way.