0% found this document useful (0 votes)
9 views

Chapter1 Notes

Uploaded by

Humera Raza
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Chapter1 Notes

Uploaded by

Humera Raza
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 89

Paper 1: Computer Systems

CONTENTS

Unit 1 Data Representation


Unit 2 Data Transmission
Unit 3 Hardware

Unit 4 Software

Unit 5 Internet and its Uses

Unit 6 Automated Systems

1
Uses of Binary System
➔ To process data in logic gates/transistors
➔ To store data in registers
➔ To process data on the computer

Differences between Denary, Binary and Hexadecimal


Denary Binary Hexadecimal

Base 10 system Base 2 system Base 16 system

Used in counting and Used to store data in registers Used in MAC addresses, IP
calculation in daily life and process data in logic gates addresses, HTML colour
and computers codes, error codes, etc.

Uses the digits 0 to 9 Uses 0s and 1s Uses digits 0 to 9 and


alphabets A to F

Has fewer digits for the same Has more digits for the same Has fewer digits for the same
value value value
How and why is hexadecimal used as a beneficial method of data
representation?
➔ Used in colour codes, error codes and IP & MAC addresses
➔ Easily understandable
➔ Easier to debug
➔ Takes less space on the screen

2
Data Conversions

- Binary to Denary
➔ Convert 11101110 to denary

128 64 32 16 08 04 02 01

1 1 1 0 1 1 1 0

11101110 = 128 + 64 + 32 + 08 + 04 + 02 = 238

- Denary to Binary
➔ Method #1: Subtracting with the largest possible
power of 2. Convert 142 to Binary
142 - 128 = 14 - 8 = 6 - 4 = 2 - 2 = 0

➔ Method #2: Successive division by 2

DIV MOD

142 0

71 1

35 1

17 1

8 0

4 0

2 0

1 0

0 1

142 = 10001110

3
- Binary to Hexadecimal
Convert 101111100001 to hexadecimal
➔ (Break into sets of 4)
➔ 1011 1110 0001
➔ B E 1
➔ 101111100001 = BE1

- Hexadecimal to Binary
Convert 45A to binary
4 5 A

0100 0101 1010


45A = 010001011010

- Hexadecimal to Denary
Convert 45A to denary
256 16 1

4 5 A
➔ (256 x 4) + (16 x 5) + (10 x 1)
➔ 1024 + 80 + 10
➔ 1114
(since A = 10)

- Denary to Hexadecimal
Convert 2004 to hexadecimal
DIV MOD

16 2004 4

16 125 13

16 7 7

➔ 2004 = 7D4
➔ (Since 13 = D)

4
Binary Addition & Overflow Concept
➔ Add 126 and 26 in binary
➔ 126 = 10100010
➔ 62 = 00011010
➔ (126 + 62 = 188)

CARRY 1

1 0 1 0 0 0 1 0

+ 0 0 0 1 1 0 1 0

SUM 1 0 1 1 1 1 0 0

128 64 32 16 08 04 02 01

1 0 1 1 1 1 0 0

➔ Overflow error is the result of carrying out a calculation that produces a value too
large for the computer’s allocated word size. Example:

Add 110 + 222 in binary

(110 + 222 = 332; an 8-bit register can store a maximum value of 255)
.
CARRY 1 1 1 1 1 1 1

110 0 1 1 0 1 1 1 0

222 1 1 0 1 1 1 1 0

SUM 0 1 0 0 1 1 0 0

➔ The extra carry in the answer indicates that overflow error has occurred. The answer
is greater than 255.
➔ Overflow error occurs when the value is greater than the maximum value of the register

5
Logical Binary Shifts
 A Left Logical Shift of one position moves each bit to the left by one. The
vacant least significant bit (LSB) is filled with zero and the most
significant bit (MSB) is discarded.
 If no 1’s are lost (number is doubled) multiplied by 2
 A Right Logical Shift of one position moves each bit to the right by one.
The least significant bit is discarded and the vacant MSB is filled with
zero.
 If no 1’s are lost (number is halved) divided by 2.

➔ Each shift left is equivalent to multiplying the binary number by 2n (where n is the
number of places shifted)
➔ Each shift right is equivalent to dividing the binary number by 2n (where n is the
number of places shifted)
➔ Examples:

1. Shift 00010101 two places

to the left 00010101 = 21


01010100 = 84 = 21 x 22
(The most significant 0 bits (leftmost bits) are lost)

If the leftmost 1 bits are lost while shifting to the left, an error will occur because the limit
of the maximum number of left shifts possible will have been exceeded

2. Shift 01100100 two places to

the right 01100100 = 100


00011001 = 25 = 100 / 22
(The least significant 0 bits (rightmost bits) are lost)

If the rightmost 1 bits are lost while shifting to the right, an error will occur because the
limit of the maximum number of right shifts possible will have been exceeded

6
Fig. 1 Logical Shift by one bit

Two’s Complement Format


➔ Used to represent negative binary numbers
➔ Leftmost bit is changed to a negative value
➔ Leftmost bit determines the sign of the number

➔ Negative binary numbers in two's complement format to denary

1. Convert 10010011 to denary


-128 64 32 16 08 04 02 01

1 0 0 1 0 0 1 1
10010011 = -128 + 64 + 16 + 2 + 1 = -45

7
➔ Negative denary numbers to binary numbers in two's complement format

2. Convert -67 to binary in two’s

complement format 01000011 (write +67 in

binary)
10111100 (Invert all the values)
Add 1 in the inverted binary value
CARRY

1 0 1 1 1 1 0 0

+ 1

SUM 1 0 1 1 1 1 0 1

-128 64 32 16 08 04 02 01

1 0 1 1 1 1 0 1
10111101 = -128 + 32 + 16 + 8 + 4 + 1 = -67

Text, Sound & Images


➔ Text is converted to binary to be processed by a computer
➔ A character set is a list of all characters and symbols represented by a computer
➔ Each character and symbol has a unique value

ASCII Extended ASCII Unicode

7-bit code 8-bit code 16/32-bit code

English language only English language only, with Multiple languages and
some non-English symbols symbols

Uses less bits per character Relatively uses less bits per Uses more bits per character
character

➔ A sound wave is sampled for sound to be converted to binary using an ADC


➔ Sampling is used by determining the amplitude of the sound after set intervals. This
gives an approximate representation of the sound wave.
➔ Sample rate is the number of samples taken per second
➔ Sampling resolution is the number of bits required per sample (i.e: bit depth)

8
➔ The accuracy of a sound file increases with greater sample rates and sampling
resolutions, but so does the file size

➔ An image is a series of pixels that are converted to binary, which is then


processed by computers
➔ Image resolution is the total number of pixels in the X-Y direction of an image
➔ Colour depth is the number of bits to represent each colour
➔ The image quality increases with increasing colour depth and image resolution, but so
does the file size

Data Storage and File Compression


Name of Memory Size Number of Bytes Equivalent Denary Value

1 kibibyte (1 KiB) 10 1 024


2
1 mebibyte (1 MiB) 20 1 048 576
2
1 gibibyte (1 GiB) 30 1 073 741 824
2
1 tebibyte (1 TiB) 40 1 099 511 627 776
2
1 pebibyte (1 PiB) 50 1 125 899 906 842 624
2
1 exbibyte (1 EiB) 60 1 152 921 504 606 846 976
2

➔ Nibble = 4 bits
➔ Byte = 8 bits

- Calculation of File Size


➔ Image resolution (in pixels) x Colour depth (in bits)
➔ Sample rate (Hz) x Sample resolution (in bits) x Length (seconds)

- Data Compression
➔ Exists to reduce file size
➔ File size needs to be reduced so that it:
↳ Uses less bandwidth
↳ Uses less storage
↳ Has a shorter transmission time

9
➔ Lossy file compression is a compression technique that does not allow the original
file to be reconstructed. Common lossy file compression algorithms include MPEG-3
(MP3), MPEG-4 (MP4) and JPEG.

➔ It can reduce the file size by:


↳ Using a lossy compression algorithm
↳ Reducing the sample resolution/bit depth (for sound)
↳ Reducing the sample rate (for sound)
↳ Reducing the image resolution (for images)
↳ Reducing the colour depth (for images)
↳ Using perceptual music shaping/removing redundant data

➔ JPEG reduces the colour depth and image resolution. Extra colour shades are
removed as they are unnoticeable by eyes.
➔ MP3 & MP4 reduce the sample rate and sampling resolution. They remove the sounds
that are out of the hearing range of a human ear and, if two sounds are playing
simultaneously, eliminate the softer one.

➔ Lossless file compression is a compression technique that reduces the file size
without any permanent loss of data
➔ Common algorithms include Run-Length Encoding (RLE)
➔ It can reduce the file size by:
↳ Using a lossless compression algorithm
↳ Identifying repeating patterns
↳ Indexing the patterns…
↳ …storing the indexes in a table/database
↳ …with the index and the pattern

➔ In RLE, the size of a string with adjacent/identical data is reduced. It is encoded to 2


values; the number of times the data is repeated, code of the data item. This is only
effective with a long run of repeated bits/data.

10
Unit 2: Data Transmission
Types and methods of Data transmission

- Data Packets
➔ Data that is sent over long distances is usually broken up into data packets or datagrams
➔ Why is it broken down? It makes the process of sending data much easier, as it's
easier to control compared to a long, continuous stream of data
➔ Each packet is sent towards the same destination through different routes
➔ One issue of splitting data into packets is the reassembling of data because
when it finally reaches the destination, they are not in the sequence they were
originally sent

➔ A data packet consists of a packet header, payload and trailer


➔ The packet header further consists of:
↳ IP address of the receiver (destination address)
↳ Packet number
↳ IP address of the sender (originator’s address)
➔ The payload consists of the actual data that has to be sent
➔ The packet trailer consists of:
↳ Method of identifying the end of the packet
↳ an error checking method, usually CRCs or Cyclic Redundancy Checks (involve
counting the number of 1-bits in the data before sending it, appending that number to it
and sending, after which the receiver does the same and compares the data)

➔ Packet switching is a method of data transmission in which data is broken up into


a number of data packets
➔ Each packet could be sent through different paths, from the start to the end point
➔ At each stage, there are nodes that contain a router
➔ A router receives the data packet and, according to the information it obtains from
its header, decides which route the data packet takes next
➔ The shortest route to the next router is chosen; that is only if that route is not busy
➔ Packets may arrive out of order
➔ The receiving device will rearrange the packets according to the sequence
number in the header of each data packet
➔ Hopping is used to overcome the problem of packets getting lost

11
Benefits Drawbacks

Remove the need to tie up a single Packets can be lost


communication line

Re-routing to overcome failed or busy Errors can occur during real-time streaming
routes is easy to do

Easy to expand package usage Delay at the destination during the


rearrangement/reassembly of packets

Allows the possibility of high data


transmission

- Data transmission
➔ The three factors that are considered by the communication protocol for the
transmission of data are:
↳ direction of data transmission
↳ method of data transmission
↳ data synchronisation

➔ There are 3 types of transmission directions:


↳ Simplex data transmission
↳ Half-duplex data transmission
↳ Full-duplex data transmission

➔ Simplex data transmission is in one direction only, e.g: computer to printer


➔ Half-duplex data transmission is in both directions, but not at the same
time, e.g walkie-talkies
➔ Full-duplex data transmission is in both directions at the same time, e.g:
broadband internet connection

➔ Types of data transmission:


↳ Serial data transmission
↳ Parallel data transmission

12
Serial Data Transmission Parallel Data Transmission

One bit at a time over a single wire/channel Several bits of data are sent down several
wires/channel

It can be simplex, half-duplex or full-duplex It can be simplex, half-duplex or full duplex

Works well over long distances Works well over short distances

Slow data transmission Fast data transmission

Data received is fully synchronised/has a High chances of data arriving skewed/data


very low chance of arriving unsynchronised can arrive unsynchronised if sent over long
distances

It is less expensive due to fewer hardware Parallel ports require more hardware,
requirements making them more expensive to implement
than serial ports

Used if the amount of data being sent is Used when input/output operations needs
relatively small to be programmed

Has a lower risk of external interference —


than parallel does (due to fewer wires)

- Universal Serial Bus


➔ Is a form of serial data transmission
➔ Most common type of input/output port found on computers
➔ Used to transmit data between computer and devices
➔ Supports both half-duplex and full-duplex data transmission
➔ Red and black wires are for power
➔ Green and white wires are for data transmission

➔ When a device is plugged into computer using a USB port, the computer
automatically detects the device, recognizes it and loads the appropriate device
driver (if the computer already has the respective device’s driver downloaded)
➔ If the driver is not downloaded, the computer will look for it and download it

13
Advantages of USB Disadvantages of USB Port

➔ Automatic detection of the plugged ➔ Maximum cable length that is available is


in device by the computer 5m
➔ Only one way to connect and hence, ➔ Older versions of USB may still not be
prevents incorrect connections supported by some new versions of
being made computers
➔ It is now the industry standard/a lot of ➔ Some versions of USB have slow data
support is available transmission
➔ Supports different rates of data
transmission (1.5 Mbps to
5Gbps)
➔ No need for an external supply of power
➔ Notifies the user in case of error
➔ More USB ports can be plugged in using
USB hubs
➔ USB is backward compatible/can be used
on old versions

Methods of Error Detection


➔ Errors can occur during data transmission due to various reasons, such as:
↳ interference
↳ problems during data switching (can lead to loss or gain of data)
↳ skewing of data

- Parity Checks
➔ Checks the number of 1-bits in a byte
➔ There are two types of parity: EVEN, which means there is an even number of
1-bits and ODD, which means there is an odd number of 1-bits
➔ The parity bit is the leftmost bit, where either 0 or 1 is added according to the
parity being used
➔ If even parity is used and the number of 1s are odd, 1 will be added in parity bit
➔ If even parity is used and the number of 1s are even, 0 will be added in parity bit
➔ If odd parity is used and the number of 1s are even, 1 will be added in parity bit
➔ If odd parity is used and the number of 1s are odd, 0 will be added in parity bit
➔ The parity used is decided between the sender and receiver. This helps to compare
the data before sending and after receiving it.
➔ If there is a change in the parity post-transmission, then an error has occurred

14
- Example:

(Even parity
used) Sender:
0 1 0 1 1 1 0 0

Receiver:
0 1 0 0 1 1 0 0

Here, the number of 1-bits is even at the sender's side, but odd at the receiver's side.
Hence, an error occurred.

➔ There are some cases where the number of 1-bits adds up to the correct
parity on both sides, but the actual number of 1-bits is different when compared.

- Example:

(Odd parity
used) Sender:
0 1 1 1 0 0 0 0

Receiver:
0 1 1 1 0 1 1 0

Here, there are 3 1-bits at the sender's side, but 5 at the receiver's side. This is still an
error but it won’t be identified, as both still have odd parity. This is a transposition
error.

➔ One way to identify errors is to use parity blocks


➔ The block of data is sent and the number of 1-bits is totalled horizontally (rows) and
vertically (columns)
➔ This not only helps identify that an error has occurred, but also where the error occurred

15
An example of a parity block. Even parity is used. Column 1 is a parity byte.

Column 1 Column 2 Column 3 Column 4 Column 5 Column 6 Column 7 Column 8

Byte 1 1 0 1 0 0 1 1 0

Byte 2 1 0 1 0 1 1 0 0

Byte 3 1 0 1 0 1 1 1 1

Byte 4 1 0 1 1 0 1 1 1

Byte 5 1 0 1 0 0 0 1 1

Byte 6 0 0 1 0 1 0 0 0

Byte 7 0 0 1 0 0 1 0 1

Byte 8 1 0 1 1 0 0 1 0

Byte 9 1 0 1 1 0 1 0 0

Parity 1 0 1 1 1 1 1 0
Byte

Error occurred in:


Byte 7
Column 6

- Checksum
➔ Data is sent in blocks along with an additional value, the checksum
➔ Checksum is a calculated value from the block of data being sent
➔ Calculation is done using an agreed algorithm which is agreed upon by both
the sender and receiver
➔ Checksum is sent the end of the block of data during transmission
➔ The receiver once again calculates the checksum from the data, and sees if
the new value is the same as the previous checksum or not
➔ If the new value is not the same, then an error has occurred. The receiver
sends a request to the sender to resend the data.

16
- Echo Check
➔ Data is first sent to the receiver who returns the data to the sender
➔ Here, the sender checks if any error, with the help of the original file, has
occurred in the data. If so, the data is re-sent.
➔ It is not very reliable, as it is unknown if the error occurred when data was
sent to the receiver or when the data was sent back to the sender
➔ So, it just checks if the data was transmitted correctly or not and does not tell when
the error occurred

- Check Digits
➔ A check digit is the final digit included in a code
➔ Calculated after other digits’ calculation
➔ Used on barcodes of products such as International Standard Book Numbers
(ISBN) and Vehicle Identification Numbers (VIN)
➔ Check digits are used to identify any errors in data entry which might’ve been
caused by mistyping or miss scanning a barcode
➔ There are two methods of generating a check digit: ISBN 13 and Modulo-11

- Automatic Repeat requests (ARQs)


➔ Is an error-checking method used to send data until correct data is sent
➔ ARQ uses positive and negative acknowledgements and timeout
➔ Positive and negative acknowledgements are used to indicate whether or not the
data was received correctly
➔ Timeout is the time interval allowed to elapse before the data is sent again
➔ The receiving device receives, for example, an error detection code as part of data
transmission using a CRC (Cyclic Redundancy Check); parity check and checksum
can also be used. CRC is used to check if the data transmitted has any errors.
➔ If no, a positive acknowledgement is sent to sender
➔ If yes, a negative acknowledgement is sent to sender and the receiver
requests re-transmission
➔ Timeout is used by the sender
➔ If no positive acknowledgement is sent within the time frame, then the
data is sent automatically
➔ ARQ is often used by mobile phone networks to guarantee data integrity

17
Symmetric and Asymmetric Encryption

- Purpose of encryption
➔ Encryption decreases the chance of data being intercepted by a hacker or, in this
case, an eavesdropper
➔ Encryption alters the data so that it is not understandable to anyone but those
who are authorised to view it

➔ The original/unencrypted data is known as plaintext


➔ Once it is encrypted or goes through an encryption algorithm, it is known as ciphertext

- Symmetric Encryption
➔ Uses a single encryption key for both encryption and decryption
➔ There is risk of security, as the key is still sent to the receiver beforehand
and can be obtained by hackers

- Asymmetric Encryption
➔ Uses two keys: public key and private key
➔ Overcomes the security issue that was in symmetric encryption
➔ Public key is available for everyone
➔ Private key is known to the computer user/receiver only
➔ Both types of key are needed to encrypt and decrypt
➔ The keys are generated using a hashing algorithm
➔ Person A will first generate a matching pair of keys, which will be stored on their computer
➔ A will send their public key to Person B, who actually wishes to send a document to A
➔ B will use the public key to encrypt the document and send it back to A
➔ A will use the private key to decrypt the document

18
Unit 3: Hardware
Computer Architecture

- Central Processing Unit


➔ It is also known as a microprocessor or processor
➔ A microprocessor is a type of integrated circuit on a single chip.
➔ Central to all modern computers systems and gadgets
➔ Often installed as integrated circuit on a single chip
➔ Has the responsibility of the execution and processing of all the instructions and
data in a computer application
➔ The CPU consists of a control unit (CU), arithmetic and logic unit (ALU), registers and
buses, and a system clock
➔ CPU is a part of Von Neumann architecture

➔ Von Neumann architecture was introduced in the mid-1940s by John von Neumann.
➔ It had the following main features:
↳ concept of a CPU
↳ CPU could directly access the memory
↳ storage of programs and data by computer memories
↳ stored programs were made up of instructions that had to be followed or executed
in a sequential order

➔ The following are components of a CPU:

1) Arithmetic and Logic Unit (ALU)


➔ Allows the required arithmetic or logic operations to be carried out
➔ A computer can have more than one ALU

2) Control Unit (CU)


➔ Reads instruction from the memory
➔ Address of the instruction’s location is found from Program Counter (PC)
➔ Instruction is interpreted using the Fetch-Decode-Execute cycle
➔ The CU ensures the synchronisation of data flow and program instructions
throughout the computer by sending out control signals
➔ The CU decodes an instruction using an instruction set
➔ The system clock is used to produce timing signals on the control bus to ensure
this vital synchronisation takes place

19
➔ 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
➔ The CPU takes data and programs held in the Hard Disc Drive or backing store, and
puts them in the RAM temporarily
➔ Why? Read/write operations work faster when carried out on the RAM rather than on
the Hard Disc Drive since there are no moving parts in RAM

3) Registers
➔ The registers in our syllabus are:

Registers Full Form Function

CIR Current Instruction Register Stores the current instruction being decoded
and executed

Used when carrying out ALU operations; it


ACC Accumulator stores the data temporarily during the
calculations

Stores the address of the memory location


MAR Memory Address Register being currently read or written to

Stores data which has just been read from


MDR Memory Data Register memory data or that which is about to be
written to memory

PC Program Counter Stores the address of the next instruction to


be fetched

- Memory
➔ Computer memory is made of a number of partitions
➔ Each partition has an address with its content
➔ The address will uniquely identify every location in the memory and the contents will
be binary values stored in each location
➔ In a READ operation, the memory address of the contents that are to be read aer
copied to the MAR. This sends a READ signal to the computer memory, and it will put
the contents of that specific address into the MDR.
➔ In a WRITE operation, the memory content is first written into the MDR to be stored.
A WRITE signal will be sent to the computer, and then the memory location’s
address is written into the MAR.

20
- 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. The address bus is
used here

3 The contents/ instructions/data at the memory location or address in the MAR are
temporarily copied in the MDR from memory (RAM) using the data bus

4 The contents or instructions of the MDR are then copied and placed in CIR

5 The PC is incremented by 1. This means the next instruction is ready to be copied and
decoded.

6 The content or instructions stored in CIR/IR are decoded

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

- Cores, Cache and Internal clock


➔ Other components that make up part of the CPU and can make a significant
difference to the overall operating speed of a computer
➔ While the CPU processes instructions and data extremely quickly, some factors
can affect a computer's performance

21
1) Clock Speed
➔ Is very important for a CPU’s performance capabilities
➔ Refers to the number of electrical pulses that the clock inside the CPU can produce each
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 serious un-
synchronisation of operations, causing the computer to glitch and crash. It will also
cause serious overheating of the CPU.

2) Cores
➔ More cores will improve overall computer performance
➔ Each core includes an ALU, CU and registers
➔ Many computers are either dual core or quad core. Many operations are
carried out simultaneously.
➔ More cores lower the need of increasing the system clock speed
➔ However, this causes the time taken for the CPU to communicate with each core to
increase, as more cores are added

3) Cache
➔ Use of cache memory can also improve CPU performance
➔ Cache memory is located in the CPU itself, and hence has much faster data access
time than RAM
➔ It allows for faster data access as it stores the instructions and data that needs to be
accessed frequently, improving CPU performance
➔ When a CPU wishes to read the memory, it will first check the cache, and then move
on to the main memory/RAM if the required data isn't there
➔ The larger the cache memory size, the better the CPU performance

22
- Instruction Set
➔ A set of common instructions have been developed by processor manufacturers so
that CPUs operate as efficiently as possible
➔ This instruction set is a list of all the commands that can be processed by a CPU
➔ The instructions, called operations, are in machine code and are the most basic
types of commands that computers can process
➔ These operations can ensure that the control unit and arithmetic logic unit can carry
out their respective jobs easily

➔ Operations are made up of opcodes and operands


➔ Opcode stands for Operational Code, and it gives the CPU an operation that needs to be done
➔ Opcodes are stored on the computer's hard disc, and would usually be copied into the
RAM when the computer is powered on. The most regularly used opcodes would then
be shifted from RAM to the cache memory.
➔ Operand is the data that needs to be acted on
➔ The operand may be a piece of data itself, or it may be an address location within the
main RAM or register

- Embedded Systems
➔ Embedded systems are built into devices to carry out specific tasks. They run on
firmware and do not have additional peripherals.
➔ Embedded systems have a microprocessor, either analogue or digital input, a user
interface and output

➔ The data is input either manually (from a keypad or such) or is collected


automatically from a source, such as sensors
➔ The input data can be either analogue or digital
➔ The output will be the specific function of that embedded system. It can be sending
signals to problem-respective actuators, or more.
➔ Examples of embedded system include: motor vehicles, set-top box, security
systems, lighting systems, vending systems, washing machines

23
Benefits Drawbacks

Small in size and easy to fit in devices Can be difficult to upgrade certain devices to
new technology

Low cost to manufacture Troubleshooting faults

Dedicated to only one task and therefore have a Interface appears simple, but it can still be more
simple interface and system confusing for people

There is no requirement of an operating system Any device is susceptible to attacks from


hackers and viruses

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

Operate in real time and are feedback —


orientated

Are mass produced and hence, reliable —

Less power consuming —

Input Devices

1) Barcode Scanners (Readers)


➔ Barcodes are a series of dark and light parallel lines 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.
➔ Benefits of using barcodes for customers include faster checkout queues, less
errors in charging, itemised bills, cost savings visibility, and better track keeping
of "sell by” dates

➔ How is a barcode scanned?

24
1 A barcode scanner emits a red laser on LED in the barcode

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)

3 White is 0 and Black is 1

4 This reflected light is captured by the sensors in the barcode scanner

5 A pattern is generated and it is converted into digital data

2) QR codes
➔ QR codes are a type of barcode made up of a matrix of filled-in dark squares
on a light background
➔ They hold considerably more information than traditional barcodes
➔ QR codes are more complex due to the increased data capacity and the use of small
squares, known as pixels
➔ The three large squares in three corners of the QR code are for alignment, and the
remaining corner is for the camera angle and size
➔ QR codes are used for advertising products, accessing websites, phone numbers,
and storing boarding passes electronically at airports and train stations
➔ QR codes are being updated to frame QR codes that include advertising logos, but the
software needed for this isn't free

➔ Advantages of QR codes include:


↳ ability to hold more information
↳ fewer errors
↳ easy and convenient to scan
↳ easy transmission as images
↳ can be encrypted

➔ Disadvantages of QR codes include:


↳ There is more than one QR code format available
↳ Malicious codes can be sent through QR codes; this is known as attagging

➔ How are QR codes scanned?

25
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 Each pixel/small square will be converted to a binary value

5 Data will be read and necessary action will be taken by the phone (e.g. Redirects to a
website, phone app will be opened if a telephone number was within the QR code

3) Digital Cameras
➔ Modern digital cameras can connect to a computer system via USB or Bluetooth
➔ Cameras are controlled by an embedded system and perform tasks like adjusting
shutter speed, focusing on the image, operating the flash gun, adjusting the aperture
size, adjusting the image size, and removing red-eye

➔ When an image is taken, light passes through the lens onto a light-sensitive cell
made up of millions of tiny sensors acting as photodiodes
➔ The sensors are called pixels, which make up the image
➔ The image is converted into tiny electric charges using Charged Coupled Device
(CCD) and passed through an ADC to form a digital image array
➔ The ADC converts the electric charges from each pixel into levels of brightness
➔ The sensors also measure colour, which produces another binary pattern. Most
cameras use a 24-bit RGB system
➔ The file size is determined by the number of pixels, and image quality depends on
the device used, the resolution, the levels of light, and the storage type of the image

4) Keyboard
➔ Most common method/input device used for data entry
➔ it can be physical: connected to a device through a USB connection or Bluetooth, or
it can be virtual, like on a touch screen

➔ How a computer recognises a letter pressed on the keyboard:

26
1 There is a circuit board at the base of the keys, composed of conductive layers with an
insulating layer present between them.

2 A character key is pressed. Now, as there is a gap between the conductive layers right below
the character; the conductive layers touch each other when the character is pressed. This
completes a circuit.

3 When the circuit is completed, the CPU/microprocessor determines which character’s key was
pressed

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

5) Microphones
➔ Are either build-in or connected through a USB or Bluetooth connection
➔ A microphone converts sound waves into an electric current
➔ Current is converted into a digital format to be processed by the computer
➔ How does a microphone work?

1 The air vibrates when sound is created

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

6 This induces an electric current

7 This current is analogue in nature

8 The electric current is then either amplified or sent to a recording device

9 Electric Current is converted to digital from using an ADC

27
6) Optical Mouse
➔ Captures 1500 images per second using tiny cameras
➔ Works on any surface with the help of a red LED and a CMOS sensor
➔ CMOS generates electric pulses that represent the red light and sends them to a
digital signal processor (DSP)
➔ 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)

7) 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

2 A xenon lamp or LED emits a bright light on the document

3 The document is moved from side to side, and then advanced slightly, until the whole
document is scanned

4 The document is scanned using a scan head

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)

7 The scanned image has now turned into an electronic form

➔ Applications of 2D scanners:
↳ Used to read passports at airports
↳ Make use of OCR (Optical Character Recognition) technology to produce digital images
that represent the passport pages

28
↳ The person's image on the passport is scanned and stored in JPEG format and another
picture is taken of the person
↳ Both pictures are compared using a face recognition software, which will tell if the
pictures belong to the same person or not

8) 3D Scanners
➔ Scans solid, 3D objects in x, y, z directions
➔ Produces a digital image which represents the solid object that was scanned
➔ Scanned images are then either used in a CAD (Computer Aided Design) and/or
sent to a 3D printer, which will produce a working model of the scanned image
➔ Application of 3D scanning:
↳ Computed Tomographic (CT) scanners
↳ Used to create a 3D image of the solid object
↳ Based on tomography technology, in which the whole image is build upon the
series of very thin ‘slices’. All these slices come together to form an image. X-rays
are used.
↳ Have other names, such as MRI (Magnetic Resonance Imaging), which uses radio
frequencies to build the slices, and SPECT (Single Photon Emission Computed
Tomography), which uses gamma rays

9) Touch Screens
➔ The common types of touch screen technologies are:

Capacitive Infra-red Resistive

➔ Composed of a layer of glass ➔ An invisible grid of infra-red ➔ Uses multiple layers of


(protective layer), a transparent beams is made; infra-red beams material
electrode (conductive layer) and are sent out from two edges of
a glass substrate the screen ➔ These transmit electric
currents
➔ Current is sent/flows out from ➔ When the screen is touched,
all 4 corners of the screen the infra-red beams are broken ➔ When the top layer/screen is
pushed into the lower/bottom
➔ When the finger/stylus ➔ The microprocessor is able to layer, a circuit is completed
touches the screen, the current detect the coordinates of the
changes touch ➔ The voltage produced enables
the microprocessor to
pinpoint the coordinates of
the point of contact

29
➔ The coordinates of the touch
are calculated by the
microprocessor

Screen type Advantages Disadvantages

Capacitive ➔ Better image quality ➔ Surface capacitive screens work


➔ Don’t need to be calibrated only with bare fingers or a stylus
➔ Fast response times ➔ Sensitive to electromagnetic
➔ Register touch even when the radiation
screen is broken ➔ Screen will break upon impact
➔ Very durable screens that have
a high resistance to scratches
➔ Allows multi-touch
➔ Good visibility in sunlight

Infra-red ➔ Allows multi-touch ➔ Screen can be sensitive to water


➔ Good visibility in sunlight or moisture
➔ Has good durability ➔ Accidental activation if the
➔ Don’t need to be calibrated infrared beam is disturbed in
➔ Fast response times any way
➔ The operability isn't affected if ➔ Sensitive to light
the screen is scratched or
➔ Screen will break upon impact
cracked ➔ Expensive to manufacture

Resistive ➔ Good resistance to dust and water ➔ Low touch sensitivity; need to
➔ Can be used with bare fingers, press harder for it to register
gloved, and a stylus touch
➔ Easier to manufacture ➔ Poor visibility in strong sunlight
➔ Cheaper to manufacture/buy ➔ Vulnerable to scratches
➔ More weatherproof and cracks
➔ Screen is less likely to shatter ➔ Low quality
➔ Does not support multitouch

30
Output Devices

1) Actuators
➔ An actuator is a mechanical or electromechanical device that is used to perform an action
➔ It also converts electrical energy into mechanical energy
➔ Actions can include ‘start’, ‘stop’, ‘close’, ‘open’, ‘pull’, ‘push’, and more,
depending on the machine they are present in and work they are required to do

2) 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

Digital Light Processing (DLP) Projector:


➔ DLP projectors use a DMD chip, which have millions of micro mirrors
➔ The number of micro mirrors and the way they are arranged on the DMD chip
determines the resolution of the projected image
➔ When the micro mirrors tilt towards the light source, they turn ON, and this creates a
light pixel on the screen
➔ When micro mirrors tilt away from light source, they turn OFF, and this creates a dark
pixel on the screen
➔ Micro mirrors can switch ON and OFF multiple times a second in order to create
varying shades of grey
➔ Light shades of grey are obtained if ON > OFF
➔ Dark shades of grey are obtained if OFF > ON
➔ This is known as a greyscale image
➔ This is how it works:

1 A bright white light passes through a condensing lens and then through the colour filters

2 White light is split into the primary colours - red, blue and green - through which the projector
creates a lot of colours

3 It then passes through a shaping lens and falls on the DMD chip

4 A DMD chip is a Micro-Opto-Electro-Mechanical System (MOEMS) that consists of several


thousand microscopic mirrors on the chip’s surface. Each mirror corresponds to a pixel in the
projected image.

31
5 The light then passes through the lens and the image is projected on the screen

➔ The advantages of DLP are:


↳ higher contrast ratios
↳ higher reliability
↳ quieter running than LCD projectors
↳ uses a single DMD chip, so there is no issue when images are being lined up
↳ smaller and lighter than LCD projectors
↳ better suited to a dusty and smoky atmosphere, as compared to LCD projectors

➔ The disadvantages of DLP are:


↳ image has a "shadow" effect when showing a moving image
↳ doesn't have grey components in image
↳ colour definition is not as good as LCD projectors

Liquid Crystal Display (LCD) Projector:


➔ 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

2 The beam of light travels to a group of chromatic-coated mirrors, which are also known as
dichromic mirrors

3 The light is reflected back at different wavelengths, corresponding to red, green and blue light
components

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

➔ The advantages of LCD projectors are:


↳ sharper image, as compared to DLP projectors
↳ better colour saturation and quality
↳ more energy efficient, as they generate less heat

32
➔ The disadvantages of LCD projectors are:
↳ contrast ratios are not as good as DLP projectors
↳ longevity is lower than DLP projectors
↳ LCD panels are organic, and hence turn yellow over the passage of time

3) Inkjet Printer
➔ Usually have a print head (consists of nozzles that sprays ink droplets), ink cartridge/s,
a stepper motor and belt, and a paper feed
➔ Ink droplets are produced using two different technologies; thermal bubble and piezoelectric
➔ Here is how inkjet works:

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

5 A sheet of paper is added; sensors detects the paper’s presence

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

➔ Inkjet printers are usually used for printing one-off photos or when few pages of
good quality, colour printing is needed

33
4) Laser Printer
➔ Use dry powder
➔ Uses static electricity to print text and images
➔ Prints the whole document in one go
➔ Usually prints monochrome documents but also supports coloured printing
➔ Here is how laser printer works:

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 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

6 The drum is coated with positively charged powdered ink

7 A paper, which is negatively charged in the areas where there needs to be text/images, is
rolled onto the drum

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.

➔ This device produces high quality prints at high speeds

34
➔ Often used when many documents are needed to printed (mass printing)

➔ Advantages:
↳ Larger toner cartridge and paper trays
↳ Can print in high volumes
↳ Can print very quickly

➔ Disadvantages:
↳ Larger footprint
↳ Need time to warm up
↳ Toner cartridges are expensive to buy

5) 3D Printers
➔ Produces 3D objects
➔ The mechanism is primarily based on inkjet and laser technologies
➔ The object is made layer by layer, using materials such as powdered resin, metal, ceramic, etc.
➔ There are two types of 3D printing: direct 3D and binder 3D printing

➔ Direct 3D printing is based on inkjet technology


➔ The print head moves left and right, and up and down as well, to build up the object layer by
layer

➔ Binder 3D printing is almost the same as direct 3D, but it uses two passes
➔ The first pass sprays powdered material
➔ The second pass sprays binder or glue to form a solid layer

➔ Here is how a 3D printer works:

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

3 3D printer is set up with the required materials

4 The command is given

5 The printer builds the object layer by layer (0.1mm thick layer)

6 Continues for hours till the object is made

35
7 The object is removed from the printer and taken away to prepare

➔ Uses of 3D printers are:


↳ making of prosthetic limbs
↳ making items to allow precision reconstructive surgery
↳ used in aerospace to create lightweight parts
↳ fashion and art
↳ making parts of items that are no longer in production

6) LED screens
➔ A screen is made up of tiny lights emitting diodes (LEDs)
➔ LED screens are not a frontlit display
➔ Each LED is either red, green or blue and are controlled to create different colours
➔ Used for outdoor displays
➔ The display is made up of pixels that are arranged in a matrix
➔ Each pixel has red, green, and blue colour filters
➔ The RGB filters are mixed to create different colours
➔ Light is shone at the pixels and an image is formed
➔ Diffusers may be used to distribute light evenly

7) LCD screens
➔ Made up of tiny liquid crystals
➔ These crystals make up an array of pixels that are affected by changes in applied electric fields
➔ For LCDs to work, backlighting is needed
➔ Backlighting is done using LED technology, this was previously done using CCFL
➔ CCFL stands for Cold Cathode Fluorescent Lamp
➔ Using LED gives a very good contrast, sharpness and brightness range
➔ Using LED consumes very little power
➔ LEDs last indefinitely
➔ The display is made up of pixels that are arranged in a matrix
➔ Each pixel has red, green and blue colour filters that can be mixed to create different colours
➔ LEDs are arranged behind the display and light is shone at the it, forming an image
➔ The pixels can turn on or off/transparent or opaque when their shapes are changed

8) Organic Light Emitting Diodes (OLED)


➔ Use organic materials to create flexible semiconductors
➔ Organic films are added between two charged electrodes - one metallic and the other of glass

36
➔ When an electric field is applied to electrodes, they give off light. So, no backlighting is needed
➔ OLEDs make it possible to make very thin screens that can bend as well

➔ Advantages of OLED over LCD and LED:


↳ Layers are thin, light and flexible; they bend into any shape
↳ Light emitting layers are very lightweight as they can also be made from plastic
↳ No backlighting is needed
↳ Has a very large field of view
↳ brighter light than LEDs

9) Loud Speakers
➔ Produce sound
➔ How a loudspeaker produces sound:

1 The sound file on a computer is converted to sound when it data is converted from digital to
analogue using a DAC (Digital to Analogue Convertor)

2 It is then passed through an amplifier to increase the current before reaching the coil

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

Sensor Function Examples of usage

Acoustic Microphones that convert sound ➔ Security system (detects noises)


into digital data ➔ Voice recognition in phones

Accelerometer Measure the acceleration and ➔ Gaming


motion of an object

37
➔ In cars to detect fast deceleration
and apply airbags in case of an
accident

Flow Measure the rate of flow of a gas ➔ Measures gas flow in pipes
or liquid ➔ Measures water flow in
underground pipes

Gas Detect the levels of various types ➔ Monitors pollution levels


of gases, e.g: oxygen and carbon ➔ Monitor methane levels in a kitchen
dioxide

Humidity Measures the amount of water ➔ Monitors humidity levels in a


vapour in, for example, a specific greenhouse
volume of air ➔ Monitors humidity levels in an iron
industry

Infra-red (Active) Detects movement when a beam ➔ Security alarm system in which
of infra-red radiation being given intruder breaks the infra-red beam
out is broken (the radiation levels
being detected by it decrease)

Infra-red (Passive) Measures heat radiation given off ➔ Security alarm system in which
body 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

Light Detects light (and often, its ➔ Automated streetlights system


brightness)

Magnetic field Measures change in magnetic ➔ Anti-locking system in cars


fields ➔ CD players, HDD, mobile phones

Moisture Measures water levels in, for ➔ Monitoring moisture level of soil
example, soil present in a greenhouse
➔ Baking

pH Measures the acidity or basicity of ➔ Controls acidity or alkalinity levels


a solution in a chemical process
➔ Monitor the pH levels of soil

Pressure Measures pressure ➔ Measuring gas pressure in a

38
nuclear reactor
➔ Gaming

Proximity Detects the presence of someone ➔ Automated door system


nearby ➔ Automated lighting system

Temperature Measures temperature and ➔ Monitoring temperature of a


generates outputs based on greenhouse
temperature changes ➔ Monitoring temperature of a
chemical reaction
➔ Monitoring temperature of a reactor

Example of an automated security system:


➔ Sensors used:
↳ Acoustic (to detect the sound of an intruder’s footsteps)
↳ Pressure (to detect the weight of the intruder coming through window
↳ Infra-red (to detect the presence of the intruder)
↳ Proximity sensor (to detect the presence of the intruder)
➔ The sensors continuously input data from their surroundings
➔ This data is sent to the microprocessor, where it is converted from analogue to digital
data using an ADC (Analogue to Digital Convertor)
➔ The microprocessor compares these values to pre-set values for each sensors
➔ If one or more of them is beyond the pre-set values, it mean there is an intruder
➔ The microprocessor sends a signal to the actuators to sound the alarm, send a
message to the homeowner, call the police, etc.
➔ If the values are equal to these pre-set values, no action is taken
➔ This process is continuous

Data Storage

- Memory and Storage:


➔ Memory and storage can be divided into two different groups
↳ primary memory
↳ secondary storage

Primary Memory Secondary Memory

39
Directly accessible by the CPU Not directly addressable by the CPU

Examples: RAM, ROM and cache memory All are non-volatile devices

Can be external or internal to the computer

Examples: HDD, SSD, DVD, USB memory


stick, Blu-Ray disc, etc.

Primary Memory
➔ Part of the computer memory accessible directly from the CPU
➔ Includes RAM and ROM memory chips

- RAM
➔ RAM has the following features:
↳ can be written to or read from; is editable
↳ used to store data, files, parts of applications which are currently in use, etc.
↳ it is volatile (its contents are lost when it is powered off)
↳ the larger the size, the faster the computer’s performance
↳ never runs out of memory; it just becomes slow as more data is entered

➔ Applications:
↳ programming of routines
↳ addition of new routines
➔ There are two types of RAM: DRAM and SRAM

DRAM SRAM

➔ A DRAM (Dynamic RAM) chip consists of ➔ SRAM (Static RAM) makes use of flip flops
transistors and capacitors to store each bit of data
➔ Capacitors hold bits of information (0 or 1) ➔ Doesn't need to be refreshed constantly
➔ Its advantages over DRAM are:
↳ faster

40
➔ A transistor is a switch; it allows the circuitry ↳ makes use of memory cache
of the chip to read the capacitor and/or
change its value
➔ Needs to be refreshed constantly (every
15 microseconds)
➔ Its advantages over SRAM are:
↳ much less expensive to manufacture
↳ consume less power
↳ have a higher memory capacity

- ROM
➔ Memory data cannot be changed or written to
➔ They are non-volatile
➔ Are permanent memories
➔ Contents can only be read
➔ Store BIOS (Basic Input Output System) or start up instructions
➔ Applications:
↳ storing factory settings
↳ storing "start-up" routines
↳ storing of set routines

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

1) Magnetic Storage: Hard Disc Drives (HDDs)


➔ 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

41
➔ Read-write heads made of electromagnets read or write data to the platters by
controlling magnetic fields to determine binary values.

➔ Platters can be made of various materials, and have multiple surfaces with data stored
in sectors and tracks
➔ Are cheaper per unit of data stored
➔ HDDs have slower data access times compared to RAM due in latency
➔ Fragmentation of data can occur, leading to degraded performance, but
defragmentation software can consolidate fragmented sectors
➔ Removable HDDs can be connected using a USB port, and are useful for backup or
transferring files between computers

➔ How does an HDD store data?


↳ HDDs store data using electromagnets
↳ Platters are divided into tracks and sectors
↳ Has a read/write head which moves across the platters
↳ Uses magnetic fields to control magnetic dots of data
↳ The magnetic field determines a binary value

2) Solid State Storage: Solid State Drives (SSD)


➔ 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

➔ How do SSDs store data?


↳ Data is flashed onto silicon chips
↳ Use transistors as floating and control gates
↳ Use NAND/NOR gates
↳ Store data by controlling the flow of electrons
↳ The electric current reaches the control gate and flows through the floating gate to be stored
↳ When data is stored, the transistor is converted from 1 to 0

3) Solid State Storage: Memory sticks/Flash memories:


➔ Use solid state technology

42
➔ Connect to computer through USB ports
➔ Small and lightweight; suitable for transferring files between computers
➔ Can be used as small back-up devices for music or photo files, for example

4) Optical Storage: CD/DVD discs


➔ CDs and DVDs are optical storage devices that use laser light to read and write data
from their surfaces
➔ 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
➔ 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

➔ How is data stored in a CD/DVD?


↳ Both use a laser to write data
↳ A laser is shone on the disc
↳ A read/write head moves the laser across the disc
↳ The laser burns pits onto the surface to write data
↳ The laser is also used to read pits and lands
↳ A laser is shone on the disc
↳ The reflected light is captured by sensors

5) Optical Storage: Blu-Ray


➔ 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 capacity and interactivity of the two technologies differs

6) 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

43
➔ 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

7) Cloud Storage
➔ Cloud storage stores data on remote servers accessed through networks, mainly the internet
➔ It can be categorised into public, private, and hybrid cloud models based on
ownership and management
➔ Public cloud storage is offered by third-party providers and available for public use
➔ Private cloud storage is dedicated infrastructure managed by an organisation,
while hybrid combines public and private models
➔ Cloud storage providers offer various pricing models to cater to different user needs

Advantages and disadvantages of using cloud storage instead of storing data locally

Advantages Disadvantages

Can be accessed from anywhere in the world Not a suitable storage solution for people with
using a network, typically the internet poor network connections

The user will not need to buy off-line storage Data may be lost if the storage servers of the
devices and keep them in safe places cloud storage provider are damaged by, for
example, a flood, or subject to cyber attacks

Allow for almost unlimited data storage Can be expensive if a lot of data needs to be
stored

The user does not have to worry about damage Does not preserve the confidentiality of data as
to storage devices (both internal and off-line) employees of the service providing company
may engage in misconduct

Network hardware

➔ A computer requires an NIC (Network Interface Card) to connect to a network

- MAC (Media Access Control) Address:


➔ An NIC is given a MAC address at the time of manufacturing
➔ MAC addresses are 48-bit addresses that are usually written in hexadecimal
➔ They are unique addresses that help identify a device on a network

44
➔ They are made up of the manufacturer code and the serial code
➔ There are two types of MAC addresses:
↳ LAA (Locally Administered MAC Address)
↳ UAA (Universally Administered MAC Address)

- Structure
➔ MAC addresses are made up of six groups of two hex digits (8 bits)
➔ They are created from the manufacturer code and the serial code

MM-MM-MM-SS-SS-SS

AF-9C-61-23-5B-17

M = Manufacturer code S = Serial code

- IP (Internet Protocol) Addresses


➔ IP addresses are 32- or 128-bit addresses written in hexadecimal
➔ They are mostly unique and are used to identify a device on a network
➔ IP addresses are assigned by an ISP (Internet Service Provider) or a router of a network
➔ There are IPv4 and IPv6 addresses

IPv4 IPv6

Older type of IP address Newer type of IP address

Uses 32 bits Uses 128 bits

Written in denary format Written in hexadecimal format

Made up of four groups of 8 bits Made up of 8 groups of 16 bits separated by colons


separated by periods

Allows for a small number of routers Allows for a considerably larger number of routers and

45
and devices on a network at a given devices on a network at a given time
time

Example: Example:
254.28.69.42 A69F:236B:CCCC:34D1:7E45:3428:89F0:0001
➔ IP addresses can be static or dynamic

- Static IP addresses
➔ These IP addresses, as the name dictates, never change
➔ Suitable for websites, online databases, etc.

- Dynamic IP addresses
➔ These addresses change whenever the device logs on to the internet
➔ A new IP address is assigned to the device by a DHCP (Dynamic Host Configuration
Protocol) server each time
➔ Suitable for users of the internet (dynamic IP addresses help maintain privacy)

Differences Similarities

MAC Address IP address —

Has 48 bits Has either 32 or 128 bits Both use hexadecimal

Has a serial code and a Does not have a manufacturer Both are unique
manufacturer code or serial code

Rarely changes (can be Can be static or dynamic Both are used to identify
UAA or LAA) devices on a network

- Routers
➔ Routers are devices that are a part of a network and perform many different functions
➔ They assign IP addresses
➔ They send data to a specific destination on a network using the IP address in the data packet
➔ Routers also allow networks to communicate by taking data in one format from a
network and converting it to a format understood by another network
➔ They can connect a local network to the internet (a LAN to a WAN)

46
Unit 4: Software
System Software

➜ Software that provides the services the computer requires


➜ Provides an interface for the user to communicate with the computer
➜ Controls the usage and allocation of hardware resources
➜ Examples: Utility software, operating system, linkers, translators, etc.

Application Software
➜ Software that provides the services the user requires
➜ Can be executed according to the user’s needs
➜ Enable a user to perform specific actions
➜ Examples: Control and measuring software, games, photo/video editing software, apps, etc

System Software Application Software

Provides services to the computer Provides services to the user

Provides a platform for other software to run on; Runs on the system software; dependent
independent

Used for the control and operation of computer Used to perform specific actions
hardware

Installed when an operating system is installed Installed according to the user’s needs
on a computer

A user cannot communicate with the computer Application software is not required to enable
without system software the user to communicate with the computer

Intermediary between the computer hardware Intermediary between the system software and

47
and the computer programs the user

General purpose Specific purpose

Role And Basic Functions Of An Operating System

- Operating System
➜ Software that enables a computer to function correctly
➜ Allows the user to communicate with the computer easily
➜ Software running in the background of a computer

- Managing Files
➜ Manages the allocation and storage of files
➜ Ensures memory allocation for a file by reading it from the secondary storage and
loading it into the RAM
➜ Performs actions like renaming, closing, deleting, editing, etc. of files
➜ Maintains access levels (i.e: making files accessible to only those who have the
authority to view/edit them)

- Handling Interrupts
➜ Uses the ISR (Interrupt Service Routine) to service interrupts
➜ Determines the priority of interrupts
➜ Pauses and stores data of current tasks before managing any interrupt received

- Providing An Interface
➜ Enables a user to communicate with the computer easily by providing an HCI

- HCI (Human Computer Interface)


➜ The means by which a user is able to communicate with the computer
➜ There are two types of HCI: CLI and GUI

CLI (Command Line Interface)


➜A user types in commands to perform any action; for example, deleting a file
➜ Commands must be written in a programming language, with proper syntax
➜ The user is in direct communication with the computer and not limited to
only a few options
➜ Better for programmers and technicians who need to develop new
software, initiate memory dumps, etc.

48
- GUI (Graphical User Interface)
➜ A user clicks on icons on the computer screen to perform specific actions
➜ Is very easy to use
➜ Clicking on a specific file, for example, will open up that file
➜ Better for users that do not need to perform any technical operations, do not
have a lot of knowledge of computers, or only need to perform actions like
gaming, video editing, etc.

- Managing Peripherals And Drivers


➜ Communicates with the input and output devices using device drivers
➜ Controls the usage and allocation of hardware resources
➜ Translates files/data into a format that can be understood by the
input/output devices using device drivers
➜ Downloads device drivers for new devices, or loads drivers for old
devices for communication between the computer and the device

- Managing Memory
➜ Manages the primary memory and the secondary storage
➜ Allows data to moved between the RAM and the secondary storage
➜ Ensures two different processes do not try to access the same memory location
➜ Keeps a record of all the memory locations

- Managing Multitasking
➜ Enables the computer to perform multiple functions at once
➜ Allocates hardware resources to each task according to its priority
➜ Resources are allocated to each task for a specific time limit

- Providing A Platform For Running Applications


➜ Uses several device drivers for different purposes while reading the application and
loading it onto the RAM
➜ Points to the first executable instruction for the program’s execution

- Providing System Security


➜ Maintains access levels
➜ Offers the ability to restore lost/corrupted data (by providing a backup store)
➜ Prevents illegal access to files/applications
➜ Ensures that security software like anti-virus and -malware software are always up-to-date

- Managing User Accounts


➜ Maintains access levels and permissions (administrator, guest user, etc.)
➜ Stores each user’s files separately

49
➜ Allows each user to customise their account settings

Running Of Application Software


➜ The bootloader (firmware) runs on the hardware
➜ When a computer starts up, part of the operating system needs to be loaded on to
the RAM (booting up)
➜ The BIOS (Basic Input/Output System) tells the computer where the storage device that
holds the operating system can be found, and loads the part needed
➜ The operating system runs on the firmware
➜ The application software runs on the operating system
➜ The operating system reads the application from the secondary storage and loads it
onto the RAM
➜ It will use various drivers for various purposes during this, for example, give the
application access to the memory, read it into an area of the RAM, etc.
➜ The operating system also points to the first executable instruction of the application to
allow the CPU to process it
➜ The operating system then loads instructions and uses device drivers as required

Interrupts
➜ A signal sent from a device or software to the microprocessor
➜ Interrupts cause the microprocessor to pause its current task
➜ They are generated when there is an error, a new task has to be performed, etc.
➜ Used to deal with vital tasks/issues
➜ Enable multitasking
➜ Examples of software interrupts: division by zero and two processes trying to access
the same memory location
➜ Examples of hardware interrupts: paper jam in a printer, pressing a key on a
keyboard, and moving a mouse
➜ The ISR (Interrupt Service Routine) is used to service interrupts
➜ Interrupts are serviced according to their priorities; each interrupt has different levels of priority
➜ When interrupts are serviced, action is taken by sending signals to the respective
components of the computer

50
Types Of Programming Languages

- High-Level Languages
➜ Programming languages that are closer to the English language
➜ Resemble the natural language
➜ One line of code can produce multiple machine code commands
➜ Need to be translated into machine code instructions using a translator, like
compilers and interpreters
➜ User-friendly
➜ Examples: Python, Java, C++, Visual Basic, etc.

Advantages Disadvantages

Easier to read/write Poor control of hardware

Easier to debug Programs can take longer to execute

Easier to maintain a developed program Requires more storage

Faster to write Less efficient than machine code (more lines of


code per instruction)

Programmer can use an IDE (Integrated


Development Environment)

Have built-in functions, library routines, etc.

Greater range of languages

Knowledge of manipulating memory


locations/registers is not needed

Machine independence/portable

- Low-Level Languages
➜ Programming languages that can be machine code or assembly language
➜ Structurally similar to the computer processor’s instructions
➜ They relate to the specific hardware and architecture of a computer
➜ Example: Assembly language

51
Advantages Disadvantages

Faster to execute More difficult to read and write

Take up less storage Take longer to write

Can make use of special hardware Machine dependent/not portable

Include special machine-dependent instructions Need to have knowledge of the computer


architecture and hardware

Enable the direct manipulation of hardware More error-prone

The programmer has unrestricted access and


control over the computer’s internal system

- Assembly language
➜ A low-level language that uses mnemonics
➜ Programs written in assembly language can be converted into machine code, using a
translator called assembler

- Translators
➜ Convert programs written in high level languages or low level assembly language to
machine code
➜ Examples: Compiler, interpreter, assembler

- Compilers
➜ Translate a program written in a high level language all in one go and produce an
executable file of machine code instructions
➜ Produce an error report, instead of an executable file, for the whole code if errors are present
➜ Mainly used in the end, when the final program is developed and ready for translation

- Interpreters
➜ Translate and execute a program written in a high level language line-by-line
➜ Stop execution at the point where an error is found
➜ Mainly used when developing and writing a program

52
Translator Advantages Disadvantages

Compiler Produces an executable file which can Takes longer to write, develop
be stored for use anywhere and debug programs using a
compiler

Translates programs quicker when Compiled programs take up


they are fully developed more storage (because both
source code and machine
code are present)

Compiled programs can be run


without having to be translated again —

Interpreter Makes it easier and quicker to debug Interpreter takes longer to


and and test programs during execute programs
development

Makes it easier to edit program while Interpreted programs cannot


they are being developed be run without the interpreter

IDE (Integrated Development Environment)


➜ An application that provides multiple facilities to aid a programmer in writing a
program using a high level language

Functions

- Code Editor
➜ Allows a program to be written and edited without the need for a separate window, or
changing the software each time it needs to be edited
➜ Speeds up the program writing and development process

- Run-Time Environment
➜ Allows a program to run on a computer, even if it cannot be run on it
➜ Loads applications and runs them on it
➜ Provides all the necessary functionality for the program to run
➜ This includes interfaces to physical parts of the hardware, user interactions, and
software components
➜ Allows the programmer to test the program while it is running

53
- Translator
➜ Have built in translators - compilers and interpreters
➜ Interpreters can be used during development of the program for debugging
➜ Compilers can be used to translate the program when it is fully complete

- Error-diagnostics
➜ Errors like syntax errors are often underlined in red, or pointed out in some other way
➜ Provides automatic error-detection
➜ Ensures that the program is error-free

- Auto-completion
➜ A context-aware feature that offers case-sensitive prompts with text completion for
variable and constant names and reserved words
➜ Helps avoid typos and other mistakes
➜ Reduces the need to memorise all variable, constant, etc. names

- Auto-correction
➜ Automatically corrects any errors found in the program
➜ Corrects syntax errors, misspelt words, etc. using algorithms

- Prettyprinting
➜ Application of various stylistic formatting conventions
➜ Colour codes the program (e.g: red for variables, blue for constants, etc.)
➜ Lays it out in a meaningful and attractive way
➜ Makes it easier to understand and read

54
Unit 5: Internet and its Uses
The Internet and World Wide Web (WWW)

- Differences between Internet and WWW

Internet World Wide Web

The main infrastructure Uses the internet to access information from


web servers

A worldwide collection of interconnected It is a collection of multimedia web pages and


networks and devices other information on websites

Users can send and receive emails Web resources are accessed by web browsers

Allows online interaction (audio, text, or video) Uniform Resource Locators (URLs) are used to
specify the location of web pages

Makes use of IP (Internet Protocols) and TCP http(s) protocols are written using HTML
(Transmission Control Protocol) (HyperText Markup Language)

- Uniform Resource Locators (URLs)


➔ A URL is a text-based address for a web page; it can contain the protocol, the domain
name and the web page/file name
➔ Web browsers are software that allows user to access and display web pages on screen
➔ They interpret HTML sent from websites and presents the results on the screen
➔ URLs are text addresses used to access websites
➔ The following is an example:

https://www.mojza.org/computer_science

Protocol Domain name Web page/file name

55
➔ The protocol is usually https or http
➔ Website address is:
↳ Protocol (https)
↳ Domain name (www.mojza.org)
- Domain host (www.)
- Domain name (mojza)
- Domain type (.org)
- Country code (may or may not be included)
↳ File name (computer_science)

- HTTP and HTTPS


➔ HTTP stands for Hypertext Transfer Protocol
➔ It is a set of rules that must be obeyed when transferring files across the internet
➔ When some security is used (SSL or TLS), http turns into https
➔ To know if a website uses https, check for a🔒(padlock) icon in the status bar, see if
the URL contains https, or check if the website’s digital certificate is authentic
➔ The 's' in https stands for Secure
➔ Indicates a more secure and safe route for transferring or sending files

- Web browsers
➔ Web browsers are software that allow a user to access and display web pages on
device's screen
➔ Browsers translate/interpret/render the HTML and show the result in its respective
form, such as audio, video and more
➔ A browser has the following features:
↳ has a home page
↳ stores users’ favourite websites/web pages as bookmarks
↳ keeps a history of websites visited by the user/stores users’ history
↳ has the ability to allow the user to navigate forwards and backwards through websites
already opened / web tabs navigation
↳ multiple websites can be opened at once/web tabs
↳ make use of cookies
↳ data is stored as cache
↳ make use of JavaScript
↳ has an address bar

56
- Retrieval and Location of Web Pages
➔ To retrieve web pages, your browser needs to know the IP address of the websites
➔ The DNS (Domain Name Server) is responsible for finding the IP address of a
domain name given in the URL
➔ URLs and DNS eliminate the need for users to memorise the IP addresses of websites
➔ The DNS contains a database of URLs with their respective IP addresses
➔ Here is how a DNS, browser, http/s, web server, and HTML are used to locate and
retrieve web page/s:

1 The user opens their browser and types in the URL in the search bar

2 The browser sends the URL to the DNS using https protocol and requests its IP address

3 If the DNS server finds the IP address of the entered URL, it will send it back to the user's
computer

4 If DNS server (1) cannot find the IP address of the entered URL, it will send a request to
DNS server (2) to find the IP address. If found, the (2) will send it to (1), which will then
send it to the user's browser

5 The browser sends the IP address to the web server of the website

6 Two-way communication with the web server is set up

7 HTML files are sent from the web server to the browser

8 The browser interprets the HTML files and displays the web pages on the user's computer

- Cookies
➔ Cookies are small files or codes stored on a user's computer
➔ They are sent by a web server to the browser on the user's computer
➔ The cookies contain information, like the user's preferences
➔ Cookies allow the tracking of users
➔ Collected data can also be used to customise the web page according to their preferences

➔ General uses of cookies:


↳ saving personal details
↳ tracking user preferences
↳ holding items in an online shopping cart
↳ storing login details

57
➔ There are two types of cookies:
↳ Session cookies
↳ Persistent cookies

Session Cookies Persistent Cookies

Temporary cookies Permanent cookies

Exist on a user's computer only till the browser Exist until the users themselves delete them or
is closed or the website session is terminated the cookies’ expiry dates pass

Used during online purchases (storing items in Store the user's preferences, log in details and
an e-cart) more

Digital Currency

- Digital Currency
➔ Digital currency is currency that exists only in digital form
➔ It has no physical form, unlike notes, coins, and more
➔ It is an accepted form of currency to pay for goods and services just like cash, debit cards, etc.
➔ It can also be transferred between various accounts when carrying out transactions
➔ It works through online banks, such as PayPal, or smartphone apps, such as Apple Pay
➔ Digital currency can also be exchanged into physical currency
➔ Digital currency relies on the central banking system
➔ The issue with centralisation (central banking system) is that it is difficult to
maintain confidentiality and security; however, this can be overcome using
decentralisation

➔ Cryptocurrency uses cryptography to track transactions


➔ Traditional digital currencies are also looked over by the state banks and
government. This means all transactions are looked after and checked by these two
bodies. Furthermore, exchange rates are also determined by them.
➔ Cryptocurrency has no state control and hence, all the rules are set by the
cryptocurrency community itself
➔ Cryptocurrency transactions are available publicly and hence, all transactions are
tracked and monitored
➔ The cryptocurrency system uses a blockchain network, which is highly secure

58
- Blockchaining
➔ Blockchain is a decentralised database
➔ Blockchain, in its basic form, is a digital ledger, that is a time-stamped series of
records that cannot be altered
➔ All transactions of networked members are stored in this database
➔ Blockchain consists of a number of interconnected computers, but they are not
connected to the central server (this is decentralisation)
➔ All data on transactions is stored on all computers in the blockchain network
➔ Whenever a new transaction takes place, all computers get a copy of it; therefore, it
cannot be changed without the consent of all network members
➔ This removes the risk of hacking
➔ Blockchain is used in many areas, such as politics, cryptocurrency exchanges,
education and more

➔ This is how a blockchain works:

1 A block is created whenever a new transaction takes place

2 A new hash value is created upon the creation of the block through a cryptographic
algorithm; the hash value is unique

3 The block contains this hash value, the hash value of the previous block, a timestamp (time
at which the transaction took place), and details of the transaction (e.g. name of
sender/receiver, amount of money, etc.)

4 Since it contains the value of the previous block, and the one before it also contains the
value of the previous block, and so on, all the blocks are ‘connected’

5 If a hacker, for example, tries to change the details of the previous block, its hash value will
change and the next block won’t contain its hash value

6 Hence, the blocks before it would become invalid

7 Changing all the blocks quickly, before the tampering can be discovered, is prevented
by proof-of-work

8 It takes ten minutes to fill the necessary proof of work for each block prior to adding it to the
chain (these are also supervised by blockchain miners)

59
Cyber Security
➔ Data can be corrupted or deleted, either through accidental damage or malicious acts
➔ The cyber threats that are included in 2023 syllabus are:
↳ Brute force attack
↳ Data interception
↳ Distributed Denial of Service (DDoS) attacks
↳ Hacking
↳ Malware (includes viruses, worms, trojan horse, spyware, adware and ransomware)
↳ Phishing
↳ Pharming
↳ Social Engineering

- Brute Force Attack


➔ The hacker tries different combinations of passwords until he/she cracks it; this is
known as a brute force attack
➔ The hacker can try a full trial-and-error method, such as trying commonly used
passwords (123456, qwerty, name1234, etc.)
The aim of the hacker is to gain illegal access to a user’s personal information.
➔ He/she can also a strong word list, which contain words that could potentially be the
password - this is a faster method than trial-and-error
➔ A safety precaution against this is to have a strong password, which is a unique
combination of numbers, symbols and alphabets, and change it regularly

- Data Interception
➔ Data interception is a form of stealing data by tapping into a wired or
wireless communication link
➔ The intent of the hacker is to compromise privacy or to obtain confidential information
➔ Wired interception can be carried out using a packet sniffer
➔ Packet sniffers examine data packets being sent over a network
➔ The intercepted data is then sent back to the hacker
➔ Wireless interception can be carried out through wardriving, also known as
Access Point Mapping
➔ Using this method, data can be intercepted using an antenna, a GPS device, a laptop
and some software, while sitting outside the victim’s house or building
➔ The intercepted signals can then reveal personal data to the hacker, often without the
user being aware
➔ Safety precautions:
↳ Use a WEP (Wired Equivalency Privacy) encryption protocol and a firewall
↳ Avoid using public WiFi connectivity in public places, as data is not encrypted and
thus, susceptible to interception

60
- Distributed Denial of Service (DDoS) attacks
➔ A Denial of Service (DoS) attack is an attempt at preventing the users from accessing
part of a network, usually an internet server
➔ It is often temporary, and may be a very damaging act or a large breach of security
➔ A server can only handle a finite number of requests, so, the attacker sends out
thousands of spam requests to prevent the server from servicing the requests
➔ The server may not respond to the genuine requests of users, and may even crash; this
is called denial of service
➔ In a Distributed Denial of Service attack, spam traffic or requests are send out from
different computers using bots, which makes it hard to block the attack

➔ Users can be targeted individually, too


➔ The attacker will sends spam emails to their email account
➔ ISPs have a specific quota of emails for each user
➔ Consequently, if the attacker sends thousands of spam messages to the account, it
will quickly become clogged up, be unable to respond, and the user won't be able to
receive legitimate emails

➔ So, the safety precautions that can be taken are:


↳ using an up-to-date malware checker
↳ setting up a firewall to restrict traffic to and from the web server or user's computer
↳ applying email filters to filter out unwanted traffic, e.g. spam

➔ Signs a user can recognise if they get hit with a DDoS attack:
↳ slow network performance
↳ inability to access certain websites
↳ large amounts of spam emails

- Hacking
➔ It is the act of illegally gaining access to a computer system without the owner’s permission
➔ This can lead to identity theft or the gaining of personal information: data can be
deleted, passed on, corrupted or changed
➔ Hacking can be prevented by:
↳ the use of firewalls
↳ setting frequently changed strong passwords
↳ anti-hacking software
↳ intrusion-detection software

61
- Malware
➔ There are many forms of malware, all of them are important for the 2023, 2024
and 2025 syllabus exams. So, we will study all of them in detail.

1) Viruses:
➔ Viruses are programs or program code that can copy themselves with the intention of
deleting or corrupting files, and also cause computer malfunctioning
➔ Viruses need an active host. An active host is a functioning software that a virus can
affect by either attaching itself to the code or altering the code itself.
➔ The active host program on the target computer or an operating system is already
infected before the virus attack itself. So the virus is a trigger.
➔ Viruses are often sent in forms of email attachments, reside on the infected
website, or the infected software program downloaded on the target user's computer.
➔ Viruses need an end-user to initiate it

➔ The safety measures that one can take are:


↳ not opening unknown emails
↳ not installing non-original softwares or third party softwares
↳ running up-to-date virus scanners regularly

2) Worms
➔ Worms are stand-alone type of malware that can self-replicate
➔ These don't need an active host
➔ Their intention is to spread and corrupt the computers and whole networks
➔ Worms remain inside the applications which enables them to move throughout networks
➔ Worms replicate without targeting specific files as they rely on security failures within networks
➔ Worms can come as message attachments and even if only one user opens it, it will
corrupt the whole network
➔ Worms don't need an end-user to be initiated and spread

➔ The safety measures that one can take are:


↳ not opening unknown emails
↳ constantly clean up and scan the computer and network
↳ running up-to-date virus scanners
↳ use firewalls

62
3) Trojan Horse
➔ It is a malware program disguised as an authentic, legitimate software
➔ Though it looks authentic, it includes malicious instructions embedded in it in place of
the actual software
➔ The intention is to cause harm and either extract personal information of the
user through spyware, or corrupt files, etc.
➔ Trojan horse malwares need to have an end-user to initiate it, and hence are
usually sent as email attachments, downloaded from an infected/third party website or
pop ups

➔ The safety measures that one can take are:


↳ not opening unknown emails
↳ constantly cleaning up and scanning the computer and network
↳ not downloading softwares from suspicious websites or clicking on pop-up ads
↳ running up-to-date virus scanners
↳ use firewalls and other security systems and not turning them off if the softwares asks for it

4) Spyware
➔ It is a software that gathers the user’s information by monitoring the user's
activities on their computer
➔ Once gathered, the information is sent back to the attacker who had originally sent the spyware
➔ The information gathered usually consists of web browser searches and any personal
information (e.g: passwords) the user has stored and entered

➔ The safety measures are:


↳ download anti-spyware software
↳ use of firewalls and other systems
↳ frequently clean up and scan
↳ updating the virus scanners

5) Adware
➔ It is the least harmful malware
➔ Its aim is to engage users with advertisements or click on them
➔ It often appears as pop-ups/advertisements on websites
➔ Though it does not pose a threat to the user’s data, it shows that there is a
weakness in the computer's security
➔ It is also hard to remove as the user cannot know which ad is harmful or not
➔ It can hijack the browser and create its own default search requests

63
6) Ransomware:

➔ Its aim is to gain money from the victim


➔ These are algorithms that encrypt data on the user's computer and hold it ‘hostage’
➔ The attacker holds the information until the user pays some ransom money, after
which he/she may or may not send the decryption key to the user
➔ This malware restricts access to data

➔ The safety measures are:


↳ avoiding phishing files
↳ keeping backup files just in case
↳ use of firewalls and other security softwares

- Phishing
➔ Its aim is to obtain personal information from the user
➔ It occurs when the attacker sends legitimate-looking emails to the users
➔ The emails contain attachments or links that, when clicked, open a fake website on
the user's browser, where it asks the user to enter personal information
➔ The email can look as if it came from a real, genuine employee of a bank or service provider

➔ The safety precautions against phishing are:


↳ deleting spam or emails from unknown companies/people
↳ being aware of phishing trends
↳ run anti-phishing toolbars on browsers which will alert the user about the suspicious website
↳ always look out for a🔒symbol or https in the address bar
↳ regular checks of online accounts are also advisable, as well as changing
passwords on a regular basis
↳ ensure an up-to-date browser is running
↳ use a firewall
↳ be wary of pop-ups and use ad-blockers

- Pharming
➔ It is malicious code installed on the user's computer
➔ The code directs the user to a fake website (that appears authentic) when a
legitimate URL is entered in a browser
➔ The user is encouraged to enter their personal details, like password, credit card number, etc.
➔ No action is needed to initiate it
➔ The attacker, who originally created the code, does this easily gain access to
the user's information

64
➔ The safety precautions are:
↳ use of anti-virus software which will warn the user
↳ advanced, up-to-date browsers can warn the user
↳ look for a🔒or https in the URL on the address bar
↳ use of firewall
↳ don't open suspicious websites
↳ check if the website has authentic SSL certificates
↳ use ad-blockers and anti-malware program
↳ check the spellings of the website; a dash is usually added in the original name to
make it appear legitimate

- Social Engineering
➔ It occurs when the attacker creates a social situation that often leads to a
potential victim dropping their guard
➔ Involves manipulation of people into breaking their normal security procedures and
stopping computer security
➔ There are 5 threat types common in social engineering:
1) Instant Messaging: links are embedded into instant messages such as software upgrades
2) Scareware: pop-up messages which claims that the user's computer is infected with
virus and that an urgent need of anti-virus download is needed
3) Emails: genuine looking emails are sent to a user, who opens them and is sent
to a fake website
4) Baiting: the attacker leaves a malware-infected memory stick somewhere where
it can be found, and the finder plugs it into their computer unconsciously downloading
malicious software
5) Phone Calls: the attackers calls the user, pretending to be an employee of a bank
or service provider, and asks the user for details

➔ This exploits certain human emotions which include: fear, curiosity, empathy and trust

Ways to keep data safe from threats

Access Levels
➔ A method of protection which is often used in huge user systems
➔ Users are assigned different levels of access depending on the role they have. This
means it controls the behaviour and access of users.
➔ It works in a hierarchical way
➔ Restricts user to data according to their role

65
➔ An example of this can be a Discord server, where admins have access to all
channels and the ability to make more, for example, whereas normal users don’t
➔ A system can have admin, member, and guest level accesses

Anti-Malware
➔ Due to danger of theft and corruption of data, companies have anti-malware and
anti-virus installed on their network.
➔ This protects the devices and the data on the network.
➔ There are two types of anti-malware: anti-virus and anti-spyware

➔ Anti-virus softwares are constantly running in the background, scanning documents,


files and also incoming data from the internet
➔ These detect suspicious activity and files before they are ready to be open by the user
➔ They also warn a user when opening suspicious files
➔ If the file is harmful, the anti-virus will quarantine the file away from network,
preventing the file from installing or multiplying itself to other network areas or into the
hard disc drive
➔ It will also ask the user their opinion on whether ot not the file should be removed. If
the user permits, the file will be removed and deleted by the software, eliminating the
risk of malware.

➔ Anti-spyware software often works along anti-virus software and firewall


➔ It detects and removes any potential spyware already installed on the device
➔ It prevents the user from downloading the spyware.
➔ Encrypts files to make them more secure
➔ It blocks access to user's webcam and microphone which could've been targeted by
spyware to collect user information
➔ Scans if there has been any stealing of users’ information

- Authentication
➔ This type of security authenticates the user; it makes the user prove that they are
authorised for accessing data, for example
➔ There are various ways for authentication, such as passwords, biometrics, and
two-step verification

66
Passwords Biometrics Two-Step Verification

➔ A password is a ➔ Authentication methods ➔ Two steps to verify a user:


combination of letters, using human features ↳ Enter username and
numbers, and characters include fingerprints, face, password
used to access an account. voice, and retina. ↳ Enter PIN sent back to
the user through an email
➔ It should be strong to ➔ Fingerprints are unique, or text message
prevent hacking attempts, cannot be misplaced, and
and include a mix of difficult to replicate.
different characters in
random patterns. ➔ Retina scans are very
secure but intrusive,
➔ Don’t use the same slow, and expensive to
password for all accounts set up.
should be avoided.
➔ ➔ Face recognition is
Be mindful of spyware non-intrusive,
attempting to steal cost-effective, but can
passwords. cause issues with changes
in appearance.
➔ Voice recognition is quick,
non-intrusive, and
inexpensive but can have
low accuracy due to the
ability to record or replicate
voices and changes in
voice due to illness.

- Automatic software update:


➔ This ensures that applications like anti-virus and others are always operating with
their latest versions installed
➔ As more attacks and threats are coming and evolving, it is important to keep anti-virus
and other security apps up-to-date

- Spelling and Tone in Communication


➔ The receiver should check if there is any spelling mistakes and the tone used
➔ Real, authentic emails from companies are written in perfect English with a professional
and calm tone

67
➔ Infected emails can have subtle spelling mistakes, such as Gogle, Amazonn, etc.
➔ The emails also often have a tone that rushes the receiver into performing an action
➔ Emails often come from accounts with @gmail; real organisations will not have
@gmail in their email account
➔ In case of a link shared in the email, check if it has only http (and not https), and
destinations other than what the email was about

- Firewalls
➔ A firewall can be either software or hardware
➔ It sits between the user's computer and an external network and filters information in
and out of the computer
➔ They're the primary defence to any computer system to help protect it from hacking,
malware, phishing and pharming

➔ The main tasks of firewall are to examine the traffic between the user's computer and
the public network
➔ Firewall sets up a criteria which can block access to certain websites
➔ Allowed website/traffic are a part of the whitelist
➔ Blocked websites/traffic are a part of the blacklist
➔ Firewall also check whether the incoming and outgoing data meets the given criteria
➔ If it doesn’t, the firewall blocks the traffic

➔ Firewall as software, can be installed on a computer or be a part of its operating system

- Privacy settings
➔ Privacy settings are the controls available on web browsers, social networks and other
websites that are designed to limit who can access and see a user's personal profile.
➔ Examples: "Do not track" setting, allowing a payment method to be saved, safer
browsing, location sharing on apps switched off, etc.

- Proxy Server
➔ Proxy servers act as an intermediate between a user and web server
➔ Features of proxy server are:
↳ allows internet traffic to be filtered; it is possible to block access to a website if
necessary (such as parental control)

68
↳ if DDoS attack is made, it only damages the proxy server, as the user’s IP address is hidden.
Hence, it protects the user from hacking, DDoS and more
↳ directs invalid traffic away from web servers
↳ keeps users' IP addresses a secret
↳ it acts like a firewall

- Secure Socket Layer (SSL)


➔ It is a protocol or set of rules that must be followed for the safe transmission of data online
➔ SSL encrypts the connection between the user's computer and website being used.
➔ If there is an ‘s’ in the protocol of a URL, it means SSL is being used

➔ How it works:
↳ The user's browser sends a request so that it can connect with the required website
↳ The browser then requests that the web server authenticate itself
↳ The web server responds by sending a copy of its SSL certificate to the user's browser
as well as an encryption key (An SSL certificate is a digital certificate which is used to
authenticate a website and enables it to be authenticated)
↳ If the browser can authenticate this certificate, it sends a message back to the web
server to allow the communication to begin
↳ Once this message is received, the web server acknowledges the web browser, and
two-way, encrypted transmission takes place

➔ Examples of the usage of SSL: online banking, shopping, sending and receiving
emails, instant messaging

69
Unit 6:Automated Technologies
Automated Systems
➔ An automated system is a combination of software and hardware that is designed
and programmed to work automatically without the need of any human intervention
with the use of sensors, microprocessors and actuators.

Applications included in 2023-2025 syllabus


↳ Industry
↳ Transport
↳ Agriculture
↳ Weather
↳ Gaming
↳ Lighting
↳ Science

Note: The following list is not exhaustive

Industrial Applications

1) A Nuclear Power Station


➔ Data from the sensors (temperature, flow, pressure, etc.) is sent to the
microprocessor and converted from analogue to digital data using an ADC
➔ If the data is beyond or below the preset values, the appropriate action is taken
➔ The microprocessor sends a signals to an actuator to, for example, reduce the flow of water
➔ If the data are according to the pre-set values, no action will be taken
➔ This process is continuous
➔ Though no supervisor is needed, one can still be appointed in case of emergencies

70
Advantages Disadvantages

Much faster in taking the necessary action than Some conditions, that weren't considered during
a human testing, may occur; hence, there is a need of a
supervisor

Much safer Need enhanced and expensive maintenance

The process is more likely to run under optimum Needs considerable testing
conditions since any small changes needed can
be identified very quickly, and action taken

In long run, it is less expensive Expensive to set up in first place

— Vulnerable to cyber crimes

2) Manufacture of Paracetamol
➔ Data from the sensors (motion, temperature, pressure, etc.) is sent to the
microprocessor and converted from analogue to digital data using an ADC
➔ If the data is beyond or below the preset values, the appropriate action is taken
➔ The microprocessor sends a signals to an actuator to, for example, reduce the
amount of an ingredient being added
➔ If the data are according to the pre-set values, no action will be taken
➔ This process is continuous
➔ Though no supervisor is needed, one can still be appointed in case of emergencies

Advantages Disadvantages

Much faster in taking the necessary action than Some conditions, that weren't considered during
a human testing, may occur; hence, there is a need of
a supervisor

Much safer Need enhanced and expensive maintenance

The process is more likely to run under optimum Need considerable testing
conditions since any small changes needed can
be identified very quickly, and action taken

In long run, it is less expensive Expensive to set up in first place

More consistent results and higher productivity Vulnerable to cyber crimes

Less wasted ingredients —

71
Transport Applications

1) Self-parking cars
➔ The driver goes along a row of parked cars
➔ On-board sensors and cameras send data to the microprocessor, where it is
converted from analogue to digital
➔ This allows the microprocessor to gauge if there is a parking space available
➔ If there is, the microprocessor sends a signal to the loudspeaker or monitor to inform
the driver that there is a vacant space available for parking
➔ The driver then selects auto-parking and the on-board automated system takes over
➔ The microprocessor sends signals to actuators, which are used to operate the
steering rack, brakes and throttle
➔ This allows the car to fit into its parking space automatically, without the driver’s intervention
➔ This process is continuous and will keep working until the car is either parked,
or isn’t in auto-parking mode

Advantages Disadvantages

Allows the same number of cars to use fewer Over-reliance can cause deskilling
parking spaces

Avoids traffic disruption (manual cars take more Need to be clean all the time, as dirty sensors
time to park, hence creating a roadblock) or camera can send incorrect data/images to
the microprocessor, leading to errors

Cars can fit into smaller spaces Kerbing of wheels is a common problem since
the sensors may not pick-up low kerbs

Fewer dents and scratches to cars, which saves Expensive option that doesn’t really save the
money for repairs driver any money

Safer system, since sensors monitor all objects Requires additional maintenance to ensure it
functions correctly at all times

2) Adaptive Cruise Control


➔ The driver sets up a specific speed using the touch screen of his/her car
➔ Lasers present on the bumpers of the car are used to send out signals constantly
➔ These help to find out the distance between itself and any vehicle that may be present
in front of it
➔ The data is sent to the microprocessor and converted from analogue to digital

72
➔ It calculates the distance by measuring the time taken between the emission and
return of the signals
➔ There are two scenarios:
↳ If the vehicle is too near, the microprocessor will send signals to the actuators to
apply the breaks and/or reduce the throttle
↳ If the vehicle is too far, the microprocessor will check if the current car speed is
equal to the pre-set value of the cruising speed. If it is not, it will send signals to the
actuators to increase the throttle.

➔ The whole process is continuous and while keep working until the adaptive cruise
control setting is turned off

Advantages Disadvantages

Fast response Driver can go out of practice/ become deskilled

More consistent results Any virus or issues in the microprocessor can


cause problems in sending or receiving signals

Lowers the likelihood of accidents occuring Expensive to set up

Rarely needs human intervention Maintenance cost is high

Agriculture Applications

1) Automated system used for irrigation


➔ The irrigation of plants is fully automatic here and involves the use of wireless
transmission, which makes it usable almost everywhere
➔ Data from the weather station, usually about humidity levels and weather forecasts, is
received by the microprocessor after set intervals of time (e.g: every 10 minutes)
➔ The ultrasonic water level sensors detect the amount of water in the irrigation
channels, and the microprocessor sends a signal to the actuators to open the pipes if it is
low, for example
➔ The data of the weather station and the data collected from the sensors is then used to
decide whether to start the water pumps or not (for example: if it is going to be a rainy day,
some plants will not need to be watered)
➔ The whole process is continuous

73
Advantages Disadvantages

Reduces labour costs as only a supervisor is Increased need of looking over the water
needed channels to ensure the system works properly
and no overwatering, for example, occurs

Better and efficient control of the irrigation Expensive to set up, and high cost of
process maintenance

Better use and control of precious resource If set up in a rural area, finding a technician who
(which, in this case, is water) can be a challenge

Faster and and more accurate response Can get hacked, or any virus can cause issues

Safer as humans do not need to go out in


extreme weather conditions (e.g: high —
temperature)

The irrigation system can act according to the —


specific needs of each type of crop

Weather Applications

1) Weather stations
➔ These are designed to save labour and to gather information from remote regions or
where there is a constant need of weather data. These stations usually have a
microprocessor, storage/database, battery and a wide range of sensors.
↳ thermometer sensor
↳ anemometer/ wind speed sensor
↳ hygrometer/humidity sensor
↳ barometer/air pressure
↳ level sensor/rainfall
↳ light sensor

➔ All the data collected by the sensors is sent to the microprocessor where it is
converted from analogue to digital data using an ADC and any required calculations
are done
➔ The sensors' data and the calculations are then stored in the database/storage
➔ Reports are sent if needed
➔ The only time actuators are used in this system is when the rain fall is to be
calculated in a specific time limit. This is known as the 'tipping bucket rain gauge'.
➔ This process is continuous

74
Advantages Disadvantages

More accurate than readings taken by humans Needs considerable testing


(chances of parallax error, reaction time error,
etc. are removed)

Can be used by anyone; user-friendly High maintenance

Faster and more efficient Expensive to set up

Low power consumption Parts may be difficult to find

Less labour Vulnerable to viruses or other cyber attacks

Gaming Applications
➔ Gaming devices have sensors which help to provide the user as much as realism as
possible. The sensors that can be used are:
↳ accelerometer
↳ proximity sensor
↳ pressure sensor
↳ motion sensor

➔ The above mentioned sensors continuously send data to the microprocessor


➔ The data is converted from analogue to digital using an ADC, and the microprocessor
sends signals to the appropriate components of the automated system according to the
value of the data
➔ This process is continuous

Advantages Disadvantages

Gives more realism to the game; more Any issues with the sensors will cause issues
immersive gaming experience while playing the game

Can increase the game’s popularity and hence, Can be expensive


generate more revenue for the company

Makes it more user-friendly Needs considerable testing

- May be difficult to use for some users

75
Lightning Applications

➔ The sensors that can be used for this are:


↳ motion sensor
↳ light sensor
↳ infrared sensor

- Streetlight that turns on/off automatically as needed


➔ As it gets darker, the value of the data from the light sensor changes.
➔ This data is sent to the microprocessor and converted from analogue to digital
➔ The microprocessor compares this value to pre-set values
➔ Since it it is lower than the preset value, the microprocessor sends a signal to the
actuator to turn on the lights
➔ When the data from the sensors will indicate that there is enough light, the
microprocessor will send a signal to the actuator to turn off the light
➔ This process is continuous

Advantages Disadvantages

Possible to control remotely Expensive to set up

Reduced energy consumption/more Wireless connections can be less reliable than


environmentally-friendly wired connections

Safer (if wireless connections are used) Requires enhanced maintenance

Longer bulb life —

Possible to program new light displays for —


various occasions

Science Applications
➔ Sensors that can be used:
↳ level sensor
↳ temperature sensor
↳ pressure sensor
↳ gas sensor
↳ pH sensor

76
- Titration using burette A and conical flask B
➔ Level sensors input data and send it to the microprocessor, measuring how much liquid
is added from A
➔ It is converted from analogue to digital data using an ADC
➔ Readings from the pH sensor, measuring the pH of the solution in ‘B’, are also
sent to the microprocessor
➔ When the value of the readings from the pH sensor are equal to 7 (i.e: the solution
has been neutralised), the microprocessor sends a signal to the actuator to close the
tap of burette A
➔ This process is continuous and will keep working until the experiment ends or the
system is turned off

Advantages Disadvantages

Less dangerous (humans will not be exposed to Less flexible than when humans perform
accidental explosive reactions, poisonous experiments
gases, etc.)

More consistent results Expensive to set up

Faster results Needs considerable testing

Automatic analysis of results can also be given —

Fewer staff required —

Robotics
➔ Robotics is a branch of computer science that incorporates the design,
construction and operation of robots
➔ Examples: factory equipment, drones, and domestic robots

Characteristics of a robot
↳ electronic components, such as actuators, sensors, and microprocessors
↳ mechanical structure or framework
↳ programmable

➔ There are two types of physical robots (software robots are not physical, working bots):
↳ Independent robots:
- have no direct human control (are autonomous)
- can replace human activity totally (no human intervention required)

77
↳ Dependent robot
- has human control
- can temporarily replace human activity

- Robots in Industries
➔ Have sensors and end-effectors
➔ They're programmed to do a specific task
➔ They either have a built-in microprocessor or are connected to a computer system

Advantages Disadvantages

Are capable of working in conditions that may Can find it difficult to do ‘non-standard’ tasks
be hazardous to humans

Are less expensive in the long run (since there Can lead to higher rates of unemployment
will be fewer salaries to pay)

Can work 24/7 Risk of deskilling

Are more productive than humans Factories can now be moved to anywhere in the
world where operation costs are lower (leading,
again, to unemployment in some countries)

Are more consistent and almost accurate Are expensive to buy and set up in the first
place

Are best used for repetitive tasks and hence Needs high maintenance
make less mistakes

The cost of heating and lighting will decrease —

- Robots in Transport
➔ Include buses, trains, aeroplanes and more
➔ They are autonomous due to the use of sensors, microprocessors and actuators,
which help them to carry out tasks efficiently and accurately at a faster rate

78
- Buses and cars

Advantages Disadvantages

Safer, since chances of accidents is decreased Very expensive to set up

Better for the environment since vehicles will The risk of hacking and viruses is always
operate more efficiently present

Smoother flow of traffic Security and safety issues

Increased lane and parking capacity Everything has to be well-maintained and


cleaned regularly (sensors, cameras, etc.)

Reduces travel time Passengers may be reluctant to use this new


technology

No driver required Can lead to higher rates of unemployment

- Trains

Advantages Disadvantages

Improves the punctuality of trains Vulnerable to cyber attacks

Increases the safety, since human error is The system doesn’t work well with very busy
removed services

Reduces the running costs Security risks are increased; hence, CCTV
cameras need to be used

Minimises energy consumption Passengers may be reluctant to use this new


technology

It is possible to increase the frequency of trains High capital costs


arriving

Easier to change schedules for arrival and Needs enhanced maintenance


departure

79
- Aeroplanes

Advantages Disadvantages

Reduced running costs Vulnerable to cyber attacks

Improves safety since human error is removed High capital costs and operational costs

Improvement in passenger comfort Passengers may be reluctant to use this new


technology

Improved aerodynamics (no cockpit required) Security risks are high

— Glitches in the software or hardware can be


disastrous

(Most of the advantages and disadvantages are the same, with the exception of a few)

- Robots in Agriculture
➔ In agriculture, robots are mainly used for:
↳ harvesting of crops/picking vegetables and fruit
↳ phenotyping (the process of observing physical characteristics of a plant in order to
assess its health and growth)
↳ seed-planting and fertiliser distribution
↳ grass mowers/cutters
↳ weeding, pruning and harvesting

➔ All of these devices use sensors and cameras to go around obstacles; they can
even be programmed to ‘go to sleep’ if the weather turns bad

➔ Use of sensors, microprocessors and actuators helps the process to be done


effectively and accurately. Drones, cameras and end-effectors are used, too.

80
Advantages Disadvantages

Faster at predicting problems and solving them Needs to be cleaned regularly

More accurate and effective High set up costs

Saves labour costs Needs enhanced maintenance

Less human error Needs a considerable amount of testing

Can work 24/7 Leads to deskilling of humans

Improves growth (weed growth is controlled) Increases unemployment rates

Faster at harvesting —

Increases yield —

Timely action can be taken by spraying


fertilisers, pesticides, insecticides, etc. when —
needed

- Robots in Medicine
➔ Can be used in surgical procedures, making them more safe, accurate, and cost-friendly
➔ Can be used for monitoring patients as nurse bots
➔ Disinfecting of rooms and operating theatres can be done by robots
➔ Can take blood samples from patients decreasing the risks of infection, human error,
and make it time-friendly for doctors and nurses
➔ Prosthetic limbs are also robots

81
Advantages Disadvantages

Free up doctors and nurses for other tasks that High cost of maintenance
require more skill

Safer May still require a supervisor

Threat of infections in minimised Can lead to unemployment of doctors, nurses


and even cleaners

Cost-friendly Patient's may be reluctant to use this new


technology

Faster at finding issues and solving Needs considerable amount of testing


them/providing solutions

No human error High set up costs

Any issues with the sensors, microprocessor or


— actuator can lead to incorrect diagnoses

- Robots in Domestic
➔ Used for household chores
➔ Autonomous household robots:
↳ autonomous vacuum cleaners
↳ autonomous grass cutters (mowers)
↳ personal assistants

➔ All of these use different types of sensors and actuators

Advantages Disadvantages

Makes daily life easier Expensive to buy

Reduces costs by decreasing the need for May need extra maintenance
cleaners, for example

- Robots in Entertainment
➔ Used for different purposes such as:
↳ robots dressed as cartoon characters to entertain and interact with visitors in amusement parks
↳ music festival robots used for visual effects, monitor lighting and camera robots, to
take pictures

82
↳ robots are used to shoot scenes during movie production
↳ humanoid robots can perform stunts during movie production
↳ used to shoot scenes with a precision, speed and coordination that isn’t humanly impossible

Advantages Disadvantages

Safer for humans Expensive to buy/set up

— Needs considerable maintenance

— Parts may be difficult to find

Artificial Intelligence
➔ Artificial intelligence (AI) is a branch of computer science that deals with the
simulation of intelligent behaviours by a computer

➔ Characteristics of AI:
↳ Collecting data
↳ Stores rules for using the data
↳ The ability to reason
↳ The ability to learn
↳ The ability to adapt
↳ The ability to change its own rules
↳ The ability to change its own data

➔ The three categories of AI:


↳ narrow AI: better at doing one specific task compared to a human
↳ general AI: similar at doing one specific task compared to a human
↳ strong AI: much better at doing many different tasks compared to human
➔ The AI system is capable of learning and adapting to its surroundings
➔ Can make predictions on the collected new data
➔ Examples of AI:
↳ smart home devices such as Alexa and Siri
↳ chatbots
↳ autonomous cars
↳ facial features recognition

83
➔ There are two types of AI (only these are to be studied):
↳ Expert System
↳ Machine Learning

- Expert System
➔ A type of AI that has been developed to mimic human knowledge and experiences
➔ Has a knowledge base, and inference engine, and interface, and a rules base
➔ Uses knowledge and inference to solve problems or answer questions that would
normally require a human expert

➔ Applications of expert systems:


↳ oil and mineral prospecting
↳ diagnosis of a patient’s illness
↳ tax and financial calculations
↳ strategy games, such as chess
↳ logistics
↳ identification of plants, animals and chemical/biological compounds

Advantages Disadvantages

Can have many areas of expertise Need considerable amount of training

High accuracy Set up and maintenance costs are very high

Results are consistent Can give very cold responses, that may not be
suitable in certain medical situations

Have the ability to store vast amounts of ideas They are only as good as the information/facts
and facts entered into the system

Make traceable logical solutions and —


diagnostics

Have very fast response times —

Provide unbiased reporting and analysis of the —


facts

84
- User
interface
Note: Diagram to be added.

➔ Interacts with the user


➔ Interaction can be done through dialogue boxes, command prompts or other input methods
➔ Yes/No questions can be asked, and are based on previous answers

- Inference Engine
➔ The main processing element
➔ Acts like a search engine examining the knowledge base for information or data that
matches with the user's answers
➔ Is the problem-solving part as it makes use of inference rules present in the rules base

- Knowledge base
➔ Repository of facts
➔ Stores all the available authentic knowledge and information about an area/areas of expertise
➔ Collection of objects and their attributes

- Rules base
➔ Contains the inference rules
➔ rules are used by the inference engine to draw conclusions
➔ Follows logical thinking, which often includes "IF" statements

- Setting up an expert system


➔ Information about a particular area of expertise is collected and checked by experts;
this can be from websites on the internet, books, research papers, etc.
➔ All this information makes up the knowledge base
➔ A rules base is made by writing all the inference rules that may be needed
➔ The inference engine is made and tested extensively, ensuring that it works as needed
and there are no errors
➔ The user interface is made by choosing an appropriate method of interaction between
the user and the system, and then incorporating the hardware required for it into it
➔ When all the components are completed, the expert system is tested

85
Machine Learning
➔ It is a type of AI which has the ability to automatically learn and adapt to its own
processes and/or data
➔ Possible for the system to make predictions or even take decisions based on previous scenarios
➔ Offers fast and accurate outcomes due to its very powerful processing capability
➔ Has the ability to manage and analyse considerable volumes of complex data
➔ An example:

A robot needs to find its way through different puzzles. Each puzzle has a series of paths that the
robot needs to follow to find its way to the end of the puzzle. The puzzle contains dead ends and
obstacles, so the robot needs to decide which way to go. The robot’s program will use artificial
intelligence (AI).

The robot will use machine learning. It will adapt to deal with data provided to it. Data would be
about its location so that it does not follow the same route that may lead to a dead end. Data
would be about common and repeated obstacles and would allow the robot to take appropriate
reaction(s). It would store successful actions as well, as it would allow it to understand what’s
more likely to work at a certain condition.

Differences between Expert Systems and Machine Learning

Expert systems Machine learning

Represents a simulated intelligence in The practice of getting the machines to make


machines decisions about new situations, processes
etc. without being programmed to do so

They are machines that are capable of The aim is to make machines that learn from
thinking exactly like humans data acquisition, and solve new problems
from past experience

86
These notes for Computer Science
(2210/0478) have been prepared by
Team Mojza, covering the content for Acknowledge
GCE O levels and IGCSE 2023-25
syllabus. The content of these notes has ments
been prepared with utmost care. We
apologise for any issues overlooked; Authors:
factual, grammatical or otherwise. We Fasiha Raza
hope that you benefit from these and Hasan
find them useful towards achieving your Nawaz
goals for your Cambridge examinations. Zoella
Ahmad
If you find any issues within these
notes or have any feedback, please Proof-
contact us at [email protected]. readers:
Anas Asim
Hadiya
Farrukh
Hasan
Nawaz
Zoella
Ahmad

Designers:
Fasiha Raza

© 2023 Mojza. All rights reserved.


87
The content of these notes may not be republished or redistributed without permission from Mojza.

88

You might also like