Page cover

CPU Architecture

The Central Processing Unit (CPU) is the main processing unit within a computer.

CPU

The CPU contains both the Control Unit or CU which is responsible for controlling and moving data and the ALU or Arithmetic/Login Unit is in charge of performing arithmetics and logical calculations.

RISC architecture is based on processing more simple instructions, it will take more cycles, but each cycle is shorter and takes less power.

RISC = Reduced Instruction Set Computer

Clock speed & clock cycle

Processor clock speed measures the number of cycles a CPU can execute per second, measured in Hertz (Hz).

Every tick of the clock is a clock cycle that processes a basic instruction. Counting cycles per second is done in Hertz so when a CPU has a speed of 4.0 GHz it runs 4 billion cycles per second per core. Processor have multi-core design, allowing them to have multiple cycles at the same time.

Instruction cycle

An Instruction Cycle is the cycle it takes the CPU to process a single machine instruction and consists of four layers.

1

Fetch

Takes next instruction's address from IAR or Instruction Address Register.

2

Decode

Takes instruction from IAR and decodes from binary.

3

Execute

The operands, both source and destination, are fetched from memory or registers.

4

Store

Store values in destination operand or memory location

Each instruction cycle takes multiple clock cycles to finish, depending on the CPU architecture and complexity of the instruction. Once 1 intstruction ends, it increments to the next and so on.

Processors

Different processors understand different machine code instructions. This is due to their unique Instruction Set Architecture (ISA). The same machine code can mean different things on different processors. Even within the same ISA, there can be multiple syntax variations for the same instruction.

Last updated

Was this helpful?