Logic · state · instruction · memory · execution

Hardware Architecture

Computer hardware implements computation as physical state change. Digital logic stores and transforms bits, processor organization gives instructions operational meaning, and memory systems move data across layers with different capacity and access costs.

From bit to instruction

The machine is a hierarchy of contracts between physical state and symbolic operation.

Logic gates do not “understand” instructions, and software does not need to track individual transistors. Architecture connects those scales through representations and interfaces.

Instruction cycle

A stored program repeatedly turns encoded instructions into state changes.

01

Fetch

Use the program counter to identify the next instruction and move its encoded form from memory into the processor.

02

Decode

Interpret the instruction bits as an operation, operands, addressing mode, or control action defined by the instruction set.

03

Execute

Arithmetic logic, control circuitry, registers, and data paths perform the state changes required by the instruction.

04

Store / advance

Write results to registers or memory and update control state so execution can continue with the next instruction.

Execution instrument

CPU_ARCH.SIM

Von Neumann Model
FETCH
REGISTERS
PC (Counter)
0
ACC (Value)
0
CURRENT INSTRUCTION (IR)
NOP
RAM (8 Bytes)
0:LOAD
1:ADD
2:STORE
3:HALT
4:0
5:0
6:10
7:25
DATA BUS: IDLE

This simulator is a deliberately tiny accumulator machine. Real processors add wider registers, richer instruction sets, caches, pipelines, prediction, parallel execution, privilege levels, and many other structures.

Memory hierarchy · reference

Faster memory is scarce, so systems move data through layers.

Exact technology and performance change across machines and generations. The durable idea is a hierarchy balancing access cost, capacity, persistence, and locality.

01

Registers

smallest · closest

Values immediately available to the current processor core.

02

Cache

small · fast

Recently or predictably used data kept near execution to exploit locality.

03

Main memory

larger · slower

The active working set of programs and data outside the processor caches.

04

Persistent storage

largest · persistent

Long-lived data retained when power is removed, traded against much higher access cost.

Architectural principles

Performance emerges from organization, not transistor count alone.

01

Representation

Voltages and physical states are interpreted as bits; groups of bits encode numbers, instructions, addresses, characters, and other data.

02

Abstraction

Software can use an instruction-set contract without knowing transistor layout, while hardware can implement the same contract in many microarchitectures.

03

Locality

Programs tend to reuse nearby data and instructions. Memory hierarchies exploit that pattern to hide slower storage behind faster smaller levels.

04

Parallelism

Hardware can overlap or duplicate work through pipelining, multiple execution units, vector operations, multiple cores, and accelerators.