By Ms Payal Gupta
Chapter 3 & 4- CS
Hardware
Computers and their components
General-purpose computer system consists of a processor, memory, I/O functionality.
Understanding the need for
o Input: take in data from the outside world
o Output: display data for humans’ understanding
o Primary storage: computer’s main memory which stores a set of critical program’s
instructions & data
o Secondary storage: non-volatile storage for noncritical data that will not be frequently
accessed
o Removable secondary storage:
File backup and archive
Portable transfer of files to second device
Embedded systems
o Small computer systems such as microprocessors that are often a part of a larger system
o Each embedded system performs a few specific functions unlike general-purpose computers
benefits drawbacks
Reliable since there are no Difficult to program functions since there is either
moving parts no interface
Require less power Expensive expert help needed for repair
Cheap to mass-produce
Principle Operations of Hardware Devices
o Laser printer
A laser beam and rotating mirrors are used to draw image of the page on a photosensitive
drum
By Ms Payal Gupta
Image converted into electric charge which attracts charged toner such that it sticks to image
Electrostatic charged paper rolled against drum
Charge pulls toner away from drum and onto paper
Heat applied in the fuser to fuse toner to the paper
Electrical charge removed from drum and excess toner collected
o 3D printer
Process starts from saved digital file that holds the blueprint of object to be printed
Object is then built by sequentially adding layers of a material (e.g. polymer resin) until
object created
Object is then cured (e.g. resin-made objects are hardened by UV light)
o Microphone
Incoming sound waves enter wind screen and cause vibrations about a diaphragm
Vibrations cause coil to move past a magnetic core
Electrical current generated which is then digitized
o Speaker
Takes electrical signals and translates into physical vibrations to create sound waves
Electric current in voice coil generates an electromagnetic field
Change in digital audio signal causes current direction to change which changes field
polarity
Electromagnet is either attracted or repelled to a permanent magnet, causing a diaphragm
that is attached to the coil to vibrate
Vibration transmitted to air in front of speaker
Degree of vibration determines amplitude and frequency of sound wave produced
Magnetic Hard Disk
o Hard disk has platters whose surfaces are covered with a magnetisable material.
o Platters are mounted on central spindle and rotated at high-speed
o Surface of platters divided into concentric tracks & sectors, where data is encoded as
magnetic patterns
By Ms Payal Gupta
o Each surface is accessed by read/write heads
o When writing, current variation in head causes magnetic field variation on disk
o When reading, magnetic field variation from disk produces current variation in read head
Solid State (Flash) Memory
o Most use NAND-based flash memory
o Consist of a grid of columns & rows that has 2 transistors at each intersection
o Two transistors:
o Floating Gate: stores electros and the presence or absence of charge (electrons) represents
either 1 or 0
o Control Gate: controls charge (electrons) flow for read/write
Optical Disc Reader/Writer
o Disc surface has reflective metal layer and is spun
o Tracking mechanism moves laser assembly
o Lens focuses laser onto disc
o Laser beam shone onto disc to read/write
o Tracks have sequences of amorphous and crystalline states on the metallic layer
o When reading, the reflected light from the different states on the track are encoded as bit
patterns
o When writing, laser changes surface to crystalline and amorphous states along the track,
which correspond to 1s or 0s.
Touchscreen
o Considered as both an input & output device
o 2 types:
Resistive capacitive
Made from materials that store
Consists of two charged plates
electric charge
By Ms Payal Gupta
Resistive capacitive
Pressure causes plates to touch, completing When touched, charge transferred
circuit from finger
Point of contact registered with coordinates used
to calculate position
Virtual (Reality) headset
o Virtual headsets consist of 2 lenses, (LCD) display, circuit board with sensors, cover and
foam padding
o The display provides a simulation of a 3D environment, generated by a 3D graphics package
o The user can ‘move’ in the virtual environment by moving their head or using controllers
Buffers: short-term memory storage that stores data right before it’s used, typically in RAM.
Random Access Memory vs. Read Only Memory
RAM rom
Volatile memory: loses content when Non-volatile memory: does not lose content
power turned off when power turned off
Can be read and altered Can only be read
Used to store currently executing Used for storing OS kernel and boot up
program instructions
Types of RAM - Static RAM vs. Dynamic RAM
sram dram
Doesn’t need to refresh hence uses less Has to be refreshed, hence has slower
power and faster access time access times and needs higher power
More complex circuitry, hence more Only single transistor & capacitor, hence
expensive less expensive to purchase
Each bit stored in flip-flop Each bit stored as a charge
Has lower data density Has higher data density
Used in cache memory Used in main memory
By Ms Payal Gupta
Types of ROM – PROM vs. EPROM vs. EEPROM
pROM EPROM EEPROM
Erasable Programmable Electrically Erasable
Programmable ROM
ROM Programmable ROM
Can be programmed Can be erased by UV light Can be erased by an
only once after it is exposure and can then be electrical signal and can
created reprogrammed then be reprogrammed
Data cannot be erased Chip has to be removed for Can update data without
or deleted reprogramming removing chip.
Monitoring and Control Systems
o Monitoring System
Monitors some state external to computer system
No changes made to environment by the system and hence no feedback
o Control System
Regulates the behaviour of other devices or systems.
Event-driven system: the controller alters the state of the system in response to some event.
Time-driven system: the controller takes action at a specific point in time
o Hardware typically used in a system
Sensor: measures an (analogue) property and transmits it to a processing unit, generally as
an electrical or optical signal.
Actuators: switch on/off heavy appliances (e.g. heater to heat/fan to cool)
ADC: converts analogue signals to digital signals
Transmission cable: to transfer signals
o Feedback Systems
Output from system affects the input of sensors.
Ensures system operates within the given criteria
By enabling the system output to affect subsequent system inputs, it may cause a change in
the actions taken by the system
By Ms Payal Gupta
Thus enables the system to automatically adjust conditions in a continuous process
Logic Gates and Logic Circuits
Logic Gates: use one or more inputs and produce a single logical output
AND gate: If both inputs are high, the output is high (A•B)
A B Output
0 0 0
0 1 0
1 0 0
1 1 1
\n
A B Output
0 0 0
0 1 1
1 0 1
1 1 1
OR gate: If either input is high, the output is high (A+B)
By Ms Payal Gupta
NOT gate: an inverter (A)
A Output
1 0
0 1
A B Output
0 0 1
0 1 1
1 0 1
1 1 0
By Ms Payal Gupta
NAND gate: (A•B) \n
A B Output
0 0 1
0 1 0
1 0 0
1 1 0
NOR gate: (A+B) \n
A B Output
0 0 0
0 1 1
1 0 1
1 1 0
By Ms Payal Gupta
XOR gate: (A⨁B) \n