front 1 What is the role of the Control Unit (CU) | back 1 -coordinates all activities of the CPU -directs flow of data between the CPU and other devices -accepts the next instruction, decodes it, handles its execution, and stores the resulting data back in memory or registers -Sends memory read and write requests to main memory on the control bus, |
front 2 What is the role of the program counter (PC) | back 2 -Holds the address of the next instruction to be executed. This could be: -> next instruction in a sequence of instructions -> address to jump to if the current instruction is a command to jump or branch - this would be copied from the CIR (current instruction register) -close relationship with MAR - at start of a new FDE cycle, the address held in PC is copied to the MAR |
front 3 What is the role of the memory data register (MAR) | back 3 -Holds the address of the memory location from which data or an instruction is to be fetched or to which data is to be written -sends the addresses to memory down the address bus |
front 4 What is the role of the memory data register (MDR) | back 4 -Used to temporarily store the data which is read from or written to memory -Sometimes known as memory buffer register (MBR) & nicknamed 'gateway to the processor' -all data to & from memory must travel down the data bus & pass through the MDR |
front 5 What is the role of the current instruction register (CIR) | back 5 -holds the current instruction being executed -contents of the MDR are copied to CIR if it is an instruction -contains the opcode and operand(s) of the current instruction |
front 6 what is an instruction made up of | back 6 -instruction = opcode + operand(s) -e.g. a machine language instruction to load the contents of location 1000 into the ALU may look something like: LDA 1000 |
front 7 What is the purpose of the accumulator (ACC) | back 7 -one of many general purpose registers modern CPUs have -data or information is often stored in them -CPU may have many general purpose registers for storing temporary data and instructions whilst calculations are being carried out -(generally) more general purpose registers mean the CPU can run faster |
front 8 What is the purpose of the ALU (arithmetic logic unit) | back 8 -Performs arithmetic and logical operations, on data -Arithmetic operations include: add, subtract, multiply, divide (* and / are abstractions) -Bitwise shift operations left and right -Boolean logic operations: comparisons (<, >, =), AND, OR, NOT, XOR, NAND etc. -Often uses general purpose registers to temporarily hold results of calculations, e.g. ACC |
front 9 Buses | back 9 -consist of a series of connectors (like etchings) that transfer signals between internal components -typically consist of 8, 16, 32, or 64 lines -each wire/line represents 1 bit of information |
front 10 System bus | back 10 -consists of 3 separate buses carrying control signals, addresses, and data -address bus: carries memory addresses that identify where the data is being read from or written to. Unidirectional -data bus: carries the binary 1s and 0s that make up the actual information being transmitted around the CPU/computer. Bidirectional -control bus: carries command & control signals to and from every other component of the CPU/computer. Bidirectional |
front 11 Types of control signals | back 11 -memory read: causes data from addressed location in RAM to be placed on the data bus -memory write: causes data on the data bus to be written into the addressed location in RAM -bus request: indicates that a device is requesting use of the data bus -bus grant: indicates that the CPU has granted access to the data bus -system clock: used to synchronise operations |
front 12 Relation to assembly | back 12 -although computers use binary (1s and 0s), humans prefer abstract languages that are easier to understand -at a low level, computers use assembly code, a language with a direct 1 to 1 relationship with the CPU's architecture -mnemonics are used to represent binary instructions. |
front 13 Assembly mnemonics (more on this later) | back 13 ADD - add SUB - subtract STA - store LDA - load BRA - branch always BRZ - branch if zero BRP - branch if positive INP - input OUT - output HLT - end program DAT - data location |