3.1 Computer Components

COS2621 - Computer Organisation · 3. A Top- Level View of Computer Function and Interconnection

Computer Components

Overview of Computer Components

A computer system consists of several key components that work together to perform tasks. These components include the Central Processing Unit (CPU), memory, input/output (I/O) devices, and buses. Each component plays a specific role in the functioning of the computer.

Central Processing Unit (CPU)

The CPU is the brain of the computer. It performs calculations and executes instructions. The CPU consists of two main parts: the arithmetic logic unit (ALU) and the control unit (CU). The ALU performs arithmetic and logical operations, while the CU directs the operation of the processor and coordinates the activities of all other components. Remember: The CPU is often referred to as the processor.

Memory

Memory in a computer is used to store data and instructions temporarily or permanently. There are two main types of memory:

  • Primary Memory: This includes Random Access Memory (RAM), which is volatile and loses its contents when the power is off, and Read-Only Memory (ROM), which is non-volatile and retains its contents.
  • Secondary Memory: This includes storage devices like hard drives and solid-state drives (SSDs) that store data permanently.

The stack is an area in memory used to save data and addresses temporarily while the program is executing. A POP operation removes a value from the stack and places it in a register or variable. This is crucial for managing function calls and local variables.

Watch out: Do not confuse RAM with ROM. RAM is temporary storage, while ROM is permanent.

Input and Output Devices

Input devices allow users to enter data into the computer. Examples include keyboards, mice, and scanners. Output devices display or produce results from the computer's processing. Common output devices are monitors and printers.

Buses

Buses are communication systems that transfer data between components inside a computer. There are three main types of buses:

  • Data Bus: Transfers actual data.
  • Address Bus: Carries information about where data should be sent or retrieved.
  • Control Bus: Carries control signals from the CPU to other components.

Example of Component Interaction

Consider the process of opening a file from a hard drive. The CPU sends a request through the control bus to the hard drive via the data bus. The hard drive retrieves the file and sends it back to the CPU, which processes the data and sends the results to the monitor through the output system.

Memory Organisation

Memory organisation can vary. For example, a system with a 10-bit address can access 1024 cells. If each cell is 8 bits, it is valid. However, an organisation with a 9-bit address and 1024 cells with a 10-bit cell size is impossible. This is because a 9-bit address can only address up to 512 cells, making it insufficient to handle 1024 cells.

Remember: The maximum number of cells that can be addressed is given by 2^n, where n is the number of bits in the address.

Check your understanding

  • What are the two main parts of the CPU?
  • Explain the difference between primary and secondary memory.
  • List three types of buses and their functions.
  • What role does the stack play in memory management?

Test yourself

5 quick questions on this lesson. Pick an answer to see if you're right.

  1. 1. Which type of memory is volatile and loses its contents when the power is off?

  2. 2. What is the primary function of the Central Processing Unit (CPU)?

  3. 3. What type of bus carries control signals from the CPU to other components?

  4. 4. The ___________ is an area in memory that is used to save data and addresses that need to be temporarily stored while the program is executing.

  5. 5. A _________ operation removes a value from the stack and places it in a register or variable.