Basic Computer Architectures
The notes for Computing Machinery - Basic Computer Architectures
Basic Computer Architectures
- High-Level Architectures
- A Basic Computer System
- Diagram
CPU
- Heart of any computer system
- Usually contained on a single microprocessor chip
- E.g. Sun SPARC \ Motorla 68040 \ Intel Pentium
- Executes instructions (i.e. a program)
- Controls the BUS (the transfer of data across BUS)
- Components (3 Parts)
Control Unit (CU)
Directs the execution of instructions
- Loads an Operation Code (opcode) from memory (
RAM
) into an instruction register. - Decodes opcode to ideantify the operation.
- If necessary, transfers data between memory and registers.
- If necessary, directs the
ALU
to manipulate data in registers.
Arithmetic Logic Unit (ALU)
Performs arithemtic and logical operations on data stored in registers.
- E.g. Add numebers stored in 2 source registers, and store the result in a destination register.
- E.g. Do a bitwise AND using data in 2 registers
Internal Registers
Binary Storage Units
within the CPU
May Contain:
- data
- addresses
- instructions
- status information
E.g. The
Program Counter (PC)
contains the address in aRAM of the current instruction- Is incremented to perform the next instruction
- E.g. The
Status Register (SR)
contains information about the result of the previous instruction- i.e. Overflow, or Carry
- Basic CPU Architectures
- Stack Machines
- Accumulator Machines
- Load / Store Machines
Stack Machines
//Pic Here
- Operands for an instruction are poped from the top of stack
- Results are pushed onto the top of the stack
- Memory can be loaded through the MDR to the top of the stack, and vice versa
Accumulator Machines
//Pic Here
- Operands for instruction come from the ACC and from a single location in RAM
- Results are put into the ACC
- The ACC can be loaded or stored to or from memory
Load / Store Machines
// Pic Here
- Most instructions operate on Registers. not RAM
- Registers are more quikckly accessed then RAM
- Typical sequence
- Load Registers from memory
- Execute an instruction using towo source registears, putting the result into a destination register
- Store the result back into memory
Instruction Cycle
- Also called the
fetch-execute
orfetch-decode-execute
cycle - The CPU executes each instruction in a series of small steps
- Fetch the next instruction from memory into the
Instruction Registers(IR)
Programs Counter(PC)
contains its address in RAM
- Increment PC to point to the next instruction
- Decode the instruction
- Fetch the next instruction from memory into the
System Clock
- Generates a
Clock Signal
toSynchronize
the CPU and other clocked devices - Typical rate: 1 GHz
Random Access Memory (RAM)
- Acts as
Primary Memory
for computer- can read from and written to
- Is
VOLATILE
(data disappears when power off) - Is used to store program instructions and program input, output, and temporary (scratch) values
- Consists of a sequence of
addressable
memory locations- Each location is typically
ONE BYTE LONG
// Pic Here
- Each location is typically
- Typical Size: 2 GB
- In a
Von Neumann Architecture
, RAM contains both data and programs (instructions)- A
Harvard Architecture
uses seperate memories for data & programs
- A
Bus
- Is a set of parallel data / signal lines
- Is used tO transfer information between computer components
- Often
Subdivided
into address, data & control busses
// Pic Here
Address Bus
:- Specofoes a memory location in RAM, or a memory maped I/O device
- Typical Size: 32 bits
Data Bus
:- Used for bidirectional data transfer
- Typical Size: 32bits
Control Bus
:- Used to control or monitor devices connected to the bus
- E.g. read/write signal for RAM
- Used to control or monitor devices connected to the bus
- An expansion bus may be connected to the computer’s local bus
- Makes it easy to connect additonal I/O devices to the computer
- Example bus Standards: SCSI \ Firewire
Secondary Memory
- Is
Non-Volatile
, read/ write memory - Usedf for semi-permanent storage of data and programs
- Usually hard disk drives are used fo secondary storage
Peripheral Devices
- Allow communication between the computer and external environment
Input Devices
- Keyboard
- Pointing devices: mouse, trackball, joystick, etc.
- Microphone
- Scanner
Output Devices
- Monitor
- Printer
- Speakers
I/O Devices
- Hard Disk Drive (Typical Size: 400 GB)
- Optical Storage devices (CD-RW, DVD-RW)
- Modem
- Connections to networks
To be continued…