How do CPU and RAM work

This is how a PC works under the hood

Hermann Apfelböck

PCs and notebooks are highly complex, multifunctional tools. If you want to upgrade a hardware component, there are a few things to consider. We'll help.

EnlargeCPU upgrades in particular often resemble an operation that should be carried out with surgical precision.
© iStockphoto.com/Ludinko

One can write books and read books about how digital computers work. For every requirement - whether for historians, computer scientists and programmers or for electrical engineers up to the basics of semiconductor technology. But you will neither expect nor fear at this point: CPU, memory, BIOS and mainboard are all about components and relationships that every ambitious PC user will sooner or later encounter in practice.

CPU, memory and peripherals

The computer in the narrower sense consists only of two fundamental components - the processor (CPU = Central Processing Unit) and the working memory (RAM, Random Access Memory).

EnlargeThe CPU under the lock: Compared to its importance, the CPU is an inconspicuous component - normally covered by a large fan.

The processor: Everything that happens on the PC has to be stored in the memory via the CPU, where it can be read, changed and processed by the CPU. This is greatly simplified - because we leave out the separate GPU (Graphics Processing Unit) for screen output as well as DMA (Direct Memory Access), i.e. direct memory access without being mediated by the CPU. In order to feed the CPU with tasks, exact instructions are required - software in the broadest sense. The instruction set of a processor, i.e. the machine language, is manageable despite more recent instruction set extensions (MMX, SSE), especially since only about 20 of the 200 to 300 instructions are used intensively: For example, content is shifted from one memory address to another, numbers are added, divided or compared or variables written to hard disk via interrupt call.

The assembly language, which is close to machine language, is difficult to access despite the small number of instructions and quickly requires hundreds of lines of code for tiny actions. It is practically only used where device manufacturers for specialized processors with optimized code have to avoid any unnecessary load. Software for the PC is almost always created using much more accessible high-level languages ​​such as C or Java, the compiler of which ultimately converts the code into machine language. Although these compilers do not achieve the quality of assembler code, they are also highly efficient. Even the basic system of the PC, the BIOS (Basic Input Output System), no longer has to be written in assembler since the switch to EFI (Extensible Firmware Interface).

Hardware check: check speed and service life

The RAM: How much RAM a CPU can use directly, i.e. without special expansion techniques, depends on the architecture: 32-bit CPUs theoretically address up to four GB of RAM: 2 to the power of 32 results in 4,294,967,296 bytes. This 4 GB limit is now a real limit, because many mainboards in PCs and notebooks can not only accommodate more memory, but are often delivered with 6 and 8 GB as standard. However, 64-bit processors have been standard for more than ten years: They can theoretically address 2 to the power of 64 bytes, but are currently often throttled to 35 or 36 address lines, which then means a memory limit of 32 or 64 GB.

In addition to the RAM limits of the CPU and mainboard, 64-bit system software must also be used: addressing the CPU's memory beyond 4 GB requires 64-bit Windows or Linux, which is becoming increasingly standard.

Enlarge3D bios: This leaves the simple text mode of an old assembler bios clearly behind. The question arises, however, whether the BIOS should really invite you to click with the mouse.

Periphery, bus systems and interrupt

Without a connection to the outside world, the CPU could neither receive commands in the form of software nor pass on results. All devices for entering software or data as well as outputting the results are considered "peripherals":

Peripheral devices and bus systems: Typical and unique input peripherals are devices such as keyboard, mouse, punch card or microphone, while loudspeakers, printers and monitors are used for data output. Multifunction printers and touchscreens can take on both roles, as can drives or power adapters. The transmission from and to the periphery takes place via a data bus, and the most important bus systems in the computer are AGP, PCI, PCI-Express for expansion cards, IDE, SCSI, (S) ATA for drives, as well as USB for external expansion adapters and drives, as well as Ethernet and WLAN for network connections. The diversity of bus systems results from the fact that the CPUs are getting faster and faster and the bus systems have to follow in order not to slow down the system. The data path of all bus systems leads via the chipset of the mainboard directly to the CPU or vice versa.

EnlargeLost memory: The 64-bit CPU could address the 8 GB of RAM, but the 32-bit operating system prevents this. The CPU and system must be 64-bit in order to overcome the 4 GB limit.

Interrupts: So far it has not become clear how a busy CPU finds out that the mouse has just moved out there or that a data packet from the network adapter has arrived. To do this, there must be a way to interrupt the processor and draw attention to the event. This is done using defined interrupt lines with an interrupt request (IRQ). Since there are many peripheral devices that send IRQs, but the CPU itself only has one input for this, the PIC or APIC (Advanced Programmable Interrupt Controller) is interposed - mostly in the chipset of the mainboard. It offers at least 16 interrupt lines. That's not much either, and interrupt management has been a serious problem for a long time, as two devices on the same interrupt line completely or partially disable both devices. After the technically "stupid" ISA plug-in cards became extinct, modern operating systems now manage IRQ sharing (sharing a line) without any problems: Interrupt conflicts are history, Plug & Play works practically without any problems. So that the system functions and reacts optimally from the user's point of view, the interrupt controller evaluates the IRQ according to priority: User inputs via mouse or keyboard are given higher priority than hard disk and network inquiries. It is only in the case of extreme overload that the mouse pointer no longer follows the movement of the pointing device.

Freeware analyzes PC and warns of hardware damage

EnlargeInternal connections and components on the mainboard: The numbers can be found in the main text under “Mainboard and basic components”, resolved and briefly explained. The focus is on components that you will find in this way or similar in every standard mainboard.

Mainboard and basic components

Mainboards, motherboards or - in English: motherboards - form the unmistakable center of a PC as soon as you open its case. Important connection ports of the mainboard are mainly accessible on the rear wall, even when the housing is closed, and partly also on the front. Expansion cards such as graphics cards or sound cards, additional hard drives or optical drives can only be retrofitted with the housing open and direct access to the mainboard. Our large illustration shows and identifies the main components of a mainboard:

1. The bios chip: The Basic Input Output System (or the EFI firmware) is the primary software and is integrated as a small chip on the mainboard (1). It initializes and configures its hardware components. A small memory module is supplied with its own battery (1a) so that the settings survive reboots and the system time remains up to date. When switched on, the BIOS checks the mainboard hardware and the connected peripheral devices and can then initiate the start of the actual operating system via the boot sector of the primary drive.

2. CPU socket (with CPU and fan):