3. hardware Flashcards
what is the cpu
An integrated circuit which accepts data input into the computer and processes it into information ready for output.
what is a microprocessor
An integrated circuit which accepts data input into the computer and processes it into information ready for output. Sometimes used interchangably with Central Processing Unit (CPU), but not all microprocessors are CPUs.
what are the components of a cpu
control unit
arithematic logic unit
registers:
-pc
-mar
-mdr
-cir
-acc
buses:
-control bus
-address bus
-data bus
control unit
manages the other components of the CPU and the overall operation of the CPU. This includes initiating each step of the fetch-decode-execute cycle and managing the Arithmetic Logic Unit
arithmetic logic unit
responsible for carrying out mathematical calculations or logical operations, uses the Accumulator (ACC) register to temporarily store data while performing these calculations.
what are registers
small areas of storage found within the CPU. The register size depends on the CPU model, Registers are extremely fast to access because they are located directly within the CPU.
PC register
holds the address (memory location) of the next instruction to be fetched.
MAR register
used when reading data from RAM or writing data to RAM. The MAR will contain the address of the RAM location to be written to or read from.
MDR register
used when reading and writing data to and from RAM. The MDR will contain the data to be written to RAM, or the data that has just been read from RAM
CIR register
holds the instruction which is currently being decoded or executed.
ACC register
used to hold the data being worked on by the ALU
what are buses
A bus is a way of communicating between two components, there are three which carry different type of data
address bus
carries addresses from the Memory Address Register to RAM, to indicate which address will be selected. The address bus is a unidirectional bus – it only carries addresses in one direction (to RAM).
control bus
A communication channel that carries control signals within the CPU and between the Control Unit of the CPU and RAM.
data bus
During a write operation, the data bus carries the data to be written from the Memory Data Register to RAM. During a read operation, the data bus carries data from RAM to the Memory Data Register. The data bus is bidirectional – it carries data to and from RAM.
what is the fetch decode execute cycle
a simple cycle to run programs
basic steps in the fetch decode execute cycle
Fetch: An instruction is fetched from RAM to the CPU.
Decode: The instruction is ‘decoded’ by the Control Unit (CU) to determine what type of instruction it is.
Execute: The instruction is executed. This is usually performed by the Arithmetic Logic Unit (ALU). Some instructions may involve reading additional data from RAM (for example, reading a number which is to be added to a value in a register). Executing an instruction will also often include storing the result.
describe the fetch procedure
The Program Counter (PC) contains the address of the next instruction.
The contents of the PC are copied to the Memory Address Register (MAR).
The PC is incremented by 1, so that it still points to the next instruction.
The address bus carries the value in the MAR to RAM.
The control bus sends a ‘read’ signal to RAM.
The data bus carries the contents of the desired RAM address from RAM to the Memory Data Register (MDR).
The contents of the MDR is copied to the Current Instruction Register (CIR).
describe the decode procedure
The Control Unit (CU) decodes the instruction in the CIR.
describe the execute procedure
The instruction is sent to the Arithmetic Logic Unit (ALU) to be executed.
The ALU may use the Accumulator (ACC) to temporarily store its results.
what affects cpu speed
clock speed number of cores and size of cache
clock speed
speaking, the clock speed determines the number of cycles a CPU can perform each second,Higher clock speeds generate more heat and use more energy slowing down cpu performance
cores
A core is a processor within a CPU.a single core can only work on one instruction at a time. This limited the performance of earlier CPU designs
cache
extremely fast memory that is located within the CPU. It is used to store temporary copies of the data in the most commonly accessed RAM locations
what are instruction sets
An instruction set is a list of all the commands that can be processed by a CPU and the commands are machine code