Computer Science
Structure Of The Processor

Components Of The Processor

A processor contains the following components,

  • Control Unit - fetches, decodes, executes instructions.
  • Arithmetic & Logic Unit - performs arithmetic and logical operations on data.
  • Registers - fast, on-chip memory inside the CPU, dedicated or general purpose.
  • Internal Clock - derived directly or indirectly from the system clock
  • Internal Buses - to connect the components
  • Logic Gates - to control the flow of information

What Is A Register?

Registers are storage locations within the circuitry of the CPU. They are very fast on-chip memory storing binary values using 32 or 64 bits. Information is held there while it is being interpreted or manipulated. Registers are dedicated or general purpose.

General Purpose Registers

Can be used by programmers to store data temporarily. Some computers may have up to 16 general purpose registers (R1...R16). Processor designers have assigned no specific role to these registers.

Stack Pointer (SP)

Points to a stack data structure holding return addresses, procedure or function parameters and local variables. Used when a procedure or function is called. Also used when an interrupt is serviced. (Interrupt = a signal from a source (hardware or software) requesting the attention of the processor)

Program Counter (PC)

Holds the address in main memory of the next instruction to be executed.

AKA Sequence Control Register (SCR) or Sequence Register.

Status Register (SR)

Contains bits that are set and cleared based on the results of an instruction. Allows the CPU to store information such as the occurrence of an overflow. This information can be used to decide whether or not to branch out of a given sequence of instructions.

The Accumulator

Holds the result of the current set of calculations. The instruction ADD #25 means add the value 25 to the contents of the accumulator and store the result in the accumulator.

Current Instruction Register (CIR)

Stores operator and operand for the current instruction.

Eg LDA 1000 (Load location 1000 into Accumulator)

LDA operator what you do
1000 operand what you do it to

Memory Address Register (MAR)

Holds the address of the memory location from or to which data is to be read or written. This could be the address of an instruction to be fetched or the address of data to be used in the instruction. When fetching instructions, copies the contents of the Program Counter.

Memory Buffer Register (MBR)

AKA Memory Data Register (MDR) Temporarily stores data read from or written to memory. CPU and Memory operate at different speeds (hence buffer)

Eg LDA 1000 placed here en route to the CIR for decoding.

Operand (1000) placed in MAR. Contents of 1000 copied to the MBR.

System Clock

Every computer has a system clock. The clock is a quartz controlled oscillator supplying timing signals at a fixed rate. Other timing signals are derived from this. These signals are used to regulate the execution of instructions and to synchronise the operation of the computer components.

Clock Speed

Processors are designed to execute instructions at a particular frequency. Expressed in Megahertz or Gigahertz. Some instructions require more ticks of the clock than others.

Word Length

The word is the smallest chunk of memory that a program can refer to independently. The length of the word limits the complexity of the instruction set and the efficiency of mathematical operations.

Bus Width

This term refers to the number of parallel wires allocated to a bus. The number of wires determines how large a word can be transferred over the bus. Each wire can transfer a binary digit. Word size increases with bus width.

Factors Affecting Performance

The performance of a computer system can be measured by running standard programs on the processor and assessing the number of machine operations completed for each unit of time.

Measured in GOPS - Giga-Ops Per Second (or MOPS)

Moore's Law

Gordon E Moore - Engineer and co-founder of Intel. In 1965, for a special issue of the journal Electronics, Moore was asked to predict developments over the next decade. In reviewing past increases in the number of transistors per silicon chip, Moore formulated what became known as Moore's law: The number of transistors per silicon chip doubles each year.

Increase Clock Speed

The more transistors packed into the same space, the more heat generated by their operation. Quantum physics suggests theoretical limits on transistor size. Similarly, the higher the frequency of clock ticks, the more heat generated. Both factors place limits on clock speed.

Multicore Processors

Processors are arranged into several cores. Each core runs at a lower frequency. Multiple tasks are run at the same time on different cores or tasks are split across several cores. Multicore processors are particularly suited to multimedia work.

Increase Word Length

Typical processor word lengths are 32bit and 64bit. General purpose registers usually have a similar word length. The bigger the word length, the bigger the operands and the results. When an operand is larger than the word length, it must be split into multiple instructions, requiring more clock ticks. Word length also limits the number of storage locations that can be addressed in main memory. For this reason, there is a limit on how much memory can be addressed in a computer system with a 32bit word size.

Increase Bus Width

The system bus between the processor and main memory accounts for the worst time penalty in processing. The wider the bus, the larger the word that can be transferred along it. Where an address or instruction is wider than the bus, multiple clock ticks are required for processing.