Foundations: What a Computer Is

the role of the compiler and operating system

Hardware understands only one thing: machine code, raw bits matching the ISA. People, on the other hand, want to write readable programs and run many of them at once without micromanaging the chip. Two pieces of software bridge that gap and sit between human intent and bare silicon: the compiler, which translates the programs we write into machine code, and the operating system, which manages the hardware and shares it among many programs.

The compiler is a translator: it takes a program written in a high-level language like C or Python and turns it into the assembly and machine instructions the target ISA defines, choosing which instructions to use and trying to make the result fast and small. It is the bridge from human-readable code down to the hardware/software interface. The operating system is a manager and referee: it loads programs into memory and starts them, decides which program runs on the processor at each moment, hands out memory through virtual memory, controls input/output devices, and isolates programs so one crash or one bad actor cannot corrupt the others — services programs reach through system calls.

Together these are the software layer that sits directly on top of the hardware, and they are why ordinary programmers rarely think about registers, interrupts, or page tables. They also shape the hardware itself: the iron law's instruction count is largely the compiler's doing, and the operating system relies on hardware features like privilege levels and the memory-management unit. Architecture and system software are co-designed — each is built knowing the other exists, which is why studying the machine means meeting both.

You write print('hi') in Python; a compiler or interpreter turns it into machine instructions, and the operating system loads the program, schedules it onto the processor, and routes its output to the screen through a system call — none of which you had to spell out.

The compiler translates; the operating system manages and shares the hardware.

These are software, not hardware, yet they are co-designed with the architecture: the compiler exploits the ISA and the OS leans on hardware support (privilege levels, the MMU). You cannot fully understand the machine without them.

Also called
compiler and OSthe system software layer系統軟體層