Explain how the CPU fetches, decodes and executes instructions, and what separates 32-bit from 64-bit.
Tell the CPU and GPU apart by the kind of computation each is good at, and tell a multi-core processor and clock frequency apart by how each raises performance.
Calculate the length of one clock cycle and the number of instructions per second from the clock frequency.
The CPU (central processing unit) is the core unit of a computer: it fetches instructions from main memory, decodes them, and controls the other units while carrying out calculations.
Check address
Fetch instruction
Decode instruction
Execute
Carry out the instruction, then go back to checking the next address.
4 / 4
Inside the CPU are small storage circuits (registers) such as the program counter (プログラムカウンタ), which remembers the address of the next instruction to fetch. Following that address, the CPU fetches instructions one at a time and repeats the cycle of decoding and executing them. The number in 32-bit CPU and 64-bit CPU is the width of data the CPU can handle in one go.
AnalogyIt is like a head chef working through a recipe book line by line. A bookmark marks the next line; the chef reads it, works out what it means, does the step, and moves on.
How to rememberThe C in CPU stands for Central. The name itself says it sits in the middle and directs everything.
Exam points
ExamThe CPU repeats the cycle of fetching an instruction from main memory (主記憶), decoding it and executing it. Which instruction comes next is indicated by the program counter (プログラムカウンタ), which holds the address of the next instruction.
ExamA 64-bit CPU handles wider data at once than a 32-bit CPU, and in theory the upper limit of memory it can specify by address is also larger.
ExamA compatible CPU (互換CPU) is a separate product built with the same instruction set as the original CPU, so OSs and applications made for the original run on it unchanged.
A multi-core processor (マルチコアプロセッサ) is a processor that has several cores, the central parts that process instructions, on one chip, with each core running different work at the same time.
← Scroll the figure sideways →
A processor with 2 cores is called dual-core, and one with 4 cores is called quad-core. The unit of a continuous flow of processing that runs inside a program is called a thread. Some parts of a job can only proceed in order, so adding cores does not always raise performance in proportion to the core count.
AnalogyIt is like a shop with one checkout adding more checkouts. Customers in line can pay at different registers at the same time.
How to rememberDual is the 2 of a duet and quad is the 4 of a quartet. Both prefixes give the number of cores.
Exam points
ExamThe aim of a multi-core processor (マルチコアプロセッサ) is to give each core different work to run in parallel, raising the amount of processing the whole system can get through.
ExamThe core count is the number of central parts that process instructions inside a processor: 2 makes it dual-core (デュアルコア) and 4 makes it quad-core (クアッドコア).
ExamSplitting one program into several threads (スレッド) that run in parallel is called multithreading (マルチスレッド). Separate cores can then take on the separate threads at the same time.
A GPU (graphics processing unit) is a processor for graphics that uses many cores to handle, all at once, the large volume of calculations needed to draw 3D images and display video.
Drawing repeats the same kind of calculation for every pixel on the screen, and that goes faster when many simple cores line up and calculate at the same time. The GPU takes this kind of work off the CPU, leaving the CPU free to focus on overall control and other tasks.
AnalogyIt is like a crew painting a huge mural by giving each person one square of the grid to fill in at the same time. Each person's job is simple, but with so many hands the whole picture is finished quickly.
How to rememberThe G in GPU stands for Graphics. It differs from CPU by one letter, and that first letter tells you its specialty.
Exam points
ExamThe GPU is a processor that excels at the calculations for drawing, and its speed comes from many cores working in parallel.
GPGPU is a technique that applies the GPU's ability to carry out huge numbers of calculations at once to general-purpose computing beyond graphics.
← Scroll the figure sideways →
Work that repeats the same form of calculation an enormous number of times, such as training in machine learning or scientific computing, finishes quickly when split across the GPU's many cores. The name is short for General-Purpose computing on GPU.
AnalogyIt is like taking the big crew gathered to paint a mural all at once and having them split up the tallying of a mountain of paperwork instead. Their strength in numbers stays the same; only the kind of work spreads beyond pictures.
How to rememberIt is GPU with GP (General-Purpose) in front. Those two extra letters mean "for more than graphics".
Exam points
Mix-upGPU is the name of the device (the chip) itself, while GPGPU is the name of the technique, a way of using that GPU for general-purpose computing.
Clock frequency (クロック周波数) is the number of cycles (ticks) per second of the clock signal a processor uses to keep its operations in step, measured in Hz (hertz).
Clock frequency
Cycles per second
Length of one clock cycle
1 GHz
1 billion
1 nanosecond
4 GHz
4 billion
0.25 nanoseconds
The length of one clock cycle is the reciprocal of the frequency, and the time one instruction takes is the number of clocks it needs × the length of one clock cycle. For example, an instruction that needs 8 clocks at 4 GHz takes 2 nanoseconds each, so it can run 500 million times per second. Performance depends not only on clock frequency but also on other factors such as the number of cores and cache memory.
AnalogyIt is like the call that keeps rowers in rhythm in a boat race. The shorter the gap between calls, the more strokes fit into the same time.
How to rememberA clock tells time, and the clock signal ticks at fixed intervals like a second hand. The G (giga) in GHz means 1 billion.
Exam points
ExamThe time to execute one instruction is the number of clocks divided by the frequency, and the number of instructions that can run per second is the frequency divided by the number of clocks.
ExamThe clock is the signal that keeps the timing of instruction execution in step, and 1 GHz means 1 billion cycles per second. Among CPUs of the same design, the higher the clock frequency (クロック周波数), the faster the processing.
ExamFor the same type of CPU, raising the frequency increases heat, so cooling measures are needed. The technique of raising the frequency temporarily, only when there is headroom in heat and power consumption, is called Turbo Boost (ターボブースト).