Unit 1 Components Of A Computer Flashcards
Processor
The processor is the brain of a computer. It executes instructions which allows programs to run.
The Arithmetic and Logic Unit
The ALU (Arithmetic and Logic Unit) completes all of the arithmetical and logical operations. Arithmetical operations include all mathematical operations such as addition and subtraction on fixed or floating point numbers. Logical operations include boolean logic operations such as AND, OR, NOT, and XOR.
The Control Unit
The Control Unit is the component of the processor which directs the operations of the CPU. It has the following jobs:
- Controlling and coordinating the activities of the CPU
- Managing the flow of data between the CPU and other devices
- Accepting the next instruction
- Decoding instructions
- Storing the resulting data back in memory
Registers
Registers are small memory cells that operate at a very high speed. They are used to temporarily store data and all arithmetic, logical and shift operations occur in these registers.
Program Counter (PC)
Is a register that manages the memory address of the next instruction to be fetched and executed.
Accumulator (ACC)
These hold the data being worked on and the results of arithmetic and logical operations.
Memory Address Register (MAR)
This holds the RAM address you want to read to or write from.
Memory Data Register (MDR)
This temporarily stores the data you have read from RAM or want to write to RAM.
Current Instruction Register (CIR)
Holds the current instruction being executed, divided up into operand and opcode.
Buses
Buses are a set of parallel wires which connect two or more components inside the CPU. There are three buses in the CPU: data bus, control bus, and address bus. These buses collectively are called the system bus.
Data Bus
This is a bi-directional bus (meaning bits can be carried in both directions) used for transporting data and instructions between components.
Address Bus
This is the bus used to transmit the memory addresses specifying where data is to be sent to or retrieved from. The width of the address bus is proportional to the number of addressable memory locations.
Control Bus
This is a bi-directional bus used to transmit control signals between internal and external components.
The control signals include:
- Bus request: shows that a device is requesting the use of the data bus
- Bus grant: shows that the CPU has granted access to the data bus
- Memory write: data is written into the addressed location using this bus
- Memory read: data is read from a specific location to be placed onto the data bus,
- Interrupt request: shows that a device is requesting access to the CPU
- Clock: used to synchronise operations
Assembly language
Assembly code uses mnemonics to represent instructions, for example ADD represents addition. This is a simplified way of representing machine code.
Fetch phase:
- Address from the PC is copied to the MAR
- Instruction held at that address is copied to MDR by the data bus
- Simultaneously, the contents of the PC are increased by 1
- The value held in the MDR is copied to the CIR
Decode phase:
The instruction held in the CIR is decoded. The instruction is split into oppose and operand and the opcode is used to determine the type of instruction and what hardware to use to execute it. The operand holds either:
. The address of the data to be used with the operation, which is the copied to the MAR, or
. The actual data to be operated on, which will be copied to the MDR
. The data to be operated on may be passed to the ALU/accumulator
Execute phase:
- The appropriate instruction/opcode is carried out on the operand
Clock speed
The clock speed is determined by the system clock. This is an electronic device which generates signals, switching between 0 and 1. All processor activities begin on a clock pulse, and each CPU operation starts as the clock changes from 0 to 1. Clock speed is the number of cycles that are performed by the CPU per second.
Number of cores
A core is an independent processor that is able to run its own fetch-execute cycle. The number of cores indicates the number of processing units in a computer. A computer with multiple cores can complete more than one fetch-execute cycle at any given time. A computer with dual cores can theoretically complete tasks twice as fast as a computer with a single core. However, not all programs are able to utilise multiple cores efficiently as they have not been designed to do so, so this is not always possible.
Cache Memory
Cache is a small amount of expensive, very fast memory inside the CPU. Cache memory is the CPU’s onboard memory. Instructions fetched from main memory are copied to the cache, so if required again, they can be accessed quicker. As cache fills up, unused instructions are replaced.
Von Neumann Architecture
This architecture includes the basic components of the computer and processor (single control unit, ALU, registers and memory units) in which a shared memory and shared data bus is used for both data and instructions. Von Neumann architecture is built on the stored program concept.
Harvard Architecture
Harvard architecture has physically separate memories for instructions and data, more commonly used with embedded processors.This is useful for when memories have different characteristics, i.e. instructions may be read only, while data may be read-write.
Advantages of Von Neumann Architecture
Cheaper to develop as the control unit is easier to design
Programs can be optimised in size
Advantages of Harvard Architecture
Quicker execution as data and instructions can be fetched in parallel.
Memories can be different sizes, which can make more efficient use of space
Reduced Instruction Set Computers (RISC)
In these processors, there is a small instruction set. Each instruction is approximately one line of machine code and takes one clock cycle.
Complex Instruction Set Computers (CISC)
In these processors there is a large instruction set. The aim is to try and accomplish tasks in as few lines of assembly code as possible. These instructions are built into the hardware.
RISC Processors
The compiler has to do more work to translate high level code into machine code.
More RAM is required to store the code.
Pipelining is possible since each instruction takes one clock cycle.
CISC Processors
The compiler has less work to translate high level code into machine code.
Less RAM is required since code is shorter.
Many specialised instructions are made, even though only a few of them are used.
Graphics Processing Unit (GPU)
A graphics processing unit (GPU) is a co-processor which has lots of independent processors working in parallel making it very efficient at tasks such as image processing, and machine learning.
Multi-core and Parallel Systems
Multi-core CPUs have multiple independent cores that can complete instructions separately which results in higher performance. Parallel systems accomplish a similar task however instead of requiring multiple cores they can complete tasks with a single core, by using threading. Overall, in larger projects, multi-core systems perform better than parallel systems.
Optical
Optical devices are read from and written to using lasers. Information is represented by portions of the disc which either reflect or scatter the incident laser light written in spiral tracks on the disc’s surface.
CDs
CD stands for compact disc. They use optical technology to store small quantities of information. Most commonly used for audio files, CDs are small, thin and light which makes them very portable.
Their disadvantages include being easily damaged by scratches, their limited storage capacity and relatively slow transfer speeds.
DVDs
DVD stands for digital versatile disc or digital video disc. Similar to CDs, DVDs are also optical devices which have a higher storage capacity than CDs, making them suited to storing digital videos which require more storage space than audio files or photos.
Blu-Ray
An advancement over DVDs, blu-ray discs have more than five times as much storage than traditional DVDs, making them useful for storing high-resolution films.
Magnetic
Devices which store information magnetically represent binary information using two magnetic states which represent 1 and 0, allowing any information to be represented in binary form.
Hard Disk Drives
HDD, hard disk drives typically have high capacities of between 500GB and 5TB. They work by rotating magnetic platters at high speeds under a read/write head on an actuating arm which allows the read/write head to access any part of the platter.
Disadvantages of HDDs include their somewhat slow data transfer speeds and their tendency to become damaged by movement. The combination of brittle platters and moving parts results in a delicate device.
Magnetic Tape
Wound onto reels, long stretches of tape were passed through readers which would check the polarity of the tape and read off a binary value. Tape was a bulky way to store data and the technology was superseded by more modern technology.
Flash
Flash storage is fast and compact. The technology makes use of silicon semiconductors forming the logic gates NAND and NOR to store electrical charge in one of two states: high or low. These two states represent the binary values True and False, which can be used to represent information
Flash memory
Flash memory can be erased and reprogrammed electronically, and is non-volatile, meaning it stores its data even when power is lost.
Solid State Drives
Often referred to as SSDs, solid state drives are currently one of the most popular forms of data storage. They are extremely light and portable, while having no moving parts - this makes them much more resistant to damage from movement than hard disk drives, which are packed with moving parts. Furthermore, SSDs are renowned for their high data transfer rates. The primary disadvantage of SSDs is their cost, which continues to decrease as they become more common.
RAM
Random access memory is a type of fast main memory used to store data and programs that the computer is currently using. This speeds up the computer’s execution as RAM has higher access speeds than even flash memory. RAM is more expensive per gigabyte than secondary storage devices, so computers often have only 4 or 8 GB or RAM compared to 100s or 1000s of GB of secondary storage.
RAM is volatile, meaning that it loses its information when power is lost.
ROM
Read only memory, as the name suggests, cannot be modified. Once programmed, the state of the memory cells inside does not changed. ROM is non-volatile, so it retains its data even when the computer is powered off.
Virtual Storage
Virtual storage is the name given to storing information remotely so that it can be accessed by any computer with access to the same system, for example over the Internet. Examples of virtual storage include cloud storage services like Google Drive and Microsoft OneDrive as well as networked storage used in offices and schools.
As internet speeds increase, virtual storage is becoming a more popular method of storage thanks to the convenience of files being available “in the cloud” on any device connected to the Internet.
While virtual storage is convenient to access and share, its disadvantages include limitations of a user’s network speed and high costs
Pipelining
Pipelining is the process of completing the fetch, decode, and execute cycles of three separate instructions simultaneously, holding appropriate data in a buffer in close proximity to the CPU until it’s required. While one instruction is being executed, another can be decoded and another fetched.
Why is Pipelining used
Pipelining is aimed to reduce the amount of the CPU which is kept idle. It is separated into instruction pipelining and arithmetic pipelining. Instruction pipelining is separating out the instruction into fetching, decoding, and executing. Arithmetic pipelining is breaking down the arithmetic operations and overlapping them as they are performed.