3. Hardware

3. Hardware


Computers and their components


Embedded Systems

  • Designed to perform a specific function

  • Contains a processor, memory and I/O capability

  • Has a microprocessor

  • Installed on a device

  • No additional peripherals

  • (more and more are installed in the IoT)


Advantages

Disadvantages

Low power usage

Difficult to program functions as no interface

Cheap to mass-produce

Expensive expert help needed for repair

Reliable since no moving parts

Special purpose - designed to perform a single function

Principle operation of hardware devices


Virtual reality headset:

-consists of 2 lenses, an LCD display, a circuit board with sensors, a cover and foam padding

-display provides a simulation of a 3D environment using a 3D graphics package

-user can ‘move’ through moving their head or using controllers


Keyboard:

-keys are positioned in a key matrix consisting of rows and columns of wires

-a continuous test by a microprocessor identifies closed electrical circuits between rows and columns when a key is pressed and intersects the wires

-data stored in ROM determines the character code associated with the pressed key

-the OS ensures text characters appear on the screen/ the requested action has been executed


Printers

Laser printer:

-drum is made negatively charged, it revolves

-the drum is hit by lasers causing charge to leak away 

-positively charged toner is attracted to the negatively charged parts of the drum

-a sheet of paper is passed under the drum causing the toner to fall onto it

-heat causes the toner to stick to the paper

-excess toner is collected, image is formed

-requires a separate toner for cyan, magenta, yellow and black

-image quality is controlled by dots per inch



Inkjet printer:

-a sheet of paper is inserted 

-the printhead traverses across the sheet applying ink in a row

-the paper advances slightly and the process repeats

-the printhead consists of nozzles that eject droplets onto the paper, where ink is provided by ink cartridges 


3D printer:

-design is split into layers stored in a digital file

-data for first layer is transmitted to printer

-3D printer uses a nozzle to squirt material onto printer bed to create the layer

-process is repeated sequentially for each layer

-object is cured to stick layers together


Graphic plotter:

-a specialised device for drawing precise, detailed illustrations and designs

-it uses pens or drawing tools to create lines and shapes when moving across the paper

-best at creating vector graphics


Voice

Microphone:

-incoming sound waves cause vibrations in the diaphragm

-vibrations in air cause a coil to vibrate past a magnetic core

-analogue to digital converter (ADC) converts analogue signal into digital signal 



Speaker:

-current in speaker coil causes changing magnetic field

-changing magnetic field of coil interacts with permanent magnets in speaker exerting a force on the coil

-vibration of coil is transmitted to air

-the degree of vibration determines the amplitude and frequency of the sound wave produced


Touchscreen:

Resistive touchscreen:

-consists of two charged plates

-pressure causes plates to touch completing the circuit

-point of contact registered with coordinates to calculate position


Capacitive touchscreen:

-made from materials that store electric charge. When touched, charge is transferred to the finger. Most effective technology is PCT (projective touch capacitance) using an array of capacitors, allowing multi-touch


Screen:

-each pixel contains three sub pixels representing red, green and blue

-adjusting the brightness of each sub-pixel allows different colours to be represented


Cathode ray tube:

-electron gun emits a stream of electrons at a phosphorescent screen producing light

-electrons are controlled by electromagnets

Liquid crystal display (LCD):

-each pixel contains a liquid crystal cell, forming a pixel matrix

-an LED backlight illuminates the pixel matrix

-a polariser between the matrix and screen causes light to be polarised before and after hitting the pixel matrix

-applying a voltage to the pixel cell changes the liquid crystal alignment altering the light that passes through it and the screen content

Graphic input:

Webcam - transmits video footage to a computer system

Digital camera - can transfer and save photos or videos within the computer’s storage


Scanner:

-keeps a sheet of paper with a stationary image while a light source moves across it

-reflected light is guided by mirrors and lenses onto a charge-coupled device (CCD) 

  • CCD - consists of a grid of light-sensitive cells which each generate an electrical signal corresponding to the intensity of light it receives. Requires an analogue-to-digital converter to convert analogue signals to digital values. 


Secondary storage:

-non-volatile storage of files/data

-stores data not currently required by CPU

-stores data to transfer to another computer


Magnetic storage

Direct-access read-write device as any sector can be selected for reading and writing. Data is read sequentially.


To read:

  • Reads by looking at polarity and measuring direction and strength of magnetic field. 

  • Platters (stack of disks that store data with magnetic coating on surface) rotate at high speeds

  • Magnetic recording read/write head is attached to read/write arm, floating a millionth of a cm above disk

  • It moves along circular tracks of surface of disk → finds correct surface/track and required sector comes under head (seek time = time to find disk) → disk controller translates it into binary based on tiny current the surface, behaving like magnet, produces (latency = time this takes). 


Structure of a disc:

  • Track - circular paths on the surface of the disk to organise data. Data can be stored on different discs on the same track.

  • Sector - small storage unit within tracks typically 512 bytes

  • Cluster - groups of consecutive sectors 


To write:

  • Read-write head applies magnetic flux to write.


Advantages vs disadvantages:

  • Stores lots of data, cheap

  • But vulnerable to human touch/other magnetic fields and easily damaged.


E.g. hard disk, floppy disk, magnetic tape

Optical storage

Is direct-access


To write:

  • Data is written along singular spiral-pattern track from centre of polycarbonate disk to circumference, using laser which heats up materials to create non-reflective parts with lower surface (pits = 0) and reflective parts (lands = 1). 


Structure:

  • A single continuous spiral pathway extending from the innermost part of the surface


To read:

  • Disk spins in drive to ensure all data can be read, tracking mechanism moves laser to correct position over disk, and shines it onto disk. Light sensor detects how laser reflects off surface and translates information/signals into binary (1s and 0s). Spiral track is longer on outside so when reading data from outside edge, disk has to reduce rotation speed so data passes under laser at constant speed.

  • Lasers can move forwards and backwards along the track


CD-RW and DVD-RW (different from traditional optical media):

  • Use a unique alloy material as their reflective surface

  • During writing, laser heat turns the material into a liquid state

  • Intensity of laser determines whether material becomes crystalline or amorphous when it cools 

  • During reading, laser light reflects from crystalline solids but not amorphous ones allowing 1s and 0s to be encoded


Advantages vs disadvantages:

  • Stores more memory than magnetic, more durable, can be played on computers

  • But prone to scratches, slower as takes time to heat/cool surface for each bit of data


Increasing read-write speed

  • Increasing speed of rotation 


Increasing storage capacity:

  • Decreasing wavelength of lasers - blue rays have shorter wavelength so allow more pits and lands gathered per unit area


Blu-ray disc > digital versatile discs (DVD) > compact disc (CD) in terms of memory storage capacity

Solid-state (flash)


To read:

  • Control signal identifies which bit is needed and applies small voltage. If no electrons in area, transistor turns on (1), if there are electrons in region (‘pool’), transistor turns off (0). Change control signals to read other bits.

  • An entire page of data can be read in one operation


To write:

  • Before writing, existing data must be erased by releasing electrons

  • Use higher voltage to remove/add electrons to pools, which causes transistors to break down slowly. Silicon semiconductors form logic gates NAND and NOR. Information is stored in blocks. 


Advantages vs disadvantages

  • Faster access times, more reliable, store lots of data, lasts longer bc no moving parts, lighter, generates less heat, silent, requires less power, more robust. 

  • But limit to writing data on it (1 million times) as transistors break down slowly, expensive


Structure:

  • Memory cell - stores one bit of binary information, an array of transistors

  • String - vertical stack of memory cells

  • Page - a horizontal row of strings

  • Block - a group of pages


E.g. USB, solid state drive, memory cards



Memory

  • Memory consists of data and instructions in binary which are stored in memory addresses which are represented in binary. Memory can be read (looking up data in memory addresses) or written (saving new data into the memory). Usually measured in GB (gigabytes) or TB (terabytes).


Buffer - a queue that temporarily stores data before being transmitted to its destination to balance input and output speed of data. Functions as a queue so data emerges in the order it has entered. Usually created in computer memory.



RAM and ROM


RAM (random access memory)

ROM (read only memory)

  • Volatile - data is lost when power turned off

  • Temporary storage of data

  • Stores actively used data, software, instructions, parts of OS for the CPU

  • Can be read/written 

  • Non-volatile - data not lost when power turned off

  • Stores boot-up instructions that run when computer is turned on (using a small software called bootstrap loader)

  • Stores firmware including OS

  • Read-only



RAM

Static RAM (SRAM)

Dynamic RAM (DRAM)

Less power and faster access time as does not need to refresh

More power and slower access time as needs to be refreshed (recharged) due to electricity leakage

More expensive per bit as complex circuitry (usually 6/8/10 transistors per bit)

Cheaper per bit as simpler circuitry (1 transistor and capacitor)

Faster data access time

Slower data access time

Each bit stored in a flip-flop

Each bit stored as a charge

Lower data density

Higher data density

Used in cache memory

Used in main memory

Higher power consumption


ROM

Simple ROM

Programmable ROM (PROM)

Erasable programmable ROM (EPROM)

Electrically erasable programmable ROM (EEPROM)

Installed as part of the manufacturing process

Can be programmed once after created (burning the PROM)

Can be erased by UV light exposure then reprogrammed

Can be erased by an electrical signal then reprogrammed

Chips need to be replaced to change data

Data cannot be erased or deleted

Chip has to be removed for reprogramming

Can update data without removing chip

Can be rewritten many times

Can be rewritten many times

Does not require special equipment


Monitoring and control systems


Monitoring system - continuously observes and tracks some state external to the computer system, providing real time data and alerts.  


Control system - a monitoring system + actuator that regulates the behaviour of other devices or systems. Systems can be event or time driven. 



Sensor - measures an analogue property and transmits it to a processing unit generally as an electrical or optical signal. Includes temperature, humidity, pH and light sensors. 

Actuator - an electric motor connected to a controlling device used for switching appliances on or off / adjusting a setting converting a control signal into an action

ADC - converts analogue signals to digital signals

Transmission cable - transfers signals  


Closed loop feedback systems - the output from the system affects the input of sensors. Ensures the system operates within a given criteria allowing it to adjust conditions in a continuous process automatically.


Bit manipulation

-setting all bits to 0 - restarting a system (LDD X; AND #B00000000; STO X)

-toggling the value of one bit - changing the value of a flag (LDD X; XOR #B00000001; STO X)

-setting a bit to 1 - reporting a condition  (LDD X; OR #B00000001; STO X)

-setting all bits to zero except one bit (LDD X; AND #B00000001; STO X)


Cache

  • Cache memory is a small amount of fast/quick-access and expensive memory located near CPU storing active processes and frequently used instructions to increase processing speed and reduce main memory data transfer bottlenecks (when CPU has to wait for fetching data and instructions from memory). 

  • It speeds up FDE cycle when CPU fetches memory from RAM. Modern technology has reduced cache miss (when data CPU needs is not in cache).


Virtual Memory

  • Virtual memory = temporary storage of memory acting as extension for RAM in secondary storage e.g. hard disk drive. When RAM is full (when too much software is running simultaneously), data not being used is swapped from RAM to hard drive and vice versa when needed, freeing RAM for other processes. Computer slows down as processor has to wait while data is swapped between hard disk and RAM.

Advantages

Disadvantages

  • Runs programs larger than size of RAM

  • Increases efficiency of using physical memory

  • Significant performance drop/computer slows down as processor has to wait while data is swapped between hard disk and RAM

  • Read/write speed of hard drive is even slower than RAM as it is not made to access small pieces of data at a time.

  • Disk thrashing (high rate of hard disk access, loud) bc too much time constantly swapping information, lots of read/write operations occur, which slows speed/execution of programs


  • Paging (virtual memory) = programs are divided into small blocks of memory called pages. Only required pages are loaded in RAM. When page not required, it is swapped into hard disk. When it is required, it is swapped into RAM.




Logic gates and logic circuits


Logic gate - a component of a logical circuit that can perform a Boolean operation

Logic circuit - a circuit that performs logical operations on symbols