COMPUTER SCIENCE O LEVELS - 2210
Chapter 3: Input Devices
Barcode Scanner
A barcode scanner, also known as a barcode reader, is an electronic device that reads and decodes
information from printed barcodes. Here are some notes on barcode scanners, along with their
advantages and disadvantages:
Advantages
• Speed and accuracy: Barcode scanners can read barcodes much faster and more accurately
than humans can. This can increase efficiency and reduce errors in data entry.
• Easy to use: Barcode scanners are easy to use and require minimal training, making them ideal
for use in busy environments.
• Cost-effective: Barcode scanners are relatively inexpensive, and their use can help businesses
save money by reducing labor costs and minimizing errors.
• Versatile: Barcode scanners can be used in a wide range of industries, including retail,
healthcare, logistics, and manufacturing.
Disadvantages
• Limited functionality: Barcode scanners can only read barcodes and do not have the ability to
capture other types of data.
• Limited range: Handheld barcode scanners have a limited range and must be held close to the
barcode to read it.
• Barcode quality: Poor quality or damaged barcodes may be difficult or impossible for a
barcode scanner to read accurately.
• Cost of implementation: While barcode scanners themselves are relatively inexpensive, the
cost of implementing a barcode system, including software and training, can be significant
Q. What happens when a barcode is scanned?
» the barcode is first of all read by a red laser or red LED (light emitting diode)
» light is reflected back off the barcode; the dark areas reflect little or no light,which allows the
bars to be read
» the reflected light is read by sensors (photoelectric cells)
» as the laser or LED light is scanned across the barcode, a pattern is generated,which is converted
into digital data – this allows the computer to understand the barcode
» for example: the digit ‘3’ on the left generates the pattern: L D D D D L D
(where L = light and D = dark),this has the binary equivalent of: 0 1 1 1 1 0 1 (where L = 0 and D =
1).
HTTPS://WWW.YOUTUBE.COM/@86WAQARKHAN 1
COMPUTER SCIENCE O LEVELS - 2210
Q. What happens when the barcode has been read ?
» the barcode number is looked up in the stock database .
» 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 (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 re-ordering
every time the stock item barcode is read.
» when new stock items arrive, the stock levels are updated in the database.
Advantages to the management of using barcodes
» much easier and faster to change prices on stock items
» much better, more up-to-date sales information/sales trends
» no need to price every stock item on the shelves (this reduces time and cost to the management)
» allows for automatic stock control
» possible to check customer buying habits more easily by linking barcodes to,for example, customer
loyalty cards.
Advantages to the customers of using barcodes
» faster checkout queues (staff don’t need to remember/look up prices of items)
» errors in charging customers is reduced
» the customer is given an itemised bill
» cost savings can be passed on to the customer
» better track of ‘sell by dates’ so food should be fresher.
HTTPS://WWW.YOUTUBE.COM/@86WAQARKHAN 2
COMPUTER SCIENCE O LEVELS - 2210
Quick response (QR) codes
It is made up of a matrix of filled-in dark squares on a light background. QR codes can hold
considerably more information than the more conventional barcodes described earlier.
Advantages of QR codes compared to traditional barcodes
» They can hold much more information
» There will be fewer errors; the higher capacity of the QR code allows the use of built-in error-
checking systems – normal barcodes contain almost no data redundancy (data which is duplicated)
therefore it isn’t possible to guard against badly printed or damaged barcodes
» QR codes are easier to read; they don’t need expensive laser or LED (light emitting diode) scanners
like barcodes – they can be read by the cameras on smartphones or tablets
» It is easy to transmit QR codes either as text messages or images
» It is also possible to encrypt QR codes which gives them greater protection than traditional
barcodes.
Disadvantages of QR codes compared to traditional barcodes
» More than one QR format is available
» QR codes can be used to transmit malicious codes – known as attagging. Since there are a large
number of free apps available to a user for generating QR codes, that means anyone can do this. It is
relatively easy to write malicious code and embed this within the QR code. When the code is scanned,
it is possible the creator of the malicious code could gain access to everything on the user’s phone (for
example, photographs, address book, stored passwords, and so on). The user could also be sent to a
fake website or it is even possible for a virus to be downloaded
Application of QR codes
» advertising products.
» giving automatic access to a website or contact telephone number
» storing boarding passes electronically at airports and train stations.
How QR code is scanned?
» point the phone or tablet camera at the QR code
» the app will now process the image taken by the camera, converting the squares into readable data
» 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
» the user will then be sent to a website automatically (or if a telephone number was embedded in the
code, the user will be sent to the phone app )
» if the QR code contained a boarding pass, this will be automatically sent to the phone/tablet
Frame QR codes are now being used because of the increased ability to add advertising logos. Frame
QR codes come with a ‘canvas area’ where it is possible to include graphics or images inside the
code itself. Unlike normal QR codes, software to do this isn’t usually free.
HTTPS://WWW.YOUTUBE.COM/@86WAQARKHAN 3
COMPUTER SCIENCE O LEVELS - 2210
Digital Camera
A digital camera works by capturing and storing images electronically. Here is a simplified
explanation of the basic process:
• Light enters the camera through the lens and is focused onto an image sensor.
• The image sensor is made up of millions of tiny photosites, which are like individual light-sensitive
pixels.
• When light hits a photosite, it generates an electrical charge that is proportional to the intensity of
the light.
• The camera's analog-to-digital converter (ADC) converts the electrical charge from each photosite
into a digital value that represents the brightness of that pixel.
• The camera's image processor then combines the digital values from all the pixels to create a
complete image.
• The image is then stored on a memory card, usually in a compressed format such as JPEG.
These cameras are controlled by an embedded system which can automatically carry out the
following tasks:
» adjust the shutter speed
» focus the image automatically
» operate the flash gun automatically
» adjust the aperture size
» adjust the size of the image
» remove ‘red eye’ when the flash gun has been used
HTTPS://WWW.YOUTUBE.COM/@86WAQARKHAN 4
COMPUTER SCIENCE O LEVELS - 2210
Keyboard
A keyboard is a device that allows you to input data into a computer or other electronic device. When
you press a key on the keyboard, it sends a signal to the computer that corresponds to the character
or function associated with that key.
Following diagram and description summarises how the computer recognises a letter pressed on the
keyboard:
» There is a membrane or circuit board at the base of the keys
» In Figure 3.25, the ‘H’ key is pressed and this completes a circuit as shown
» The CPU in the computer can then determine which key has been pressed
» The CPU refers to an index file to identify which character the key press represents
» Each character on a keyboard has a corresponding ASCII value
Microphone
A microphone is a device that converts sound waves into an electrical signal. The process of how a
microphone works can be explained in the following steps:
1. Sound waves: The first step is the generation of sound waves. Sound waves are created when
an object vibrates, causing pressure waves to propagate through the air.
2. Diaphragm: The sound waves enter the microphone through a diaphragm, which is a thin,
flexible membrane that vibrates in response to the pressure waves.
3. Transducer: The diaphragm is connected to a transducer, which converts the mechanical
vibrations of the diaphragm into an electrical signal.
4. Signal Processing: The electrical signal is then processed and amplified to produce an output
signal that corresponds to the sound that was originally picked up by the microphone.
5. Output: The output signal can then be recorded, transmitted or amplified and played through a
speaker.
HTTPS://WWW.YOUTUBE.COM/@86WAQARKHAN 5
COMPUTER SCIENCE O LEVELS - 2210
Optical Mouse
How optical mouse works?
• An optical mouse is a computer mouse that uses light to track the movement of the mouse.
• It works by using a small LED (Light Emitting Diode) or infrared light emitter and a tiny camera to
take hundreds of pictures per second of the surface beneath the mouse.
• When you move the mouse across a surface, the pattern of the surface is captured by the camera
and sent to the computer, which calculates the movement of the mouse based on the changes in
the captured images.
• This movement data is then used to move the cursor on the screen.
• In summary, the optical mouse works by using an LED or infrared light emitter and a camera to
track the movement of the mouse across a surface, and then sends this information to the
computer to move the cursor on the screen.
Benefits of an optical mouse over a mechanical mouse
» There are no moving parts, therefore it is more reliable.
» Dirt can’t get trapped in any of the mechanical components.
» There is no need to have any special surfaces.
Most optical mice use Bluetooth connectivity rather than using a USB wired connection. While this
makes the mouse more versatile, a wired mouse has the following advantages:
» no signal loss since there is a constant signal pathway (wire)
» cheaper to operate (no need to buy new batteries or charge batteries)
» fewer environmental issues (no need to dispose of old batteries).
2D Scanner
How 2D scanner works?
A 2D scanner is a device that captures digital images of physical documents or images. The process by
which a 2D scanner works can vary depending on the specific technology used, but generally involves
the following steps:
1. Illumination: The scanner uses a light source to illuminate the document or image being scanned.
2. Reflection: The light that is reflected off the document or image is captured by a sensor in the
scanner.
3. Digital conversion: The sensor converts the captured light into a digital signal that can be
processed by the scanner's software.
4. Image processing: The scanner's software processes the digital signal to produce a high-quality
digital image of the document or image being scanned.
HTTPS://WWW.YOUTUBE.COM/@86WAQARKHAN 6
COMPUTER SCIENCE O LEVELS - 2210
3D Scanner
How 3D scanner works?
A 3D scanner is a device that captures the physical shape and dimensions of an object and creates a
digital 3D model.
The basic working principle of a 3D scanner is similar to that of a 2D scanner, but instead of capturing
a flat image, it captures the 3D shape and texture of an object.
There are several types of 3D scanners, but the most common types are structured light scanners and
laser scanners. Here's a brief overview of how each of these types of scanners work:
1. Structured light scanners: These scanners use a projector to project a pattern of light onto the
object being scanned. The pattern is typically a series of vertical or horizontal stripes, but it can
also be a grid or other pattern. A camera then captures images of the object from different angles
as the pattern of light is projected onto it. The scanner uses software to analyze the distortions in
the pattern of light caused by the object's shape and creates a 3D model.
2. Laser scanners: These scanners use a laser to scan the object and measure the distance to its
surface. The laser emits a beam of light that reflects off the object and returns to the scanner. The
scanner uses a sensor to measure the time it takes for the laser beam to travel to the object and
back, which provides information about the distance to the object's surface. By scanning the object
from multiple angles, the scanner can create a 3D model.
After the scanning process is complete, the 3D data is typically processed and refined using
specialized software to create a high-quality 3D model. The resulting 3D model can be used in a
variety of applications, such as 3D printing, animation, virtual reality, and more.
HTTPS://WWW.YOUTUBE.COM/@86WAQARKHAN 7