Computer organisation and architecture Flashcards
What is a computer system?
A network of connected hardware and software that makes up a functional computer.
Every system consists of an input, a process, and an output.
A computer system is any device that can take a set of inputs and process them into useful outputs.
What is hardware?
Hardware is the term given to the physical components of the computer system.
Hardware includes the internal components of a computer system like the hard drive and the sound card as well as external components like printers and speakers.
What is software?
Software is the name given to program code (sequences of instructions which are
executed to perform a task).
What are the internal components of a computer system?
The internal components of a computer system consist of the hardware required to process data and to allow the processor to communicate with other devices such as secondary storage, display screens, and printers.
The main internal components of a computer system are:
- Processor (CPU)
- Main memory
- Input/output (I/O) controllers
These components are connected together by high-speed communication buses.
Which three buses is the system bus made up of?
Address bus, data bus, and control bus.
What is the role of the CPU within a computer system?
The processor, sometimes referred to as the CPU (central processing unit), is the part of the computer that processes data by executing program instructions. At processor level, these will be low-level instructions in the form of machine code that the processor has been designed to handle, based on a specific processor instruction set.
What needs to be done in order for the CPU to be able to execute a program?
For the processor to be able to execute a program, the program instructions need to be transferred from secondary storage into main memory from where they can be fetched, decoded, and executed. The data that needs to be processed is also loaded into main memory (from secondary storage) or provided by the input and output devices via the I/O controllers.
What is main memory?
Main memory is memory that can be accessed directly by the processor. Each memory location, where instructions or data are stored as binary sequences, has a physical address, which is a number used to locate that memory location and access its contents.
What are the two types of main memory?
There are two main types of main memory:
RAM, which is the working memory that is used by the processor during the fetch-decode-execute cycle
ROM, which is used in the boot process for the computer system
How is main memory different from secondary storage?
Main memory is distinct from secondary storage, which the processor can’t work with directly. Secondary storage must be accessed through I/O controllers.
What are input/output (I/O) controllers?
I/O controllers are a series of microchips which help in the communication of data between the central processing unit and the motherboard. The main purpose of this system is to help in the interaction of peripheral devices with the control units (CUs).
All external (peripheral) devices are connected to the processor through I/O controllers. These provide the mechanism for:
- input data to be received for processing from input devices, such as keyboards
- the results of computation to be output from the system to output devices, such as display screens
What are the tasks performed by I/O controllers?
The controller converts the signals received from a peripheral device into a format the computer can process, and vice versa.
It receives I/O requests from the CPU, and then sends device-specific control signals to the device it is controlling.
It also manages the data flow to and from the device, freeing the CPU to get on with other tasks.
What is a device driver?
The software that interacts directly with the I/O devices is known as the device driver.
When you install a new device (e.g. a printer), you must install the device driver to go with it.
What is a bus?
A bus is a high-speed internal connection. Buses are used to send control signals and data between the processor and other components.
They typically consist of 8, 16, 32 or 64 lines/wires.
What is the role of the address bus?
The address bus carries memory addresses from the processor to other components such as primary storage and input/output devices.
Addresses travel only one way along the address bus: the processor sends the address of an instruction or a datum to be stored or retrieved to memory or an I/O controller.
So the address bus is unidirectional.
What is the role of the data bus?
The data bus carries data between the processor and other components. It is bidirectional.
What is the role of the control bus?
The control bus carries control signals between each I/O controller and the processor, as well as between the processor and memory. The control bus also carries the clock’s pulses. It is bidirectional.
What are the different types of control signals that can be sent along the control bus?
Memory read: causes data from the addressed location to be placed on the data bus
Memory write: causes data on the data bus to be written into the addressed location
Bus request: indicates that a device is requesting use of the data bus
Bus grant: indicates that the CPU has granted access to the data bus
Clock: used to synchronise operations
What is the system bus?
The system bus is a set of parallel connections that allow internal components to communicate with each other and exchange data.
What are words?
Memory is divided up into equal units called words.
Word length is usually 8, 16, 32 or 64 bits.
Each word has a separate memory address.
What are external buses?
External buses are buses that are used to connect the peripherals to the processor. These can be serial or parallel connections.
What does the width of the data bus refer to?
The width of the date bus refers to the number if bits that can be transferred in one operation. For example, how many bits can be transferred in one go between the memory and the processor. It is typically a multiple of a byte (e.g. 8, 16, 32, or 64 bits).
In general, if the width of the data bus is expressed as n bits, then n bits can be transferred at one time. The amount of data that can be fetched at one time can affect the processor performance.
What does the width of the address bus refer to?
The width of the address bus refers to its number of parallel lines, which determines the number of bits that can be used to form an address of a memory location. It is typically a multiple of a byte (e.g. 8, 16, 32, or 64 bits).
In general, if the width of the address bus is expressed as n bits, then there are 2^n numbers that can be used to address memory locations.
Therefore, the width of the address bus determines the maximum number of addressable memory locations, i.e. the maximum memory capacity of a computer system. This is called the address space and it can affect processor performance.
What is the stored program concept?
Machine code instructions are loaded into main memory to be executed by the processor.
The instructions are fetched one at a time and executed immediately by the processor in a sequential order.
What is von Neumann architecture?
The most common implementation of the stored program concept is the von Neumann architecture.
Instructions and data are stored in a common main memory and transferred using a single shared bus.
Used in everyday, general purpose computers.
What is Harvard architecture?
An alternative model separates the data and instructions into separate memories using different buses.
Program instructions and data are no longer competing for the same bus.
Used for specialist embedded systems such as digital signal processing where speed takes priority over the complexities of the design.
What is a general-purpose computer?
Early computers were able to calculate an output using fixed instructions. They could perform only one set of instructions.
A general purpose computer can perform many different tasks at different times.
Their programming is not fixed.
To achieve this, computers are designed to allow data and instructions to be stored – this is called the stored program concept.
What are the main components of a CPU?
Arithmetic-Logic Unit (ALU)
Control Unit
Clock
General Purpose Registers
Dedicated registers
What’s the role of the control unit in the CPU?
The CU is the part of the processor that coordinates the activity of all the other components.
Each instruction is accepted and decoded.
Separate steps such as fetching the address of the data and fetching the data itself from memory are identified.
Each step is synchronised with a regular pulse from the system clock.
The control unit operates by repeating three operations:
Fetch – causes the next instruction to be fetched from memory
Decode – decodes the instruction
Execute – causes the instruction to be executed
What’s the role of the Arithmetic Logic Unit in the CPU?
The ALU is the problem-solving part of the processor.
This component performs arithmetic, logical and shift operations on data.
Arithmetic operations: add, subtract, multiply, divide.
Logical operations: Consist of comparing one data item to another to determine whether the first data item is smaller than, equal to, or greater than the second data item.
Bitwise logical operations: AND, OR , NOT, XOR
Shift operations: Move bits to the left or right within a register
What’s the role of general purpose registers in the CPU?
Results from the ALU need to be stored somewhere.
Rather than writing working data back to “slow” memory, processors have several locations of super-fast memory called registers that are used to temporarily store results.
The processor is then able to access and re-use these results is subsequent calculations, e.g. Add 2+3/4
Some processors have a single general purpose register called an Accumulator.
What is the role of the system clock in the CPU?
The system clock is a series of regular ON/OFF signals that are used to synchronise the operations of the processor components.
Actions are usually carried out on the rising edge of the clock.
What is the role of the Memory Data Register (MDR) in the CPU?
The MDR temporarily holds the data (data values or instructions) that are read from or written to the main memory.
What is the role of the Current Instruction Register (CIR) in the CPU?
The CIR holds the current instruction that the processor is executing.
What happens in the fetch stage of the FDE cycle?
Address of next instruction is transferred from the Program Counter to the Memory Address Register.
The Program Counter is incremented by 1.
Instruction stored in location addressed by the Memory Address Register are transferred to the Memory Data Register.
Instruction transferred from the Memory Data Register to the Current Instruction Register.
What happens in the decode stage of the FDE cycle?
The instruction in the Current Instruction Register is decoded.
Additional data, if required from the instruction, is fetched from memory., and passed to the registers.
What happens in the execute stage of the FDE cycle?
The registers in the CPU now contain everything that the ALU needs to carry out the instruction.
The instruction is executed by the ALU.
Registers are used to store immediate data or results.
The result is stored in the accumulator, a general purpose register or main memory.