Computer Science - Chapter 3 - Hardware
Computer Science - Chapter 3 - Hardware
computer architecture
central processing unit
consists of:
● the component of the CPU that carries out all arithmetic and logical operations
● a computer can have more than one ALU
● multiplication and division are carried out by a sequence of addition,
subtraction and left or right logical shift operations
control unit (CU)
● the component of a computer’s CPU that ensures synchronisation of data flow and
programs throughout the computer by sending out control signals along the control
bus
● the system clock: produces timing signals on the control bus to ensure
synchronisation takes place
● the RAM holds all the data and programs needed by the CPU
● RAM is also often referred to as the immediate access store or IAS
● IAS: memory that holds all data and programs needed to be accessed by the
control unit
● the CPU takes data and programs held in the HDD or backing store, and puts them in
the RAM temporarily
● a secondary storage device (such as HDD or SSD) used to store data
permanently even when the computer is powered down
● this is because the RAMcan read/write operations work faster when carried out on the
RAM rather than on the HDD since there are no moving parts in RAM
registers
registers full form function
CIR current stores the current instruction being decoded and executed
instruction
register
ACC accumulator used when carrying out ALU operations; it stores the data
temporarily during the calculations
MAR memory address stores the address of the memory location being currently
register read or written to
MDR memory data stores data which has just been read from memory data or
register that which is about to be written to memory
memory
system buses
● the system bus that carries the addresses throughout the computer system
● between the CPU and memory: address bus is unidirectional
● bits can travel in one direction only
● this prevents addresses being carried back to the CPU
● wider the bus, the more memory locations that can be directly addressed at any given
time
● a bus of width 16 bits can address 216 (65536) memory locations whereas a bus
width of 32 bits allows 232 (4294967296) memory locations to be simultaneously
addressed
data bus
control bus
● bidirectional: carries signals from the control unit (CU) to all the other computer
components
● usually 8-bits wide
● no need for it to be any wider since it only carries control signals.
fetch-decode-execute cycle
● to carry out a set of instructions, the CPU first fetches some data and instructions
from memory and stores them in suitable registers.
● the address and data bus are used in this.
● once fetched, each instruction needs to be decoded before being executed this cycle
is known as fetch-decode-execute or FDE cycle
1 PC contains the address of the memory location of the next instruction that
has to be fetched
2 the memory address of the instruction is copied to mar from the pc
4 the contents or instructions of the MDR are then copied and placed in CIR
5 the PC is incremented by 1.
7 the CPU sends out signals through the control bus to the respective
components (e.g arithmetic and logic unit) of the computer to execute the
instruction, if required
clock speed
● refers to the number of electrical pulses that the clock inside the CPU can produce
each second.
● clock cycle: clock speeds are measured in terms of GHz; this is the vibrational
frequency of the system clock which sends out pulses along the control bus
● for example, a 3.5GHZ clock cycle means 3.5 billion clock cycles a second usually
measured in Hz or GHz.
● increasing the clock speed can increase the processing speed as more instructions
than before will be addressed in the same time
● one issue of increasing the clock speed is overclocking: it can lead to un-
synchronisation of operations, causing the computer to glitch and crash or cause
overheating of the CPU.
overclocking
● clock speed can be changed by accessing the BIOS (Basic Input/Output System) and
altering the settings
● a suite of programs on firmware that are used to perform the initialisation of a
computer system during the boot-up process
● using a clock speed higher than the computer’s original:
● execution of instructions outside design limits can lead to seriously
unsynchronised operations
● an instruction is unable to complete in time before the next one is due to
be executed)
● the computer would frequently crash and become unstable
● overclocking can lead to serious overheating of the CPU
● leading to unreliable performance.
cores
cache
instruction set
embedded systems
● examples of embedded system include: motor vehicles, set-top box, security systems,
lighting systems, vending systems, washing machines
benefits drawbacks
small in size and easy to fit in devices can be difficult to upgrade certain devices to
new technology
dedicated to only one task and therefore interface appears simple, but it can still be
have a simple interface and system more confusing for people
can be controlled remotely using a mobile difficult to upgrade and troubleshoot; cause
phone or remote control devices to be thrown away rather than fixed
fast reactions to changing inputs throwing away can start a "throw away" culture
among users who will often discard the
devices when they become out of date
input devices
barcode scanners (readers)
● barcodes are a series of dark and light parallel lines with varying thickness
● that represent numbers from 0 to 9 barcode numbers are looked up in the stock
database, and item details are sent back to checkout
● scanning allows automatic stock control and finding new values of stock items
benefits of using barcodes for the store management include easy and fast updates,
automatic stock control, and time-saving
process
2 the black and white parts of the barcode reflect light differently (the black
parts reflect little to no light, whereas the light parts reflect almost all of it)
● the barcode number is looked up in the stock database (the barcode is known as the
key field in the stock item record); this key field uniquely identifies each stock item
● when the barcode number is found, the stock item record is looked up
● the price and other stock item details are sent back to the checkout (or point of sale
terminal (POS)
● the number of stock items in the record is reduced by 1 each time the barcode
is read
● this new value for number of stock is written back to the stock item record
● the number of stock items is compared to the re-order level; if it is less than or equal
to this value, more stock items are automatically ordered
● once an order for more stock items is generated, a flag is added to the record to stop
reordering every time the stock item barcode is read
● when new stock items arrive, the stock levels are updated in the database.
qr codes
● a matrix of dark and light squares which represent data; the pattern can be read and
interpreted using a smartphone camera and QR app
● they hold considerably more information than traditional barcodes
● a QR code consists of a block of small squares (light and dark) known as pixels.
● it can presently hold up to 4296 characters (or up to 7089 digits)
● allows internet addresses to be encoded within the QR code.
● as more and more data is added, the structure of the QR code becomes more
complex.
● three large squares at the corners of the code function as a form of alignment;
● the remaining small corner square is used to ensure the correct size and correct angle
of the camera shot when the QR code is read.
● used for advertising products, accessing websites, phone numbers, and storing
boarding passes electronically at airports and train stations
● being updated to frame qr codes that include advertising logos, but the software
needed for this isn't free
● DAC: (digital to analogue converter) – device that converts digital data into electric
currents that can drive motors, actuators and relays, for example
● ADC (analogue to digital converter) – a device that converts analogue data (for
example, data read from sensors) into a form understood by a computer
process
1
point a phone camera towards the qr code
2
the app will process the image taken by the camera by converting it into a
readable format.
3
white squares reflect more light while black squares reflect less light
4 the browser software on the mobile phone or tablet automatically reads the
data generated by the app; it will also decode any web addresses contained
within the QR code
digital cameras
● relatively slow method of data entry and are also prone to errors
● frequent use of these devices can lead to injuries, such as repetitive strain injury (RSI)
in the hands and wrists.
● RSI: pain felt in the muscles, nerves and tendons caused by a repetitive action
(for example, excessive clicking of a mouse button over a period of time)
● ergonomic keyboards can help to overcome this problem
● these have the keys arranged differently
● designed to give more support to the wrists and hands when doing a lot of
typing.
process:
1 there is a circuit board at the base of the keys, composed of conductive layers
with an insulating layer present between them.
4 CPU refers to an index file to identify which character key was pressed by the
user
5 each character on the keyboard has a corresponding ascii value, which also has
a binary value
6 this binary value can be processed by the CPU to, for example, show up on the
screen
microphones
2 the diaphragm in the microphone picks up the air vibrations and starts to
vibrate itself
3 a copper coil is wrapped around the cone and is connected to the diaphragm
4 when the diaphragm vibrates, the cone moves in and out, causing the coil to
move forwards and backwards
5 the coil's movement causes the it to cut the magnetic field around the
permanent magnet, changing magnetic flux
optical mouse
● the DSP calculates the coordinates of the mouse based on the changes in image
patterns and sends them to the computer
● an optical mouse has no moving parts and is more reliable, with no dirt traps or
special surface requirements
● a wired mouse doesn’t have the problem of continuous signal loss as it has a direct
USB connection, is cheaper to operate, and has fewer environmental issues (as
compared to a wireless mouse)
2D scanners
input devices that are used to convert paper documents to digital form how does a 2d
scanner work?
1 the cover of the scanner is opened, a document is placed on the glass panel,
and the cover is closed
3 the document is moved from side to side, and then advanced slightly, until the
whole document is scanned
5 the reflected image is sent to a lens using a series of mirrors; the lens focuses
the image of the document
6 the focused image now falls on a CCD (charge coupled device). this converts
light into electric current.
(a CCD is made up of thousands of light-sensitive pixels. each pixel creates an
electric charge when light falls on it)
● computers equipped with optical character recognition (OCR) software allow the
scanned text from the document to be converted into a text file format.
● means the scanned image can now be edited and manipulated by importing it into a
word processor.
applications of 2D scanners:
application of 3d scanning:
touch screens
capacitive touch screen: a type of touch screen that uses the change in the screen’s
capacitance (the ability to store an electrical charge) when it is touched by a finger or stylus
infra-red touch screen: a type of touch screen that uses infra-red beams and sensors to
detect where the screen has been touched
resistive touch screen: a type of touch screen that uses two conductive layers which make
contact where the screen has been touched
capacitive infra-red resistive
current is sent/flows out when the screen is touched, the these transmit electric
from all 4 corners of the infra-red beams are broken currents
screen
when the finger/stylus the microprocessor is able to when the top layer/screen
touches the screen, the detect the coordinates of the is pushed into the
current changes touch lower/bottom layer, a
the coordinates of the circuit is completed
allows multi-touch
infra-red screen can be sensitive to water or
good visibility in sunlight moisture
resistive good resistance to dust and water low touch sensitivity; need to press
can be used with bare fingers, harder for it to register touch
light projectors:
● projector are used to project computer outputs onto larger sized screens or
whiteboards
● there are two common types of light projectors: DLP and LCD
process:
a bright white light passes through a condensing lens and then through the
1 colour filters
white light is split into the primary colours - red, blue and green - through
2 which the projector creates a lot of colours
3 it then passes through a shaping lens and falls on the dmd chip
the light then passes through the lens and the image is projected on the
5 screen
the advantages of DLP are:
LCD projectors use a high intensity light beam to produce an image on a screen this is how
it works:
1 a strong beam of white light is generated from an led or bulb that is present
inside the projector
4 these three light components will pass through three LCD screens and
subsequently produce three monochromatic images
5 these images will be combined together using a prism; this produces a fully
coloured image
6 the image passes through the projector lens and falls on the screen
inkjet printer
● usually have a print head (consists of nozzles that sprays ink droplets), ink cartridges, a
stepper motor and belt, and a paper feed
● ink droplets are produced using two different technologies; thermal bubble and
piezoelectric
1 document that needs to be printed is sent to the printer driver
2 printer driver makes sure that the data is in a format that is understandable for
the printer device
3 a check is made by the driver to see the printer's status (out of ink/paper, busy,
etc.)
4 data from the document is sent to the printer, where it is stored in the printer
buffer, a temporary memory location
6 as the sheet of paper is fed through the printer, the print head moves side to
side across the paper printing text or image
7 at the end of each full pass of the print head, the paper is advanced very
slightly in order to allow the next line to be printed
8 if there are more pages, the process will repeat (from paper being added) and
will continue until the printer buffer is empty
9 once the printer buffer is empty, printer sends an interrupt to the computer's
CPU; this is the request for more data to be sent to printer and will continue
until the whole document is printed
thermal bubble: inkjet printer technology whereby tiny resistors create heat and form an ink
bubble which is ejected onto paper in an inkjet printer
piezoelectric crystal: a crystal located in an ink reservoir within an inkjet printer; the crystal
vibrates and forces ink out onto paper
laser printer
2 printer driver makes sure that the data is in a format that is understandable
for the printer device
3 a check is made by driver to see printer's status (out of ink/paper, busy, etc)
4 data from the document is sent to the printer where it is stored in the printer
buffer
5 the printing drum is positively charged, and when it rotates, a laser beam
scans it, removing the positive charge and leaving negatively charged areas
that match the document or image that needs to be printed
8 the ink sticks onto the paper, producing an exact copy of the document
9 to prevent the paper sticking to the drum, the electric charge of the paper is
removed after one rotation of the drum
10 the paper then goes through fusers, which are a set of heated rollers, and this
causes the ink to melt and stick permanently on the paper
11 a discharge lamp removes all the electric charge from the drum to ready it for
the next print.
● CPU larger toner cartridge and paper trays CPU can print in high volumes
● CPU can print very quickly
disadvantages:
3D printers
● produces 3D objects
● the mechanism is primarily based on inkjet and laser technologies
● powdered metal using a technology known as binder 3D printing.
● a 3D printing method that uses a two- stage pass; the first stage uses dry
powder and second stage uses a binding agent
1 a design is made by using computer aided design (CAD) software
2 the final design is imported to a special software that turns it into a format
understandable by the 3d printer
5 the printer builds the object layer by layer (0.1mm thick layer)
7 the object is removed from the printer and taken away to prepare
uses of 3D printers
LED screens
LCD screens
● a light-emitting diode that uses the movement of electrons between a cathode and
an anode to produce an on-screen image
● it generates its own light so no backlighting is required
● use organic materials to create flexible semiconductor
● organic films are added between two charged electrodes - one metallic (cathods) and
the other of glass (anode)
● when an electric field is applied to electrodes, they give off light.
● OLEDs make it possible to make very thin screens that can bend as well
advantages of oled over LCD and LED:
● plastic, organic layers of an OLED are thinner, lighter and more flexible than
the crystal structures used in LEDs or LCDs.
● light-emitting layers of an OLED are lighter(can be made from plastic rather
than the glass as used in LED and LCD screens)
● OLEDs give a brighter light than LEDs.
● OLED do not require backlighting like LCD screens : OLEDs generate their own
light.
● they use much less power than LCD screens (most of the LCD power is used to
do the backlighting); this is very important in battery-operated devices such as
mobile phones.
● OLEDs are essentially plastics, they can be made into large, thin sheets
(this means they could be used on large advertising boards in airports,
subways, and so on).
● OLEDs have a very large field of view, about 170º, which makes them
ideal for use in television sets and for advertising screens.
loud speakers
3 there is a coil of wire wrapped around an iron core, positioned close to a strong
magnet; the current flows through that coil and becomes an electromagnet
4 as the electric current through the coil of wire varies, the induced magnetic
field in the iron core also varies. this causes the iron core to be attracted
towards the permanent magnet and vibrate as the current varies.
5 since the iron core is attached to a cone (made of paper or a thin synthetic
material), it starts to vibrate, producing sound waves
sensors
● sensors are input devices that measure physical data (e.g: temperature, light, etc.)
from their surroundings
● data is analogue in nature; this means it is constantly changing and doesn’t have a
single discrete value.
● analogue data needs some form of interpretation by the user
● computers cannot make any sense of these physical quantities so the data needs to
be converted into a digital format
● achieved by an analogue to digital converter (ADC)
flow measure the rate of flow of a gas measures gas flow in pipes
or liquid measures water flow in
underground pipes
infra-red measures heat radiation given off security alarm system in which body
(passive) heat is detected
level measure the level of, for example, automatic plant watering system,
liquids in a container where plants are watered util the
water in the tank reaches a certain
level
moisture measures water levels in, for monitoring moisture level of soil
example, soil present in a greenhouse
baking
data storage
memory and storage:
● memory: the internal devices used to store data that the computer can access
directly
● known as primary memory
● memory can be the user’s workspace, temporary data or data that is key
to running the computer.
storage devices
primary memory
part of the computer memory accessible directly from the CPU includes RAM and ROM
memory chips
RAM
applications:
CPU programming of routines CPU addition of new routines
DRAM SRAM
ROM
secondary storage
● known as off-line storage as well
● not directly addressable by the CPU
● non volatile
● stores more data than primary memory
● but the data access time is longer than that for primary memory
● three types of secondary storage technologies: magnetic, solid state, optical
● data is stored in a digital format on magnetic platters in a hard disk drive (HDD)
● HDDs have multiple platters that can spin at high speeds, and the read-write arm
moves across the storage media
● read-write heads made of electromagnets read or write data to the platters by
controlling magnetic fields to determine binary values.
● HDDs external to the computer that can be connected to the computer using one of
the USB ports
● they can be used as a back-up device or another way of transferring files between
computers
● solid state drives (SSDs) offer many advantages over HDDs: no issue of latency, no
moving parts, and faster data retrieval
● SSDs use nand or nor gates to store data, which is stored as 0s and 1s in tiny
transistors acting as floating gates and control gates
● they are more reliable, lighter, and have lower power consumption, and run cooler
than HDDs however, the main drawback is their limited longevity due to the number
of read/write cycles,
● though this is improving, it is also not possible to overwrite existing data on a flash
memory device
benefits of this solid state technology over hard disk drives are:
● CDs and DVDs are optical storage devices that use laser light to read and write data
from their surfaces
● use a thin layer of metal alloy or light-sensitive organic dye to store the data
● data is stored in pits and lands on the spiral track, and a red laser is used to read and
write data
● DVDs have a larger storage capacity than CDs, due to smaller pit size and track width,
and can be dual-layered
● dual-layered: using two recording layers in storage media
● standard, single-layer DVDs have a larger storage capacity than CDs, and use lasers
with a wavelength of 650 nm compared to that used for cds, which is 780 nm
● blu-ray discs are optical storage media that use a blue laser for read-write operations,
compared to CDs/DVDs, that use a red laser
● the smaller pits and lands on blu-ray discs, due to the shorter wavelength of blue
light, allow for up to five times more data to be stored than a normal DVD
● single-layer blu-ray discs use a 1.2mm thick polycarbonate disc, while dual-layer blu-
ray and normal DVDs use a sandwich of two 0.6mm thick discs
● blu-ray discs come with a secure encryption system to prevent piracy and copyright
infringement the data transfer rate for a blu-ray disc is 36 mbps, compared to 10 mbps
for a DVD, allowing for faster transfer of data
● blu-ray discs can come in single or dual- layer format, while DVDs are always dual-
layer
● the data transfer rate for a DVD is 10Mbps and for a Blu-ray disc it is 36Mbp
● dual-layered DVD has a storage capacity of 4.7GB (enough to store a 2-hour standard
definition movie)
● single-layer Blu-ray disc has a storage capacity of 27GB (enough to store a 2-hour high
definition movie or 13 hours of standard definition movies)
● dual-layer Blu-ray disc has a storage capacity of 50GB (enough to store 4.5hours of
high definition movies or 20 hours of standard definition movies).
virtual memory
● virtual memory compensates for the limited physical memory (RAM) in a computer
● it creates an illusion of more memory by using space on the hard drive as additional
ram
● programs can run even if there isn't enough physical memory to hold all required
data
● pages’ of data that are not currently required are moved to secondary storage, freeing
up space for new pages on ram
● continue to occur until RAM is no longer being over-utilised by
the competing programs running in memory
● swapping data between RAM and secondary storage is known as paging
virtual memory can slow down a computer's performance but prevents crashes that
may be caused by memory shortage
● the operating system manages virtual memory, deciding which pages to swap in and
out of RAM virtual memory is essential for running multiple programs or large
programs that require more memory than available ram
accessing data in virtual memory is slower so, the larger the RAM the faster the CPU
can operate.
● disk thrashing: a problem in a hard disk drive (HDD) caused by excessive swapping in
and out of data causing a high rate of head movements during virtual memory
operations
● more time is spent on moving data in and out of memory than actually doing any
processing, then the processing speed of the computer will be considerably reduced.
● thrash point: the point at which the execution of a program comes to a halt because
the system is so busy moving data in and out of memory rather than actually
executing the program
● instead of saving data on a local hard disk or other storage device, a user
can save their data ‘in the cloud’
● risk that important and irreplaceable data could be lost from the cloud storage
facilities
● actions from hackers could lead to loss or corruption of data
● users need to be certain that sufficient safeguards exist to overcome these risk
network hardware
● network interface card (NIC): needed to allow a device to connect to a network (such
as the internet)
● a hardware component (circuit board or chip) that is required to allow a device
to connect to a network, such as the internet
● part of the device hardware and contains the Media Access Control (MAC) address
generated at the manufacturing stage
● a unique identifier which acts as a network address for a device; it takes the
form NN-NN-NN-DD- DD-DD, where NN is the manufacturer code and DD is
the device code
A MAC address is made up of 48 bits which are shown as six groups of hexadecimal
digits with the general format:
● certain software used on mainframe systems need all the MAC addresses of devices to
fall into a strict format
● necessary to change the MAC address of some devices to ensure they follow
the correct format
● it may be necessary to bypass a MAC address filter on a router or a firewall
● only MAC addresses with a certain format are allowed through, otherwise the
devices will be blocked if their MAC address doesn’t adhere to the correct
format
● to get past certain types of network restrictions it may be necessary to
emulate unrestricted MAC addresses
● require the MAC address to be changed on certain devices connected to the
network.
static
dynamic
● assigned by the ISP each time a device logs onto the internet.
● done using Dynamic Host Configuration Protocol (DHCP):
● a server that automatically provides and assigns an IP address
routers