








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









𝄡 Computer Architecture ● A science which determines how a computer works ● A set of rules that state how computer hardware and software work together to make a computer work ● A description of the structure of a computer system ● Three main categories: ○ System design – (actual computer system) includes hardware parts: CPU, data processors, multiprocessors, memory controllers, direct memory access ○ Instruction set architecture (software that runs a computer) – includes a CPU’s functions and capabilities, programming languages, processor register types and instructions. ○ Microarchitecture (this defines the data processing and storage element or data paths) – includes storage devices and related computer organisation. 𝄡 The Von Neumann Architecture (stored program concept) Three Characteristics for designing and building computers:
𝄡 Main components of the processor (CPU) Component Description Arithmetic Logic Unit (ALU) > Allows the required arithmetic or logic operations
A computer can have more than 1 ALU Control Unit (CU) > Reads an instruction from memory Instruction is then interpreted Ensures synchronisation of data flow and program instructions throughout the computer System Clock > Used to produce timing signals on the control bus → Ensures synchronisation Computer would crash without it Immediate Access Store (IAS) > Holds all data and programs @ Primary (RAM) memory
𝄡 Memory subsystem ● Also called RAM (Random access memory) ● Consists of many memory cells (storage units) of a fixed size ○ Each cell has an address associated with it ● All accesses to memory are to a specified address ○ A cell is the minimum unit of access ● The time it takes to fetch/store a cell is the same for all cells ● When a computer is running, both: ○ Program ○ Data (variables) ...are stored in the memory 𝄡 RAM ● Needs to distinguish between the address and content of a memory cell ● Memory width ( W ): ○ each memory cell contains 8 bits ● Address width ( N ): ○ Number of bits = maximum memory size ??? address space ○ If address width is N-bits, then the address space is 2N(0,1,..,2(N-1) ) 𝄡 Memory size/speed ● Typical memory in a personal computer (PC): 64 MB – 256 MB ● Memory sizes Kilobyte (KB) = 210 bytes Megabyte (MB) = 220 bytes Gigabyte (GB) = 230 bytes ● Memory Access time: 50-75 nanoseconds
(1) Operations on Memory ● Fetch (address) ○ Fetch a copy of the content of a memory cell with a specific address. ○ Non-destructive, copies value in memory cell. ● Store (address, value) ○ Stores the specific value into the memory cell with a specific address. ○ Destructive, overwrites the previous value of the memory cell. The memory system is interfaced via: ○ MAR ○ MDR ○ Fetch/Store signal Structure of the memory subsystem ● Fetch (address) ○ Loads address into MAR ○ Decode address in MAR ○ Copies the content of the memory cell with specified address into MDR. ● Store (address, value) ○ Loads address into MAR ○ Loads value into MDR ○ Decodes address in MAR ○ Copy the content of MDR into the memory cell with the specified address.
(3) The ALU Subsystem ● The ALU performs… ○ Mathematical operations ○ Logic operations ● In today’s computers integrated into the CPU consists of: a. Circuits to do the arithmetic/ logic operations b. Registers to store the results c. Bus that connects the two Structure of the ALU ● ALU circuitry: ○ Contains an array of circuits to do mathematical operations ● Registers: ○ Very fast local memory cells that store operands of operations and intermediate results. ○ Condition code register (CCR), a special purpose register that stores the results of <, =, > operations. ● Bus: ○ Data path interconnecting the registers to the ALU circuitry.
(4) The Control Unit (CU) ● Program is stored in memory as machine language instructions (in binary) ● The task of the control unit is to execute programs by repeatedly: ○ Fetch the next instruction to be executed from memory. ○ Decode it, determine what is to be done. ○ Execute it by issuing appropriate signals to the ALU, memory and I/O subsystems. ○ Continue until the HALT instruction. Structure of the control unit ● PC (program counter) ○ Stores the address of the next instruction that is to be fetched ● IR (instruction register) ○ Stores the instruction fetched from memory ● Instruction decoder: ○ Decodes instruction and activates the necessary circuitry
How does this all work together? Program execution: ● The PC is set to the address where the first instruction is stored in memory. ● Repeat until HALT instruction or fatal error Fetch instruction Decode instruction Execute instruction End of loop
Use of interrupts in fetch-execute cycle ● A special register called interrupt register is used ● If interrupt occurs during fetch-execute cycle, status changes occur in interrupt register