Unit 3 - Hardware Flashcards
What are some examples of input devices on a laptop and smartphone?
Laptop: keyboard, buttons, trackpad, microphone
Smartphone: microphone, buttons, GPS sensor, gyroscopic sensor, touch part of the touchscreen
What are some examples of output devices?
Laptop and smartphone: speakers, display
What component carries out the processing of the instructions?
CPU (Central Processing Unit)
What is the purpose of the CPU?
When you run a program, it is the CPU which processes the instructions and data that is input, the results are then output
What are the components of the CPU?
2 Major components - Control Unit and ALU (Arithmetic-Logic Unit)
There are also registers and cache
List the different registers in the CPU:
- Program counter (PC)
- Memory Address Register (MAR)
- Memory Data Register (MDR)
- Current Instruction register (CIR)
- Accumulator (ACC)
What is a PC?
A Program counter holds the address of the next instruction to be fetched from the primary memory.
What is a MAR?
It holds the memory address of the current instruction, and then the data that it uses, so that these can be fetched from memory.
What is the MDR?
It holds the contents found at the address held in the MAR, or data which is to be transferred to primary memory
What is the CIR?
The current instruction register holds the instruction currently being executed or decoded
What is the ACC?
The accumulator holds the result of an instruction before it is transferred to memory.
What is the control unit?
The control unit coordinates and controls all of the activities taking place within the CPU
- It decodes instructions and executes them
- It receives signals from the system clock
- It directs the timing and control of other parts of the - CPU, much like the conductor of an orchestra
What is the ALU?
The arithmetic logic unit is where the actual arithmetic operations are done. It also carries out logical operations such as those including AND, OR and NOT.
What is the fetch-decode-execute cycle?
FETCH – causes the next instruction and any data involved to be fetched from main memory
DECODE – decodes the instruction
EXECUTE – the instruction is executed
What is the PC?
The Program Counter holds the address of the next instruction to be executed
The Program Counter is incremented (increased by 1) as soon as that instruction has been fetched
What happens in the Fetch stage of the F-E-D cycle?
the address of the instruction to be executed is copied from the Program Counter (PC) to the Memory Address Register (MAR)
The instruction at that address is fetched from memory and copied to the Memory Data Register (MDR)
The Control Unit decodes the instruction and decides if data needs to be fetched
If so, the MAR is then used to hold the address of the data to be used in the instruction
The data is fetched and copied to the MDR
How does the MDR and MAR work together?
The MAR knows where to look for data in RAM, the MDR keeps hold of that data until it’s ready to be used by the CPU
What does the CIR do?
The current instruction register holds the instruction that is being executed or decoded at the moment
Name the three factors effect CPU performance and what they do:
- Clock speed (The number of duplicate processing units (cores) placed in one CPU)
- Processor cores (Cycles per second measured in hertz (Hz))
- Cache (Cache on the CPU is faster than RAM but slower than registers)
What is clock speed?
Everything in a computer happens on the pulse of the internal clock. Therefore, the faster the clock speed, the faster the instructions are processed
What is a processor core?
One cycle per second = 1 hertz (Hz) = 1 instruction carried out each second
What is a multi-core processor and what effect does it have on speed?
This allows twice as many instructions to be executed, however, it doesn’t always perform at this rate as software may not be able to take full advantage of both cores. A quad-core processor working on many different tasks simultaneously, under ideal conditions can be up to four times faster than a single-core processor
What is a disadvantage of a quad-core processor
If the computer is running a single program, it is not necessarily any faster, since the program may have been designed to only run on one core. The core can also heat up a lot.
What is Cache memory?
Cache is a small amount of very fast, expensive memory in the CPU. It can be accessed faster than regular main memory (RAM)
How does cache effect speed?
It takes longer to retrieve an instruction or data from RAM than from cache. Program instructions and data that are fetched are stored in cache in case they are needed again soon
How many levels are there are cache?
There are 3 levels which are all faster than RAM and disc storage, but slower than CPU registers.
What are the benefits of cache?
The data used most often by the CPU is held in Level 1 cache so is available extremely quickly
In most systems, Level 1 cache is used about 50% of the time, with Level 2 cache being accessed about 90% of the time
This greatly reduces the time that the CPU has to wait for data from main memory
What is a bus?
A bus is a set of parallel wires connecting two or more components of the computer
What is the address bus?
The address bus carries the addresses of data (but not the data) between the processor and memory.
What is the data bus?
The data bus carries data between the processor, the memory unit and the input/output devices.
What is the control bus?
The control bus carries signals that control and coordinate all the activities within the computer.
What are instruction sets?
Instruction sets are all the possible instructions that are able to be decoded and executed by a CPU
Do all CPUs have the same instruction set?
A particular CPU will have its own instruction set
Programs written for one type of CPU won’t work on another
For example, a program written for an Intel Core i7 won’t work on an ARM processor contained in a smartphone
What is assembly code?
When programming a processor a special language called assembly code is used
What is the machine code?
The binary representation of the assembly code program. This will be executed by the CPU
What is the opcode?
Opcode is a part of the instruction that tells the processor what should be done.
What is the operands?
Operand is a part of the instruction that contains the data to be acted on, or the memory location of the data in a register
What is a microprocessor?
A microprocessor is an integrated circuit that is all contained on a single chip
What is an embedded computer?
An embedded computer is a single microprocessor that includes RAM, ROM and a CPU
When is an embedded computer used?
An embedded computer is frequently used to control a device using simple inputs
Why are embedded computers used?
Without embedded systems, a digital device would not be able to perform specific functions. For example, a dishwasher wouldn’t know when to heat the water, or a satnav wouldn’t know how to communicate with a satellite
Difference between Embedded and General purpose machine?
- slower CPU speed
- cannot instal new software unlike an general purpose machine
- Programs are stored on the ROM
- Typically very reliable e.g. a microwave won’t bug
What is primary storage?
Primary storage is directly accessed by the CPU and is needed to store programs that are currently running
What are 2 types of primary storage?
RAM (Random Access Memory)
ROM (Read Only Memory)
What is RAM?
RAM stores programs or data that are running or open and it is directly accessed by the CPU. RAM is volatile.
Where are your programs and data permanently stored?
The hard drive as it is non-volatile storage so it doesn’t lose the data if the power is off.
What happens in the ram when the computer is turned on?
No data is stored in the RAM.
How is the operating system loaded?
The computer first loads the operating system from your hard drive into RAM.
How are programs and data loaded?
When applications or programs are loaded, they are copied into RAM from the hard drive, RAM starts to fill up as all these programs, documents and files are copied.
What happens when you run out of RAM space?
The computer uses virtual memory which is part of the hard drive which acts as an extension to RAM, this is know as swapping and paging.
Advantages of virtual memory:
- Uses cheap secondary storage on the hard drive
- Prevents error messages saying ‘out of memory’ – the programs and files will still open
Disadvantages of virtual memory?
- Accessing virtual memory is very slow
- To access data, the existing data in RAM needs to be copied to the virtual memory, then data in virtual memory needs to be copied to RAM
What is ROM?
Read-only memory (ROM) is used to store this data
Data is read from ROM, but cannot be written to it
It is non-volatile as the data isn’t lost if the power is off
What is stored in ROM on a modern computer
It stores the bootstrap and the Basic Input/Output System (BIOS).
What is the bootstrap?
The initial program that is run when the computer is turned on, it tells the computer where it will find the operating system on the hard drive.
What is memory speed?
The speed that data can be accessed changes through the different components in a computer
What is secondary storage?
Secondary storage is not directly accessed by the CPU and is needed for permanent storage of data. Secondary storage devices may be internal or external to the computer
What is secondary storage used for?
- Programs and data are stored on hard drive
- Blu-rays may be used to distribute films
- Memory sticks may be used to transport data from one place to another
- Magnetic tape or external hard drives may be used for backup
- SD cards can be used for additional storage on cameras and smartphones – this is used for music, video and photos
What 2 main secondary secondary storages?
Hard Disk Drive (HDD)
Solid State Drive (SSD)
What are 4 examples of offline secondary storage?
- Compact Disc (CD), Digital -Versatile Disc (DVD) or BluRay
- Flash memory, SD cards
- Removable HDD or SSD
- Magnetic tape
What are the 3 storage methods?
- Magnetic: Mechanical parts move over the disks surface to read and write data magnetically, or a drive head reads a magnetic tape
- Optical: Lasers read and write data using light
- Solid State: Data is recorded onto solid memory chips without any moving parts
What is a magnetic disc?
As the disk is spinning, a read/write head moves across its surface. To write data, the head magnetises or demagnetises a section of the disk that is spinning under it. To read data, the head makes a note of whether the section is magnetised or not.
Advantages of magnetic storage: hard disks?
- Cheap
- large storage capacities
- relatively fast write speed
Disadvantages of magnetic storage?
- Lots of mechanical parts
- durability an issue
- sealed unit due to disk head and platter precision
- not very portable
What is optical storage?
When the laser shines on the disc surface, lands reflect the light back, whereas pits scatter the laser beam. A sensor looks for the reflected light. Reflected light (lands) represents a binary ‘1’, and no reflection (pits) represents a binary ‘0’.
Advantages of Optical storage
- Cheap
- very easily portable
- takes up little space physically
What are the disadvantages of optical storage?
- Less storage capacity compared to other types
- Easily damaged / scratched, requires a CD reader
- Slow write speeds
Why are the capacities of these discs (CDs, DVDs and BluRay) different given they are all the same physical size?
A CD has bigger pits and lands than Blu-ray as red light has a larger wavelength, The smaller Blu-ray pits and lands allow it to store more data
What is a SSD?
Solid-state disks use non-volatile flash memory to store information
Very fast read/write speeds as it doesn’t need to wait for a disk to spin to the correct location and an arm to move
No mechanical or moving parts meaning these disks are very durable
Advantages of a SSD?
- Highly durable
- No moving parts
- very fast read/write speeds
- no noisy fan or drive arm
- faster start up times
Disadvantages of a SSD?
- More expensive than magnetic hard disks
- similar storage capacity as magnetic disks
What is flash memory?
Low cost, portable, no moving parts, durable
This makes them ideal for a range of offline devices:
- Cameras
- Mobile phones
- USB memory sticks
How does flash memory store data?
If no electrons are present in the floating gate the current will flow, representing a 1
If electrons are stored in the floating gate, the current doesn’t flow, representing a 0
What is the isolation layer?
The isolation layers are semiconductors known as transistors
In order to write to the flash memory cell, the electrons need to pass through the isolation layer
The electrons only move through this layer when writing
Normally, they remain trapped in the floating gate
How does flash memory writes data?
The control gate is used to move electrons into or out of the floating gate
- A negative voltage forces electrons out of the floating gate
- A positive voltage forces electrons into the floating gate
What are the 2 types of flash memory available?
NOR and NAND
What is NOR?
NOR flash memory is used for programs
Reading from NOR flash is random access like RAM
It is used to store code such as the BIOS and possibly an operating system and code is executed directly by the CPU
What is NAND?
NAND memory is used for data storage
NAND memory works like other secondary storage
Data is first copied to RAM before it is accessed by the CPU
What is the cloud?
Cloud storage allows users to store files and data on the Internet
The files are accessed remotelyby users
Data may be stored in multiple locations
A professional company will manage the data storage
What are major areas the cloud can be split into?
- Cloud storage
- Cloud computing
What are features of cloud storage?
Synchronisation of devices with the cloud storage 24/7 Availability Redundancy Multiple file versions Only pay for storage used Scalability
What is redundancy?
Storage redundancy is where multiple copies of files are stored in different locations
In local storage this is normally carried out by having multiple copies of files on two different hard drives in one server
In cloud storage the locations that store redundant files may be anywhere in the world
what is scalability?
Scalability is the ability of the storage system or cloud computing resources to increase in size
Cloud storage normally charges for the amount of storage used
What are data centres?
Data centres are buildings that are dedicated to storing physical servers
Each server will contain an array of hard drives
Professional engineers will managethe computers
The buildings will have temperaturecontrol and air conditioning
Uptimes for data centres are often better than 99.99%
How does cloud storage create privacy?
If data is stored in the cloud, the security and privacy of the data is controlled by an external company.
Both cloud storage and local storage may be hacked, however, typically cloud storage will be more secure
Companies and organisations will need to consider the level they trust an external company to hold their data
How are the data transfer speed? (cloud storage)
With a fast connection and a small office document this may happen in a few seconds
However, with files such as those used in video editing it may take hours to open or save files to cloud storage.
Local storage is very fast to transfer data