Chapter 1 - components of a computer Flashcards
what is the CPU?
Central Processing Unit, aka. the processor, is the controlling processor of the computer which executes instructions
what are the 3 main elements of the CPU?
- ALU
- Control unit
- Registers
what is the ALU?
- Arithmetic Logic Unit
- performs arithemetic and logical operations on data - eg. normal arithmetic, shift operations, boolean logic operations by comparing 2 values
What is the control unit?
- controls and coordinates the activities of the CPU, directing the flow of data between the CPU and other devices - makes sure instructions execute correctly
- accepts next instruction, decodes it into several sequential steps (eg. fetch addresses/data from memory) manages execution + stores resulting data back into memory/registers
what are registers?
- they are special memory cells where a single item of data can be stored
- very high speed area of the CPU
- results of all arithmetic, boolean and shift operations are stored in a register - they have to be in one in order to be called upon
- typically up to 16 general purpose registers in the CPU
- increasingly being slowed down by the speed of light
what are some typical special registers?
- program counter (PC) - holds the address of the next instruction to be executed (next in sequence or when branched)
- Memory address register (MAR) - holds the address of the memory location currently in use - data to be fetched from/written in
- memory data Register (MDR) - temporarily stores data read from or written to memory (aka. memory buffer register)
- Current Instruction Register (CIR) - holds current instruction being executed (divided into opcode and operand)
- Accumulator - stores results of calculations processed by CPU, takes the place of general registers
what is a bus?
It is a set of parallel wires connecting 2 or more components of a computer to another. It typically consists of 8, 16, 32. or 64 lines
What are the 3 types of bus?
- data bus
- address bus
- control bus
what is a data bus?
It is a bi-directional path for moving data and instructions between processor components and memory
What is an address bus?
every word in memory has its own specific memory address. When data is to be saved to/loaded from memory, the address of the location it needs to be stored in/retrieved from must be sent along the address bus. It is uni-directional.
what is a word?
a fixed group of digits, usually 16, 32, or 64 bits, which is handled as a unit by the processor
what is a control bus?
- it is a bi-directional bus that makes sure that access to and use of data and address buses between different components of the system does not lead to conflict.
- It’s purpose is to transmit command, timing and specific status information between components - basically make sure everything is executed at the right time and order.
- example control line = Interrupt request, clock
what is the fetch-decode-execute cycle?
It is the sequence of operations involved in executing an instruction. It can be divided into 3 phases - fetch, decode and execute
describe the fetch decode execute cycle
- PC holds the address of the next operation
- copy contents of PC into MAR
- Increment PC
- Load instructions at MAR address into MDR
- Copy instructions from MDR to CIR
- Decode instructions in CIR (done by control unit) - break down into opcode and operand
- Execute instruction
What is opcode?
The part of an instruction that determines the type of instruction it is and what hardware to use
what is the operand?
the part of the instruction which holds either the address of data to be used in the operation; or actual data to be operated on.