Components in the CPU
Control Unit (CU)
Arithmetic Logic Unit (ALU)
Memory Address Register (MAR)
Memory Data Register (MDR)
Address Bus
Data Bus
Arithmetic Logic Unit (ALU)
Performs all basic arithmetic and logical operations
Control Unit (CU)
Obtains data from memory and decodes it into instructions
Coordinates all the units of the computer
Memory Address Register (MAR)
Holds the memory of the address data to be used by the ALU
Holds address of where processed data will need to be stored
Memory Data Register (MDR)
Holds the data to be used by the ALU
Holds a copy of the contents of the memory to be transported to other components of the CPU
Address Bus
Connects MAR to primary memory (RAM)
Data Bus
Connects MDR and primary memory (RAM)
Two types of primary memory
Random Access Memory (RAM) and Read Only Memory (ROM)
Random Access Memory (RAM)
Stores data and instructions currently in use - can be overwritten
Volatile - whenever power is lost its memory is wiped
Can be written to
Read Only Memory (ROM)
Stores permanent instructions and data - info is embedded cannot be overwritten
Non-volatile
Much smaller than ROM
Holds the Basic Input / Output System (BIOS)
Cache
Stores frequently used instructions
Is used to save time in accessing the RAM, as can be accessed faster than the RAM
Situated between RAM and CPU, so closer to CPU
Very small
Static
Components of the machine instruction cycle
Fetch, decode, execute
Fetch
CPU sends address from MAR of instruction through the address bus to the primary memory (RAM)
Instruction in that particular address is sent through the data bus to the CU, stored in MDR
Decode
CU decodes instruction, fetches any required data from the primary memory
Execute
ALU executes instruction
Store
The results of the executed instruction are stored in the accumulator
Secondary memory
Relatively slow memory that can be written to
Non-volatile
Hard drives, USB sticks, Floppy disk
Operating system
Set of software that controls computer’s hardware resources and provide services for programs
Roles of an operating system
Peripheral communication - communicating directly with hardware (keyboards, mice, printers)
Memory management - manages how memory is used by applications, ensures one doesn’t interfere with the memory of another
Data management - accessing and storing data
Security
Benefits / execution of memory management
Allocates and deallocates specific sections of memory to each process
Ensures that a program has sufficient memory to run
Ensures that the memory assigned to one program is not overwritten
How colour can be represented in a computer
Split into three components (e.g RGB), and each component is given a specific number of bytes