Topic 2 - Computer Organisation - Student Booklet
Computer Organisation
The ENIAC in the Army’s Ballistic Research Laboratory. (L: Glen Beck, R: Frances Holberton) Credit: K. Kempf "Historical Monograph: Electronic Computers Within the Ordnance Corps," U.S. Army Photo.
Figure 1 - Intel Core i7-3960X Processor
Central Processing Unit (CPU)
Arithmetic and Logic Unit (ALU)
Control Unit (CU)
Registers
Memory Address register (MAR)
Memory Data Register (MDR)
Bus
The CPU acts as the brain of the computer. It carries out the instructions for input and output processes and arithmetic and logical operations. It is generally an integrated circuit printed on a silicon chip called a microprocessor. (Figure 1)
Two important elements of the CPU are the arithmetic and logic unit (ALU) and the control unit (CU).
The ALU carries out all the arithmetic and logical operations
Performs the following operations:
ADD, SUBTRACT, AND, OR, NOT
Contains registers for storing temporary data
Input quantities relate to the word size of the computer (eg. 32bit or 64bit)
Manages the ALU
Controls communication between CPU and memory
Step by step processing
Contains registers such as:
Instruction register (stores the current instruction)
Program counter (stores the address of the instruction)
Registers are very small, extremely fast blocks of memory within the CPU. There are many registers in the CPU some of which can be seen in the Figure 2 below.
Figure 2 - CPU diagram
There are two registers you need to know about for your exams. The memory address register and the memory data register. The CPU contains buses for transmitting data. The address bus will transmit information about where things are located and the data bus will transmit the data from the appropriate address.
The MAR is connected to the address bus.
The MAR is how the CPU communicates with the address bus.
The MAR can hold either an instruction address or a data address.
The MDR is connected to the data bus.
Data can go in both to and from memory,
The MDR can load its data from:
the data bus (for reading data)
one of the CPU registers (for storing data.)
You may be asked to reproduce a block diagram of the CPU and associated memory in the exam. One can be seen in Figure 3 below.
Figure 3 - Block diagram of CPU and main memory
Random Access Memory (RAM)
Read Only Memory (ROM)
Volatile
Non volatile
BIOS
Primary memory or main memory is another name for RAM (and ROM). It is primarily used to hold temporary data that is being processed by the computer.
RAM
Random Access Memory
Volatile
When the power is switched off all memory disappears.
ROM
Read Only Memory
Non volatile
When the power is switched off the memory remains.
Figure 4 - Corsair DDR3 RAM
Data can be written to and read from memory very quickly
RAM acts as temporary storage and working space for the operating system and its applications.
RAM takes the form of integrated circuits attached to the motherboard in slots (Figure 4).
Figure 5 - BIOS
Read Only Memory (ROM) is used to store instructions and data that will "never" change.
Typically the ROM in a computer contains instructions that control how a computer starts up, reads input, and writes output (BIOS)
The BIOS (basic input output system) contains the instructions necessary to boot the computer. In practice this is not strictly ROM as its contents can be altered (Figure 5).
Cache
Cache hit
L1,L2,L3
Cache is a small, very fast, memory that stores the data from frequently used main memory addresses.
It lies between the CPU and main memory.
Cache is used by the CPU to reduce average memory access times.
There are different types of cache (eg. L1, L2 and L3).
Request made from CPU.
Cache is checked for the data.
If found - data returned from cache (cache hit).
Else (cache miss) - information returned from main memory.
As cache memory is able to be accessed much faster than main memory any cache hit will produce an increase in the speed of operations. There is an additional costs however when there is a cache miss as more than one memory must be checked. However this is normally offset by good processor design. The question then is why do we not make all main memory out of cache memory? The answer to that is generally a cost issue. The table below shows the comparison of speed, size and cost for computing memory types.
Machine Instruction Cycle
Data bus
Address bus
Fetch
Decode
Execute
Store
Instructions are processed under direction of the control unit in step-by-step manner.
There are four fundamental steps in the instruction cycle:
Fetch instruction
Decode instruction
Execute
Store result
Obtain next instruction from memory.
Load instruction into instruction register IR.
MAR is loaded with instruction pointer.
The instruction is loaded through the MDR.
Increment processor counter PC
The instruction in the instruction register (IR) gets decoded.
Code for the instruction is executed by the ALU.
Results of instruction written to memory.
Secondary storage deals with the storage of data in a known place so that we can access it at a later date. Secondary memory is non-volatile and the memory is persistent even when power is no longer supplied.
The storage device is sometimes fixed such as the hard disk of a computer or is removable such as a CD-ROM.
The business of access types and speeds, different devices, relative costs and so on is dealt with here:
http://www.igcseict.info/theory/3/access/index.html
Multitasking
Device drivers
Memory management
File management
User interface
GUI
CLI
Security
Networking
An operating system is a type of software that manages the operation of the computer. The operating system sits between the hardware and the application programs..
It is generally responsible for managing a number of areas of the system such as:
Kernel
File management
Memory management
Multitasking
Interrupts
Device drivers
Virtual memory
User interface
Security
Networking
This means running multiple programs on the same computer.Since computers can generally do only one or two things this is accomplished by time sharing.
The operating system is responsible for the management of peripherals such as printers, monitors, graphics cards etc. This is often done through device drivers which are programs that allow the OS to control the hardware.
The operating system is responsible for managing the memory of the system to ensure that there are no conflicts of memory usage between all the currently running programs and processes.
This can sometimes involve using virtual memory where a portion of the disk drive is used as primary memory. This has major drawbacks as the speed of a hard disk is several orders slower than main memory.
This is a central feature to operating systems allowing files to be stored in hierarchy of directories or folders in a directory tree.
Common systems include NTFS, FAT32, ext3.
The most common forms of interface are the Graphical User interface (GUI) and the command line interface (CLI).
GUI
A GUI is normally built around visual (graphical) elements and is characterised by the acronym:
WIMP
W - Windows are used to display information
I - Icons are small pictures used to grahically represent an element eg. a folder
M - Menus are used to provide the user with choices eg File>Save as..
P - Pointer is an arrow (or similar) that can be moved around the screen to select things.
CLI
Command line interfaces were most prevalent some time ago when computers were not as powerful. The advantage of such interfaces is that they use very little memory compared to a GUI and the commands can offer a greater range of control than most GUIs the disadvantage is that they require a more expert approach as all commands for even simple operations need to be known.
Operating systems handle security in a number of ways.
1. Account privileges can be set up to provide different users access to varying levels and authenticated with such methods as username and password/biometrics/smart cards etc.
2. Recording of user activity e.g. who opened what file and when.
Modern OS's support a variety of networking protocols, hardware and applications so that they can communicate with different OSs.
Word processors
Spreadsheets
Database management systems
Web browsers
Computer aided design (CAD)
Graphic processing software
There are a variety of features that are common to many applications. These are described below.
A toolbar is a GUI widget containing icons menus buttons or text. toolbars are seen in many types of software such as browsers and graphic manipulation software.
In a graphical user interface the dialogue box is a window that allows the user to interact. It may be in the form of an alert or just provide information or request the user too make a choice.
"GUIs use a consistent visual language to represent information in computers."
This is generally conveyed by the acronym WIMP. Windows, Icons, Menus, Pointing devices.
Bit (b)- A unit of information expressed as either a 0 or 1 in binary notation (A binary digit).
Byte (B) - It is generally accepted that the term byte refers to 8-bits taken together.
There are three important number systems you need to know for this course. They are binary, decimal (denary) and hexadecimal. You are probably most familiar with the decimal system which utilises 10 symbols to represent each digit. namely 0 1 2 3 4 5 6 7 8 9. This system is referred to as base 10. Similarly binary is base 2 and hexadecimal is base 16. This can be seen in the table below:
The following table shows you how to count to 20 in each system.
Binary
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
10000
10001
10010
10011
10100
Decimal
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Hexadecimal
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
10
11
12
13
14
Strings can be made up of letters number and symbols. Spaces are also allowed. For example
“HaXX0r_111!!!111”
“2468WDwa$%”
“Harry”
“enquiries@helpdesk.com”
“123ABc”
An integer is a whole number it has no decimal or fractional parts. An integer can be positive or negative. For example:
23
7
457
-35
In programming terms a character or char is a single character. For example:
char gender = “m”
Bit mapped images are made up of a number of pixels. We can use 3 Bytes (24 bits) to represent the colour of each pixel. Each colour is made up of a combination of the three primary colours red, green and blue component (rgb). When working with colours we use the hexadecimal system for convenience as it is a more shorthand way of representing the colour. For example:
A red pixel will have the following colour components
You can see that it is easier and more convenient (for humans) to represent the colour in hexadecimal as opposed to binary.
111111110000000000000000
FF0000
See 2.1.12
AND
OR
NOT
NAND
NOR
XOR
The output is true when A and B is true.
The output is true when A is false and B is false
The output is true when A is true or B is true, or both are true.
NOR
The output is true when A is false or B is false, or both are false.
The output is true when A is true or B is true (Note the “or both” condition does not apply).
The output is true when the input is false (unary operator).
A
0
1
Z
1
0
Michael Brooke
Published by Google Drive–Report Abuse–Updated automatically every 5 minutes