Computer Organisation

Computer Architecture

The CPU and its elements

The CPU (Central Processing Unit) is a hardware component of a computer system and can perform basic arithmetic, logical or input/output operations in order to process data from input devices into useful information.

The CPU contains:

   
The control unit (CU) responsible for the operation of the CPU. It controls the retrieval of instructions from the primary memory as well as the sequence of their execution. It does the fetching of data and instructions in the fetch-decode-execute cycle.
The arithmetic logic unit (ALU)

performs all the basic arithmetic, logical or input/output operations. The CU is responsible for providing the ALU with the data that needs to be processed as well as the instructions of how the data should be processed.

  • The primary memory used as storage contains two types of memory - the random access memory (RAM) and the read-only memory (ROM).
  • The basic registers in the CPU are the memory address register (MAR) and the memory data register (MDR).
The memory address register (MAR) holds the address of the data (address - the specific location in the RAM) to be used by the ALU, so that the ALU can fetch the corresponding content from the memory and process it accordingly.
The memory data register (MDR)  holds the data that is to be used by the ALU and then saved to the RAM. The MAR tells us the location and the MDR finds/fetches the data. That data/connection is done using the Data Bus.

RAM, ROM, and Cache memory

The primary memory is the only storage directly accessible by the CPU. The primary may hold both data and instructions that are currently running on the computer system. These are stored as binary/machine code.

   
RAM
  • Random Access Memory
  • type of memory that can be accessed randomly (any byte of memory can be accessed without touching the preceding bytes).
  • Found in servers, PCs and other devices.
  • Volatile : all data is lost when device is turned off.

There are 2 types of RAM:

Static RAM (SRAM):

  • often used for system cache.
  • does not need to be refreshed thousands of times per second.

Dynamic RAM (DRAM):

  • memory constantly refreshed of it will lose its contents.
  • used for the main memory.
ROM
  • Read Only Memory
  • Computer memory on which data has been pre-recorded.
  • Once data has been written onto a ROM chip, it cannot be removed and can only be read.
  • Non-volatile : data is kept even when the device is turned off.
  • Used extensively in calculators and peripheral devices such as laser printers, whose fonts are often stored in ROMs.
Cache
  • A small amount of memory which is a part of the CPU used to temporarily hold instructions and data that the CPU is likely to reuse.
  • Cache saves fetching the instructions and data repeatedly from the RAM (which is a relatively slow process).
  • Effectiveness measured in hit rate.

 Cache is graded:

L1:

  • part of the CPU chip (internal)
  • smallest and fastest to access
  • size restricted to 8KB and 64KB

L2 and L3:

  • extra caches
  • longer to access than L1
  • the more L2 and L3 cache available, the faster a computer can run.


The machine instruction cycle

1. Fetch instruction from primary memory to control unit

Sends appropriate address through the memory (address) bus to the primary memory. The instructions in the address is then copied to the data bus and sent to the control unit (CU).

2. Decode instruction in control unit

Decoding allows the CPU to be aware of any additional data that are necessary for the execution of the instruction. Required data that needs to be loaded from the primary memory is fetched (back to step 1).

3. Execute instruction

The CPU executes the instruction using the necessary data that have been loaded and calculates a result. (Once again any necessary additional data is fetched and loaded from the primary memory, repeat back to step one for that new data).  

4. Store result of execution and check for next instruction

Secondary Memory

Persistent storage and Secondary memory

Secondary memory is a relatively slow memory that may be written to but is also non-volatile

∴ contents are persistent as they are not wiped if power is lost. This is why secondary memory is often referred to as persistent storage. (Higher capacity than primary memory).

Virtual memory can be defined as the use of secondary memory as if it was primary memory.

Secondary memory (storage) devices:

 

Exam-style question : State some differences between primary and secondary memory.
  • Most computers are equipped with a smaller amount of primary memory and a larger amount of secondary memory

  • Primary memory is volatile, which means it does not retain data when the power is turned off.

  • Primary memory is more expensive compared to secondary memory.

  • Primary memory is much faster than secondary memory.

  • Primary memory is directly accessed by the CPU

  • Secondary memory is not directly accessible by the CPU

  • Secondary memory is non-volatile, which means that it retains data when the power is turned off.

Operating And Application Systems

Functions of an Operating System

An Operating System (OS) is a set of software that controls the computer’s hardware resources and provides services for computer programs. It is a very important part of a computer system since it acts as an intermediary between software applications (i.e. programs) and the computer hardware. Examples include: Linux, UNIX, Microsoft Windows...

Main services that an operating system provides:

Software application

Application softwares are programs designed for the end-user that enable the completion of various tasks in order to increase productivity.

Main software applications include:

   
Word processors

A software application that is used for the production of any sort of document. It includes tools for the composition, editing, formatting and possibly printing of documents. Word processing is the action of creating documents using a word processor.

Spreadsheets

A software application that is used for the organisation and analysis of data. The data in a spreadsheet application is represented as cells, organised in rows and columns. These cells may contain numbers, text, or results of formulas that calculate and display values automatically on the basis of the contents of other cells.

Database management systems (DBMS)

A software application that manages (creates, queries, updates stores…) databases and is designed to provide an interface between users and a database.

A database can be defined as an organised collection of data. This data is organised into records and model some relevant aspect of reality. A key feature of a database is the unique key. A unique key is one (or more) specific fields that uniquely identify each record. (e.g. Student ID)

Web browsers

A software application used to access, retrieve, and present content on the World Wide Web. This content may be identified by a URI (Uniform Resource Identifier).

Email

A software application that allows for the exchange of digital messages from a single author to one or more recipient(s). The author and the recipient(s) do not need to be online simultaneously.

Computer Aided Design (CAD)

A software application that assists engineers to create, modify, analyse and optimise a design. The purpose of CAD is to increase productivity of the designer and the quality of the resulting design. CAD applications allow engineers to inspect a design from any angle or position, as they can convey much more than just shape information.

Graphic processing software

Allows a user to manipulate visual images on a computer. A user can edit an image with the use of tools in various ways, such as selecting and moving, cropping, scaling, erasing, etc.

Common features of applications

Software applications include a graphical user interface (GUI) to allow the user to interact with them in a number of ways, instead of just typing in commands. A GUI includes components such as graphical icons and visual indicators, as well as toolbars, menus, and dialogue boxes. These allow interaction between the user and the software application to be performed more smoothly through direct manipulation of the graphical elements.

Common GUI elements include:

   
Toolbar

A GUI element on which buttons, icons, menus, or other input or output element are placed.

(e.g. Microsoft Word toolbar).

Menu

A GUI element that displays a list of commands that can be chosen by the user to perform various functions.

(e.g. pressing the file button on the toolbar, with the dropdown menu).

Dialogue box

A GUI element that is used to communicate information to the user and allow him/her to respond by choosing an option from a list of specific choices.

(e.g. the “do you want to save the changes you made to Document?”).

Bit, byte, binary, decimal and hexadecimal

Bit - the smallest unit of data in a computer.

Byte - a group of 8 bits.

Binary - series of 1 and 0 going up in powers of 2. (aka. base 2).

Decimal/denary - our normal counting method (0-9) (aka. base 10).

Hexadecimal - base 16.

Boolean Operators

Logic gates and their truth tables

 

 

Editors

View count: 10123