Computer Science

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Computer Science – Input and Output Device

3.2 – Input and Output Devices


3.2.1 – Input Devices
 Barcode scanners (readers)
o Series of dark and light parallel lines of varying thicknesses
o Numbers 0 to 9 are represented by a series of lines
o Guard bars are on each end and also separate the left from the right side
o Each digit is made up of two dark lines and two light lines
 Digits on the left begin with a light bar and have odd no. of dark
 Digits on the right begin with a dark bar and have even no. of dark
o When a barcode is scanned
 It is read by a red laser
 Light Is reflected back off the barcode (dark areas allow the reading)
 The reflected light is read by the photoelectric cells (sensors)
 A pattern is generated which is converted into digital data
 The barcode number is looked up in the stock database
 The stock item is looked up when found
 The price and other stock item details are sent back to the checkout
 Number of stock items is reduced by 1
 This new value is written back to the stock record
 Number of stock items is compared to the re-order level
 If it is less or equal to this value, stock items are ordered
 Once an order is generated a flag is added to stop re-ordering
 Stock levels are updated when new items arrive
 Input and output devices at a checkout
o Keypad
o Screen/monitor
o Speaker
o Printer
o Card reader/chip and PIN
 Advantages of using barcodes
o Easier and faster changes to prices on stock items
o More up-to-date information
o No need to price every stock item on the shelves
o Automatic stock control
o Possible to check customer buying habits
 Advantages of using barcodes for customers
o Faster checkout queues
o Errors are reduced
o Customer has an itemised bill
o Cost savings can be passed to the customer
o Better track of ‘sell by dates’ so food should be fresher
 Quick Response (QR) Codes
o Matrix of filled-in dark squares on a light background
o Includes a web address in the code
o Description
 Holds up to 4296 characters
 Three large squares at the top act as a form of alignment
o Uses
 Advertising
 Automatic access to a website or contact telephone number
 Storing boarding passes at airports or train stations
o Method of reading QR codes
 Point the phone camera at the QR code
 App will process the image, converting it into data
 Browser software will automatically read the data generated
 User will be sent to website automatically
 If the QR code contained a boarding pass it will be sent to the
phone/tablet
o Advantages of QR codes to traditional barcodes
 Hold more information
 Fewer errors
 Easier to read
 Easy to transmit
 Possible to encrypt QR codes
o Disadvantages of QR codes to traditional barcodes
 More than one QR format is available
 QR codes can be used to transmit malicious codes known as attaging
o New developments
 Frame QR codes have a graphic in it
 Digital Cameras
o Controlled by an embedded system than can automatically
 Adjust shutter speed
 Focus image
 Operate flash gun
 Adjust the aperture size
 Adjust size
 Remove red eye
 Etc.
o What happens when a photograph is taken
 Light passes through the lens onto a light-sensitive cell made up of
millions of tiny sensors which act as photo-diodes
 Each sensors are referred to as pixels
 Image is converted into tiny electric charges through an ADC to form
digital image array
 ADC converts the electric charges into levels of brightness
 Sensors also measure colour which produces another binary pattern
 Most cameras use a 24-bit RGB system so a 0-255 Red value, a
0-255 Green value, and a 0-255 Blue value
 Number of pixels determines the size of the file
 Quality of the image depends on the recording device
 Keyboards
o Frequent use of these devices can lead to RSI (repetitive strain injury)
o How they work
 Membrane or circuit board at the base of the keys
 When a key is pressed a circuit is completed
 CPU is the computer determines which key is pressed
 CPU refers to an index file to which the key is pressed
 Each character on the board has a corresponding ASCII value
 Microphones
o When sound is created it causes the air to vibrate
o The vibrations cause the diaphragm to vibrate
o Copper coil around the cone connected to the diaphragm moves backwards
and forwards
o This causes the coil to cut through the magnetic field around the permanent
magnet inducing an electric current
o The electric current is then either amplified or sent to a recording device
 Optical Mouse
o An example of an optical pointing device
o How it works
 Red light is bounced off the surface into a complementary metal oxide
semiconductor (CMOS)
 CMOS generates electrical pulses to a digital sensor processor (DSP)
 Processor can work out the coordinates of the mouse based on
changing image patterns
o Benefits of an optical mouse over a mechanical mouse
 No moving parts so more reliable
 Dirt can’t get trapped
 No need for special surfaces
o Wired mouse advantages
 No signal loss
 Cheaper to operate
 Fewer environmental issues
 2D and 3D Scanners
o How a 2D scanner works
 Document is placed on a glass panel and the cover is closed
 Bight light illuminates the document
 Scan head moves across the document until the whole page has been
scanned
 An image of the document is produced which is then sent to a lens
using mirrors
 The focused image falls onto a charge couple device (CCD) converts
light into electric current
 Software produces an electrical image
 Computers with optical character recognition can turn the scanned
text into a text file format
o 3D scanners
 Scan solid objects and produce a three-dimensional image
 Can be used in computer aided design
o Applications of 2D scanners at an airport
 Read passports
 The face in the passport is run through facial recognition software
o Application of 3D scanning
 Computed Tomographic creates a 3D image through a series of thin
slices with X-rays
 Touch Screens
o Capacitive Touch Screens
 A layer of glass(protective layer), a transparent electrode, and a glass
substrate is used
 When a finger touches the screen the electrostatic field of the
conductive layer is changed and the microcontroller can calculate
where this change took place
 Surface Capacitive
 Sensors are placed at the corners of the screen. A finger
touching the screen reduces the capacitance of each sensor
and a microcontroller measures the decrease in capacitance to
calculate the coordinates
 Projective Capacitive
 The conductive layer is now an X-Y matrix pattern which
creates a 3D electrostatic field. When a finger touches the
screen it creates a disturbance and the microcontroller can
determine the coordinates of that
o Advantages
 Better image clarity
 Durable
 Allow multi-touch
o Disadvantages
 Only work with bare fingers or special stylus
 Sensitive to electromagnetic radiation
o Infrared Touch Screens
 Infrared transmitters cover the screen in a matrix pattern
 Infrared sensors cover the edge of the screen to detect the infrared
rays
 If the infrared beams are broken it does not reach the sensor, the
sensor readings are sent to a microcontroller
o Advantages
 Allows multi-touch facilities
 Durable
 Operability isn’t affected by a scratched or broken screen
o Disadvantages
 Screen can be sensitive to water or moisture
 Possible for accidental activation
 Sensitive to light interference
o Resistive Touch Screens
 Two layers of electrically resistive material with a voltage applied
across them
 Upper layer is made of flexible polyethylene with a resistive coating on
one side
 The bottom layer is made up of glass also with resistive coating
 The two layers are separated by an inert gas
 The point of contact is detected with a change of voltage
o Advantages
 Good resistance to dust and water
 Can be used with bare fingers, stylus, and gloved hand
o Disadvantages
 Low touch sensitivity
 Doesn’t support multi-touch facility
 Poor visibility in strong sunlight
 Vulnerable to scratches on the screen
3.2.2 – Output Devices
 Actuators
o When a computer is used to control devices an actuator is used
 A mechanical or electromechanical device
 Light projectors
o Digital Light Projector
 Number of micro mirrors and how they are arranged determine
the resolution of the final image
 A bright white light is passed through the colour filter on its way to
the DMD chip
 The white light is split into the primary colors. The DLP projector
can make over 26 million colours to make the image
o Liquid Crystal Display
 A powerful beam of light is generated from a bulb or LED inside
the projector body
 A beam of light is sent to a group of chromatic-coated mirrors
which reflect the light back at different wavelengths
 The reflected light has wavelengths corresponding to red, green,
and blue
 These three different coloured lights pass though three LCD
screens
 This results in the same image in three different colours
 To fix this the images are combined in a special prism to form a
full-colour image
 The image passes through the projector lens
 Inkjet Printers
o A print head that sprays droplets of ink onto the paper
o Ink cartridges for Cyan, yellow, magenta, and black
o A stepper motor and belt
o A paper feed
 Thermal Bubble
 Tiny resistors create a heat which makes the ink vaporise
which causes the ink to form a tiny bubble. As the bubble
expands some of the ink is ejected from the print head
onto the paper. When the bubble collapses it creates a
small vacuum which draws fresh ink into the print head
 Piezoelectric Crystal
 A crystal at the back of the ink reservoir for each nozzle is
given an electrical charge to make it vibrate which forces
ink onto the paper
o What happens
 Data is sent to printer driver
 Ensures that the data is readable
 Ensures that the chosen printer is available to print
 Sends data to the printer and is stored in printer buffer
 Sheet of paper is fed into the main body of the printer
 As the sheet of paper moves, the print head moves from side to
side across the paper printing the text/image
 The paper advances slowly until the page is completed
 If there are more stuff in the printer buffer the whole process from
5 is repeated
 When the printer buffer is empty, the printer sends an interrupt to
the CPU in the computer
 Laser Printers
o Uses dry powder and static electricity to produce text and images
o What happens
 Data is sent to a printer driver
 Ensures that the data is readable
 Ensures that the chosen printer is available to print
 Sends data to the printer and is stored in printer buffer
 A printing drum is given a positive charge. As the drum rotates a
laser beam is scanned across it removing the positive charge in
most areas and leaves a negatively charged areas that match the
text/image
 The drum is then coated with positively charged toner
 A negatively charged sheet of paper is rolled over the drum
 Toner on the drum sticks to the paper
 To prevent the paper sticking to the drum the electric charge is
removed after one rotation of the drum
 The paper goes through a fuser (heated rollers) to melt the ink on
the paper
 The discharge lamp removes all electric charge from the drum
 3D Printers
o Layer by layer printing
 Direct 3d printing moves left, right, and up and down normally
 Binder printing first sprays a dry powder then a glue to form a solid
layer
o Steps
 Design is made using CAD
 Finalised drawing is imported into special software
 The 3d printer is set up to allow the object to be made
 The solid object is built layer by layer (often only 0.1mm thick)
 The object is removed from the printer and is then prepared
(removal of supports, washing it, cutting unused material, etc.)
o Uses
 Covering of prosthetic limbs
 Allow precision reconstructive surgery
 Aerospace
 Fashion and art
 Making parts for items no longer in production
 LED Screens
o Tiny light emitting diodes either red, green, or blue to produce vast range
of colours
o Used for outdoor displays
o Led to the production of OLED screens
 NOTE | Many TV screens are advertised as LED when in fact they
are LCD screens backlit by LEDs
 LCD Screens
o Tiny liquid crystals which change by applied electrical fields
o Only work with some backlighting
o LCD’s don’t produce light
o Advantages
 OLED
o Uses organic materials to create semi-conductors that are very flexible
o Advantages
 Thinner, lighter, and more flexible
 The light-emitting layers are lighter because it is made of plastic
 OLEDs giver brighter light than LEDs
 Do not require backlighting
 Can be made into large, thin sheets
 OLEDs have a large field of view
 Loud Speakers
o Produce sound
 Digital data is passed through digital to analogue converter
 Passed through an amplifier
 Electric current is then fed to a loudspeaker
o How it works
 Current flows through coil of wire that is wrapped around an iron
core which becomes a temporary electromagnet
 The electric current varies which causes the magnetic field to vary
which causes the iron core to vary
 The iron core is attached to a cone to produce sound waves
3.2.3 – Sensors
 Input devices which read or measure physical properties from their surroundings
 Computers cannot read these physical quantities so they have to be converted into
digital format using Analogue to digital converter
o Temperature
o Moisture
o Humidity
o Light
o Infrared (active)
o Infrared (passive)
o Pressure
o Sound
o Gas
o pH
o Magnetic Field
o Accelerometer
o Proximity
o Flow
o Level
 Monitoring
o A patient in a hospital for vital signs
o Intruders in a burglar alarm system
o Temperature levels in a car engine
o Pollution levels in a river
 Controlling
o Turning street lights on at night and off at day
o Controlling temperature in a central heating/air conditioning system
o Chemical process control
3.3 – Data Storage
 Computers require some form of memory and storage
o Primary memory – directly addressable by the CPU
 RAM (Random Access Memory)
 ROM (Read-only Memory)
o Secondary memory – Not directly addressable by the CPU, non-volatile, can
be external or internal
 Internal Secondary Storage
 HDD
 SSD
 External Secondary Storage
 DVD, CD, and DVD-RAM
 Blu-ray disc
 USB memory
 Removable Hard Drive
3.3.1 – Primary Memory
 RAM
o Can be written to or read from and data can be changed by the user or
computer
o Used to store data, files, part of an application or part of the OS currently in
use
o Volatile which means memory contents are lost when powering off the
computer
o The larger the RAM size the faster the computer will operate
o Dynamic Ram
 Has capacitors that holds the transistors and the transistors that allow
chip control to read and change the capacitors’ value
 Must be refreshed every 15 microseconds or it would lose its value
 Much less expensive to manufacture
 Consume less power than SRAM
 High memory capacity than SRAM
o Static Ram
 Uses flip-flops and latches to hold data
 Has faster data access
 Doesn’t need to be constantly refreshed
 ROM
o Non-volatile
o Permanent
o Can only be read
o Holds the BIOS and bootstrap
3.3.2 – Secondary and Off-line Storage
 Storage devices that are not directly addressable by the CPU
 Holds more storage but data access time is longer than RAM or ROM
3.3.3 – Magnetic, Optical, and Solid-state Storage
 Magnetic Storage
o HDD
 Data is stored in a digital format on the magnetic surfaces of the disks
 Platters can spin at about 7000 times per second
 Read-write heads consist of electromagnets that are used to read and
write data to and from the platters
 Each platter will normally have two surfaces which can be used to
store data
 The read-write heads can move really quickly, they can move from the
edge to the centre to the platter 50 times a second
 Data is stored in sectors and tracks
 Each sector on a given track will have a fixed number of bytes
 Many applications require the read-write heads to constantly look for
the correct blocks of data so these heads must move very quickly but
still introduces latency
 Through time the HDD will undergo numerous deletions and editing
which becomes slowly fragmented resulting in gradual deterioration
 Removable hard disk drives are essentially HDDs external to the
computer
o SSD
 Removes the issue of latency since they have no moving parts and all
data is retrieved at the same rate. They don’t rely on magnetic
properties
 Most common type of SSD store data by controlling the movement of
electrons within NAND or NOR chips
 Data is stored as 0s and 1s in millions of tiny transistors within the chip
which produces a non-volatile rewritable memory
o Optical Storage
 CDs and DVDs are described as optical storage devices. A beam of
laser light is used to read and write data to and from the surface of
these disks
 The discs use a thin layer of metal alloy or light-sensitive organic dye
to store the data. Both systems use a single, spiral track which runs
from the centre of the disk to the edge. When the disk spins the
optical head moves to the point where the laser beam ‘contacts’ the
disk surface and follows the spiral track from the centre outwards
 CD/DVD are divided into sectors allowing direct access to data and
also the outer part of the disk runs faster than the inner part of the
disk
o Blu-ray Discs
 High-density optical disc format similar to DVD. Used for playstation 4
and 5 games and for playing high-definition movies
 A dual layer Blu-ray disc can store up to 50GB of data which is over 5
times the capacity of a DVD and over 70 times more than a CD. This is
because it uses a blue laser to carry out read and write operations
which allow the pits and lands to be much smaller

You might also like