Components of a Computer
Back To OverviewThe Arithmetic Logic Unit (ALU) carries out arithmetic and logical operations on data. The results of its calculations are stored in the accumulator.
The Control Unit (CU) decodes instructions, sends signals to co-ordinate the operations of the processor, synchronises the flow of data around the CPU, and manages the execution of instructions.
The Program Counter (PC) stores the address of the next instruction to be executed. Its value is sent to the MAR and is then incremented by one.
The Accumulator (ACC) stores the results of calculations carried out by the ALU.
The Memory Address Register (MAR) stores the address of the next location in memory to be read from or written to, e.g. the address of the next instruction, copied from the PC.
The Memory Data Register (MDR) temporarily holds data that has been read from / is to be written to main memory, acting as a buffer, e.g. stores the instruction held at the address specified in the MAR (copied from the PC), and copies it to the CIR.
The Current Instruction Register (CIR) holds the instruction currently being decoded / executed. The instruction is split into an opcode (what operation to carry out) and an operand (the data / the location of the data to carry out the operation on).
A bus is a set of parallel wires connecting two or more components of a computer.
The data bus carries data between the processor and main memory. It is bi-directional.
The address bus carries the address of the memory location being read from or written to.
The control bus transmits control signals from the CU to synchronise / manage the operations of the processor.
The stages of the fetch-decode-execute (FDE) cycle are:
Fetch:
- The address of the next instruction is copied from the PC to the MAR.
- The address of the next instruction is placed on the address bus and the CU instructs a memory read operation.
- The instruction stored at that address is transferred from main memory to the processor via the data bus, and stored in the MDR.
- Simultaneously, the contents of the PC are incremented by one, so that it contains the address of the next instruction to be fetched.
- The contents of the MDR are copied to the CIR.
Decode:
- The CU decodes the instruction held in the CIR.
- The instruction is split into an opcode, to determine the type of instruction, and an operand, to determine what data to carry the operation out on. Any additional data (if needed) is fetched from main memory.
Execute:
- The appropriate instruction is carried out on the operand.
The cycle is then repeated.
The clock produces electric signals, oscillating between 0 and 1, to synchronise the operations of the processor. All processor activities begin on a clock pulse (although may take more than one clock cycle to complete). So, the higher the clock speed (the number of clock cycles per second), the faster instructions can be executed.
Theoretically, each core of a CPU is able to process a different instruction simultaneously. So, roughly speaking, the higher the number of cores, the more instructions the processor can execute at once, and so the more efficient it is.
However, doubling the number of cores does not double the speed; time must be spent organising which core receives which data and instructions, and the performance of a multi-core processor depends on the nature of a required task (whether or not it is possible to split a task into subtasks that can be processed in parallel).
Multi-core processors can be used for multitasking - different cores can run different applications.
Cache is a small amount of very fast memory in the CPU which stores frequently used data and instructions.
Accessing data from cache is much quicker than from RAM, so the larger the cache, the more instructions will be fetched from cache instead of RAM, and so the quicker the processor.
There are different levels of cache; level 1 is the fastest, but the smallest, and level 3 is the slowest, but the largest. The faster the cache, the quicker data / instructions can be fetched, increasing the speed / efficiency of the processor.
With pipelining, whilst one instruction is being executed, another can be decoded, and another can be fetched. This allows instructions to be executed more quickly, improving processor performance.
However, programs that involve lots of branching may not benefit from pipelining so much, since the wrong instructions may be fetched or decoded, meaning the pipeline would need to be flushed.
In von Neumann architecture, both data and instructions are stored in the same memory unit, and are accessed using the same bus.
On the other hand, in Harvard architecture, data and instructions are held in separate memory units, and are accessed using different buses.
| von Neumann | Harvard |
|---|---|
| Used in general purpose PCs | Used in digital signal processing, microcontrollers and embedded systems |
| One bus for data and instructions is a bottleneck | Separate buses allow for parallel access to data and instructions |
| One bus allows for a simpler (and therefore cheaper) control unit | Control unit for two buses is more complex and expensive |
Contemporary processor architectures often incorporate aspects of both von Neumann and Harvard architectures.
| RISC (Reduced Instruction Set Computer) | CISC (Complex Instruction Set Computer) |
|---|---|
| Small instruction set | Larger instruction set |
| Only very simple instructions are available | Instructions that perform complex tasks are available |
| Simple processor design | Complex processor design |
| Hardware is cheaper | Hardware is more expensive |
| Consumes less power | Consumes more power |
| Instructions take the same number of clock cycles to execute | Instructions take varying numbers of clock cycles to execute |
| Pipelining is possible | Pipelining is not possible |
| Programs run quicker | Programs run slower |
| Code is longer, and so requires more RAM to store instructions | Code is relatively short, so very little RAM is required to store the instructions |
| Used in laptops and PCs | Used in embedded systems |
A Graphics Processing Unit (GPU) consists of thousands of small efficient cores designed for parallel processing. They are good at performing the same instruction on many pieces of data at once.
This means that GPUs are suitable for many things, such as: graphics processing, data mining, machine learning, audio processing, modelling physical systems and financial transactions.
Parallel processing is when multiple computations are carried out simultaneously. For example, the same operation may be carried out on many pieces of data at once, or different instructions may be carried out on different pieces of data simultaneously.
Multicore processors have multiple cores on a single chip so that the workload can be distributed across multiple cores in order to improve performance.
Whilst parallel processing can greatly improve performance in some situations (e.g. adding a billion numbers together), in others it offers no benefit (e.g. calculating the Fibonacci sequence, since each result depends on the previous).
Input devices are peripherals that allow data to be inputted into a computer system.
| Input Device | Purpose |
|---|---|
| Keyboard | Allows a user to enter character data |
| Mouse | Allows a user to point and click to select icons or position the cursor on a screen |
| Trackpad | Same as a mouse |
| Graphics tablet | Allows a user to create drawings with a stylus |
| Microphone | Captures voice data, often used with voice recognition software |
| Flatbed scanner | Allows a user to scan a document and save it as a digital image |
| OMR (Optical Mark Recognition) Scanner | Used for multiple choice test papers to input the marks a candidate has made |
| Magnetic stripe card reader | Reads data from a magnetic stripe on a card (e.g. door access card) |
| Smart card reader | Reads data from an integrated circuit chip (e.g. a bank card) |
| NFC reader | Reads data from an NFC tag (e.g. a travel card) |
| Touchscreen | Allows a user to use their finger to select icons, use an on-screen keyboard, etc. |
| Fingerprint scanner | Used with fingerprint recognition software to authenticate users |
| Sip/puff switch | Allows the user to control computer systems by drawing or blowing air into a sensor reader |
| Foot switches | Allows the user to control input to a system through a series of pedals |
| Braille keyboard | Same as a keyboard, but the keys have two raised representations of characters, the printed character and its Braille equivalent |
| Digital camera | Used to capture images |
Output devices are peripherals that produce or display data and information from a computer system.
| Type of printer | Description | Advantages | Disadvantages | Typical Uses |
|---|---|---|---|---|
| Inkjet printer | Uses liquid ink to produce black-and-white or colour prints | Liquid ink produces rich colours, low upfront cost | Liquid ink can be incredibly expensive, takes longer to print | Home use, photographers, print studios |
| Laser printer | Uses powdered ink called toner | Faster than inkjet printers, toner is cheaper and lasts longer than liquid ink, very good quality output when printing text | Toner cartridges are quite large, printers can be bulky and take up a lot of room, poorer print quality for images; difficult to produce deep, rich colours | The workplace |
| Plotter | Uses one or more pens to draw an image | Produces very precise drawings, can handle very wide paper | Can be a very large device | Engineering and architectural practices |
| 3D printer | Uses filament extruded at heat and applied to precise locations. | Allow you to make one-off / custom items | Can be expensive, may take a long time to print | Manufacturing, schools, scientists |
| Output Device | Description |
|---|---|
| LCD display | Contains groups of red, green and blue diodes to form each pixel, requires backlighting |
| LED display | Uses less power than LCD displays, allows screens to be thinner in construction (due to the small size of LEDs), produces a sharper image, produces little heat |
| OLED display | Does not require a backlight, activated using an electric current, uses plastic rather than glass, allowing for curved screens and is lighter, emits birghter light, consumes less power, produces less heat, larger field of view, suitable for mobile devices |
| Speakers | Allows the user to hear output from a device, can be used with screen readers or text-to-speech utilities |
| Refreshable Braille display | Displays characters as a series of dots formed by pins that protrude through the flat surface of the device |
Secondary storage provides persistent storage for data files and applications.
On a magnetic hard disk drive, data is represented as a series of magnetised / non-magnetised states on a platter, broken down into concentric tracks and sectors. Data is read using an actuator arm with a read / write head that moves as the platter spins, in order to access different tracks and sectors.
In solid state or flash storage, data is stored in NAND flash memory cells, which can either contain a trapped charge or not.
In optical discs, data is represented as pits and lands arranged in a spiral. To read from the disc, a laser is shone onto it as it spins, which is either reflected or scattered, depending on whether a pit or a land is present. A sensor is used to detect changes in this reflection.
| Type of Optical Disc | Typical Capacity | Transfer Rate | Typical Use |
|---|---|---|---|
| CD | 700MB | 150kB/s | Audio files |
| DVD | 4.7GB | 1.3MB/s | Digital videos |
| Blu-ray | 25GB | 36MB/s | High-resolution films |
| Type of Optical Disc | Description |
|---|---|
| CD/DVD-ROM | Read-only memory - was once popular for distributing music, films and application software. |
| CD/DVD-R | Recordable - can only be written to once. Was once popular for archiving data. Archiving means making a permanent copy, so it requires a storage medium that cannot be overwritten. |
| CD/DVD-RW | Rewritable - was once popular for backing up computer files. Backing up means making a temporary copy, so it requires a storage medium that can be overwritten at some point in the future. |
| Type of Storage | Advantages | Disadvantages | Typical Use |
|---|---|---|---|
| Magnetic disk |
|
|
Desktop PCs |
| Solid-state disk |
|
|
Laptops and other portable devices (e.g. mobile phones) |
| Optical storage |
|
|
Storing games, films, music or application software |
Random Access Memory (RAM) is used to store programs and data currently being used. It is volatile (loses its contents when power is lost), and can be both read and written to. Each memory location can be accessed directly by the processor, so it takes the same time to access any memory location.
Read-only memory (ROM) is a small amount of non-volatile memory that stores the BIOS of a computer. It can be read, but not written to. The BIOS checks that the core components of the computer system are connected and responding correctly, and loads the OS from secondary storage into RAM.
Virtual storage is when data is stored remotely, e.g. cloud storage or NAS (network attached storage) devices.
Some advantages of virtual storage are that: data can be accessed at any time from any device from almost any location, data can be easily shared without the use of removable media, large amounts of storage are available, easy to collaborate, security is someone else's responsibility.
However, there are also some disadvantages: you must have an internet connection in order to access your files, if connectivity is poor, access times can be slow and it can become quite expensive.