What is a computer?
- A computer is a device that stores data in the form of binary (zeros and ones) because it is
built from transistors, which are basically switches with two conditions (ON or OFF). A
computer has both hardware (cpu, ram, motherboard, graphics card) and software
(applications) with the purpose of doing general tasks.
What is an input device?
- A peripheral that transfers data into another device to be processed
- Examples of an input device: joystick, mouse, keyboard, microphone
What is an output device?
- A peripheral that transfers data out of a device to the user to understand
- Examples of an output device: monitor, speakers, printers
Hardware:
- What is it: physical and electrical components inside a computer system
- Examples: CPU, RAM, PSU, HDD/SSD
Software;
- All the programs and applications that runs on a computer. There are two types of software;
application software and system software.
The CPU – central processing unit:
What is it: It is a piece of hardware inside a computer that does the fetch-decode-execute cycle.
Parts of the CPU:
- MAR (memory address register) – holds the address of the instruction that is being fetched
- MDR (memory data register) – holds the data that will be fetched
- PC (program counter) – holds the next memory address
, - ALU (Arithmetic Logic Unit) –carries out any arithmetic (+,-,*,/), logical (and, or, not) or shift
operations
- Accumulator – holds the value from the ALU
- CU (control unit) – decodes, and executes instructions and controls the flow of data
- Cache: tiny but super-fast memory that’s purpose is to hold frequently used instructions
The fetch-decode-execute cycle (detailed):
- The memory address is copied into the MAR from the Program counter
- Instructions are fetched from main memory
- Those instructions are then copied to the MDR
- They are then decoded by the CU and finally executed
(The cycle repeats)
Simple descriptions of the fde cycle:
- Data is fetched from main memory
- Data is then decoded and execution occurs.
Features of the CPU that affects performance:
- Clockspeed – describes the number of fetch-decode-execute cycles occurring per second but
is noted in Hertz
- Cache size – bigger cache size will mean more memory will be stored there rather than RAM,
which has a significantly slower access time
- Number of cores – more cores enables parallel processing which is when multiple CPUs are
working simultaneously and this greatly speeds up a computer performance.
Virtual memory:
Virtual memory is often needed in a computer when there is insufficient space in RAM. VM causes
data that hasn’t been used recently to be moved to a hard drive or a solid-state drive. Virtual
memory does boost a computer’s performance. However, the disadvantages of using VM, is that it is
very slow in comparison to RAM, Cache, a CPU’s registers etc.