IGCSE Computer Science Notes
IGCSE Computer Science Notes
on
Topic: Number Systems
Why Binary System
• Any form of informa+on needs to be converted into a binary
format so that it can be processed by a computer
• Computer contains millions and millions of +ny switches, which
can be turned on and off.
• Therefore, the binary system is chosen as the way for a
computer to represent any sort of data.
Saad Shah
• Using binary allows for simple and efficient data processing and
storage.
Hexadecimal System
• It is a base 16 system.
• It uses 16 digits to represent each value
Saad Shah
Saad Shah
• The MAC address refers to the network interface card (NIC)
which is part of the device
• The MAC address is rarely changed so that a par+cular device
can always be iden+fied no maQer where it is.
Usage 3: Internet Protocol Addresses
• Each device connected to a network is given an address known
as the Internet Protocol address
• An IPv4 address is a 32-bit number wriQen in denary or
hexadecimal form e.g. 109.108.158.1 (or 77.76.9e.01 in hex)
• IPv4 has recently been improved upon by the adop+on of IPv6.
An IPv6 address is a 128-bit number broken down into 16-bit
chunks, represented by a hexadecimal number.
Eg. a8f b:7a88:fff0:0fff:3d21:2085:66f b:f0fa
Usage 4: HyperText Markup Language (HTML) colour code
• HyperText Mark-up Language (HTML) is used when wri+ng and
developing web pages.
• It is not a programming language, but a markup language.
• A mark-up language is used in the processing, defini+on and
presenta+on of text.
Saad Shah
The 4 usages of Hexadecimals - EMIH
1. E - Error Codes
2. M - MAC Address
3. I - Internet Protocol Address
4. H - HTML Colour Code
Addi$on of binary number
How do we perform add and carry in binary?
0+0=0
0+1=1
1+0=1
1 + 1 = 10
Saad Shah
1 ) = 255
• The genera+on of a 9th bit is a clear indica+on that the sum has
exceeded this value.
• This is known as an overflow error. The sum is too big to be stored
using 8 bits.
BINARY SHIFTING
• Binary shiN is a process that a CPU uses to perform
mul+plica+on and division.
Saad Shah
Divide by 8, shiN 3 place to the right
Divide by 2^n, shiN n place to the right
Saad Shah
2. Invert all bits (change 0 to 1 and 1 to 0).
3. Add 1 to the inverted result.
Example: Convert +6 to -6 in Two’s Complement (8-bit)
1. PosiRve 6 in Binary (8-bit): 00000110
2. Invert All Bits: 11111001
3. Add 1: 11111001 + 1 = 11111010
• Result: -6 in two’s complement is 11111010
Two's Complement Range for 8-bit Binary:
• Range:
Two’s complement 8-bit binary can represent numbers from -
128 (10000000) to +127 (01111111).
Verifying Two's Complement RepresentaRon
1. Binary to Denary Conversion (NegaRve Example):
o To find the denary value of a nega+ve two’s complement
binary number, invert the bits and add 1, then convert to
denary and apply a nega+ve sign.
2. Example:
o Binary 11111010
o Invert bits: 00000101
o Add 1: 00000101 + 1 = 00000110
Result: -6 in denary
Saad Shah
o
Technical Vocabulary
• Binary: Base-2 number system used by computers,
with only two digits (0 and 1).
• Denary (Decimal): Base-10 number system,
commonly used in everyday coun?ng, with digits
from 0 to 9.
• Hexadecimal: Base-16 number system, with digits
Saad Shah
0-9 and A-F, oEen used for compact binary
representa?on.
• Overflow: Occurs when a calcula?on produces a
result too large for the system's allocated number
of bits.
• Logical ShiC: Binary opera?on that shiEs all bits
leE or right, filling with 0s.
• Two’s Complement: A method for represen?ng
signed binary numbers (posi?ve and nega?ve).
• Most Significant Bit (MSB): The leEmost bit in a
binary number, which indicates the sign
Topic: Data RepresentaIon - Text, Sound, and Images
Text RepresentaRon in Computers
How and Why Computers Represent Text
• Computers represent text using binary codes because
computers can only process data in binary (0s and 1s). Each
character (leQer, number, symbol) is assigned a unique binary
code.
• These codes are organized in character sets, which map each
character to a specific binary value.
Saad Shah
Character Sets
1. ASCII (American Standard Code for InformaRon Interchange):
o DefiniRon: A character set that uses 7 bits to represent
each character, allowing for 128 unique characters.
o Characters Represented: ASCII includes English lebers
(both uppercase and lowercase), numbers, common
punctuaRon marks, and some control characters (e.g.,
newline).
o Example:
§ The ASCII code for uppercase "A" is 01000001.
§ The ASCII code for lowercase "a" is 01100001.
2. Unicode:
o DefiniRon: A character set that can use 8, 16, or 32 bits to
represent each character, providing a much larger range
of characters than ASCII.
o Characters Represented: Unicode includes all ASCII
characters plus characters from many different languages
and symbols (e.g., Arabic, Chinese, mathema+cal
symbols, emojis).
o Example:
The Unicode code for the character "A" is U+0041.
Saad Shah
§
Saad Shah
o DefiniRon: The number of samples taken per second,
measured in Hertz (Hz).
o Effect on Quality: A higher sample rate captures more
detail in the sound wave, resul+ng in beQer sound quality.
o Common Sample Rates:
§ 44.1 kHz (CD quality) – 44,100 samples per second.
§ 48 kHz (DVD quality).
o Example: If a sound is sampled at 44.1 kHz, the computer
takes 44,100 samples of the sound wave every second.
2. Sample ResoluRon (Bit Depth):
o DefiniRon: The number of bits used to store each sample.
o Effect on Quality: A higher bit depth allows for more
precise values for each sample, resul+ng in beQer sound
quality.
o Common Bit Depths:
§ 8-bit: Can represent 256 different values.
§ 16-bit: Can represent 65,536 different values (CD
quality).
o Example: With a 16-bit sample resolu+on, each sample
can be stored as one of 65,536 possible values, providing a
more accurate representa+on of the sound.
Saad Shah
•
Saad Shah
o
Saad Shah
Summary of Key Concepts
Concept DefiniRon Effect on Quality
Technical Vocabulary
• ASCII: A 7-bit character encoding standard that represents text.
• Unicode: A character encoding standard that includes a wide
range of characters from different languages and symbols.
Saad Shah
• Pixel: The smallest unit of an image, represen+ng a single color.
• ResoluRon: The number of pixels in an image, affec+ng its
clarity and detail.
• Color Depth: The number of bits used to represent the color of
each pixel, affec+ng the range of colors.
• Sample Rate: The number of samples per second in digital
audio, affec+ng sound quality.
• Sample ResoluRon (Bit Depth): The number of bits used to store
each sound sample, affec+ng the dynamic range and richness of
sound.
Topic: Data Storage and Compression
Understanding How Data Storage is Measured
• Data storage is the amount of digital informa+on that can be
held on a storage device (e.g., hard drive, SSD, USB drive).
• Measurement Units:
o Bit (b): The smallest unit of data, represented by a 0 or 1.
o Byte (Bi): 1 Byte = 8 bits. A byte typically represents a
single character, like a leQer or symbol.
o Kilobyte (KiB): 1 KB = 1,024 Bytes.
Saad Shah
o Megabyte (MiB): 1 MB = 1,024 KB.
o Gigabyte (GiB): 1 GB = 1,024 MB.
o Terabyte (TiB): 1 TB = 1,024 GB.
• Example:
o A document with 5,000 characters would require about
5,000 bytes, or ~5 KB of storage.
Saad Shah
1. Storage Savings:
o Compressed files use less storage space, allowing more
files to be stored on a device.
2. Faster Transmission:
o Smaller files take less +me to upload, download, and
transfer across networks, improving data transfer speed.
3. Cost Efficiency:
o Reducing file sizes can lower storage and bandwidth costs,
especially for large datasets or media files.
Examples of Compressed File Formats:
• Image: JPEG (lossy), PNG (lossless)
• Audio: MP3 (lossy), FLAC (lossless)
• Video: MP4 (lossy), AVI (lossless)
• Text/Documents: ZIP, RAR (both support lossless compression)
Topic: Methods of Data Compression: Lossy and Lossless
Lossy Compression
• DefiniRon:
Lossy compression reduces file size by permanently removing
some data that is considered less important or less no+ceable.
This results in a smaller file size but a loss of quality.
• How It Works:
o Lossy compression algorithms discard some data, such as
sounds or colors that are outside the range of human
percep+on.
Saad Shah
o For example, in JPEG images, minor color changes are
discarded to reduce the file size.
• Common Uses:
o Image Files: JPEG, WebP
o Audio Files: MP3, AAC
o Video Files: MP4, HEVC
Lossless Compression
• DefiniRon:
Lossless compression reduces file size without losing any data.
The original file can be fully restored aNer decompression.
Saad Shah
• How It Works:
o Lossless compression algorithms find and reduce
redundancy in data without discarding any informa+on.
o For example, in PNG images, repeated paQerns or colors
are compressed by recording them only once.
• Common Uses:
o Image Files: PNG, BMP
o Audio Files: FLAC, ALAC
o Text/Documents: ZIP, RAR, GZIP
• Advantages of Lossless Compression:
o No quality loss: The file can be restored to its original
form, making it ideal for files where data integrity is
essen+al.
o Suitable for documents, images, and audio files where
exact data recovery is required.
• Disadvantages of Lossless Compression:
o Less effec+ve in reducing file size compared to lossy
compression, so the compressed files may s+ll be rela+vely
large.
Saad Shah
Some data is permanently
Data Loss No data is lost
removed
Data Storage Measurement units for data: Bit, Byte, KB, MB, GB,
Units TB.
Saad Shah
Compression smaller file size, leading to quality loss.
Saad Shah
• ResoluRon (Image): The number of pixels in an image,
determining clarity and detail.
• Color Depth: The number of bits per pixel in an image,
determining the range of colors.
• Lossy Compression: A method of reducing file size by
permanently removing data, leading to a smaller but lower-
quality file.
• Lossless Compression: A method of reducing file size without
losing any data, allowing full recovery of the original file.
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
CHAPTER 2: DATA TRANSMISSION
Topic: Types and modes of Data Transmission
Data Packets
DefiniRon and Purpose:
• When large amounts of data are transmiQed over a network,
they are broken down into smaller units called packets. Each
packet travels independently across the network and is
reassembled at the des+na+on.
• This method helps in efficient data transmission, especially over
Saad Shah
shared networks where packets can take different routes to
reach their des+na+on.
Benefits of Using Packets:
• Reliability: If a packet is lost or corrupted, only that specific
packet needs to be resent rather than the en+re file.
• Efficiency: Breaking data into packets allows mul+ple devices to
send and receive data over the same network simultaneously.
Structure of a Packet
A data packet typically consists of several parts that help ensure it
reaches its des+na+on correctly.
1. Header: Contains informa+on needed to route the packet, such
as:
o Source Address: The IP address of the sender.
o DesRnaRon Address: The IP address of the receiver.
o Packet Number: Iden+fies the posi+on of the packet in the
sequence so the packets can be reassembled in the correct
order.
Saad Shah
o Protocol InformaRon: Specifies the communica+on
protocol (e.g., TCP/IP).
2. Payload (Data): The actual data being transmiQed. This can be
a fragment of the en+re message, such as part of an email, file,
or web page.
3. Trailer (Footer): Contains error-checking informa+on (such as a
checksum) to detect errors in the packet. If the trailer indicates
an error, the packet will be resent.
Packet Switching
DefiniRon:
• Packet switching is a method used in data networks, like the
internet, to send packets independently across the network to
their des+na+on.
• Each packet may take a different route based on network
availability and conges+on. At the des+na+on, packets are
reassembled into the original message using their sequence
numbers.
Process of Packet Switching:
Saad Shah
1. Data is divided into packets, each with a header containing the
des+na+on address.
2. Packets are sent individually across the network. Routers
examine each packet's des+na+on address and determine the
best path based on current network traffic.
3. Packets may arrive at the des+na+on out of order or may take
different routes.
4. Once all packets reach the des+na+on, they are reassembled in
the correct order using their sequence numbers.
Advantages of Packet Switching:
• Efficiency: The network can be used by mul+ple devices
simultaneously, improving bandwidth u+liza+on.
• Resilience: If a par+cular path is congested or down, packets
can be rerouted through alternate paths.
• Scalability: Packet switching is ideal for large, dynamic
networks like the internet.
Saad Shah
o Commonly used for long-distance communica+on because
it minimizes interference and is reliable over long
distances.
o Example: USB (Universal Serial Bus) for data transfer
between a computer and peripherals.
2. Parallel Transmission:
o Data is transmiQed mulRple bits at a Rme over mul+ple
channels.
o Commonly used for short-distance communica+on due to
poten+al interference and signal degrada+on over longer
distances.
o Example: Internal data transfer within a computer, such
as between the CPU and RAM.
3. Synchronous Transmission:
o Data is sent in a conRnuous stream with the help of a
shared clock signal between the sender and receiver.
o Suitable for high-speed data transfer as no start/stop bits
are required, and there’s minimal delay between data
packets.
o Example: Real-Rme video streaming where a steady flow
of data is essen+al for smooth playback.
4. Asynchronous Transmission:
Data is sent in small, independent packets with start and
Saad Shah
o
Saad Shah
o
Saad Shah
des+na+on.
Saad Shah
across a network to be reassembled at the des+na+on.
• Serial Transmission: A data transmission method where bits are
sent one aNer the other along a single channel.
• Parallel Transmission: A data transmission method where
mul+ple bits are sent simultaneously along mul+ple channels.
• Synchronous Transmission: Data transmission where data is
sent in a steady, con+nuous stream with synchroniza+on.
• Asynchronous Transmission: Data transmission where each
data packet is sent with start and stop signals for +ming.
Topic: Error DetecIon in Data Transmission
Need for Error DetecRon in Data Transmission
Why Error DetecRon is Necessary:
• When data is transmiQed over a network or between devices,
errors can occur due to factors such as noise, interference,
signal degradaRon, and hardware issues.
• Errors in transmibed data can lead to corrup+on, loss of
informa+on, or misinterpreta+on, which can have serious
consequences, especially in cri+cal applica+ons (e.g., financial
Saad Shah
transac+ons, healthcare systems).
• Therefore, it's essen+al to check for errors aNer data
transmission to ensure data integrity and reliability.
How Errors Can Occur:
1. Noise: Electromagne+c interference from other electronic
devices can alter the data signal, causing errors.
2. Signal DegradaRon: Over long distances, data signals can
weaken, which may result in bits being misinterpreted.
3. Hardware MalfuncRons: Faulty hardware, such as network
cables, connectors, or routers, can introduce errors during data
transmission.
4. Packet Loss: In some cases, data packets can be lost in
transmission, leading to incomplete data.
Error DetecRon Methods
There are several methods used to detect errors in data aNer
transmission. These include parity checks, checksums, and echo
checks.
a. Parity Check
A parity check is a simple method used to detect single-bit errors by
adding an extra bit (parity bit) to the data.
1. Odd Parity Check:
o The parity bit is set so that the total number of 1s in the
data (including the parity bit) is odd.
Saad Shah
o If the number of 1s becomes even at the receiver, it
indicates that an error has occurred in the transmission.
2. Even Parity Check:
o The parity bit is set so that the total number of 1s in the
data (including the parity bit) is even.
o If the number of 1s becomes odd at the receiver, it
indicates an error.
Process of Parity Check:
1. Sender calculates the parity (odd or even) based on the data
bits and adds the parity bit.
2. Data with the parity bit is transmiQed to the receiver.
3. Receiver checks the parity of the received data.
4. If the parity does not match the expected value (odd or even),
an error is detected.
LimitaRons:
• A parity check can only detect single-bit errors. If mul+ple bits
are flipped, the error may go undetected.
Checksum
A checksum is a value calculated from a data block that is used to
detect errors.
Process of Checksum:
1. The sender calculates a checksum value by adding up all the
bytes in the data block. This sum may be adjusted using
Saad Shah
modulo arithme+c to fit into a standard size.
2. The checksum is sent along with the data.
3. The receiver calculates its own checksum for the received data
and compares it to the transmiQed checksum.
4. If the checksums match, the data is considered error-free. If
they don’t match, it indicates that an error occurred during
transmission.
Example Use:
• Checksums are commonly used in network protocols like TCP/IP
to ensure data integrity.
LimitaRons:
• Like the parity check, a checksum cannot always detect all types
of errors, especially if mul+ple bits are altered in a way that
results in the same checksum.
Echo Check
An echo check is a method where the receiver sends the data back to
the sender for verifica+on.
Process of Echo Check:
1. The sender transmits the data to the receiver.
2. The receiver sends an exact copy (echo) of the received data
back to the sender.
3. The sender compares the echoed data with the original data.
4. If the echoed data matches the original data, the transmission
is considered error-free. If they don’t match, an error is
Saad Shah
detected.
LimitaRons:
• An echo check doubles the amount of data transmiQed, which
can increase network traffic.
• This method does not iden+fy where the error occurred, making
it less efficient than other error-checking methods.
Check Digits
A check digit is an extra digit added to a sequence of numbers to
verify that the data has been entered correctly. It is calculated based
on the other digits in the sequence and can be used to detect data
entry errors.
How a Check Digit Works:
1. A formula is applied to the digits in the data to calculate the
check digit.
2. The check digit is added to the end of the data.
3. When the data is entered, the check digit is recalculated. If it
doesn’t match the provided check digit, an error is detected.
Examples of Check Digit Use:
1. ISBN (InternaRonal Standard Book Number):
o ISBNs use a check digit to verify that the book number is
entered correctly.
Saad Shah
o For example, in an ISBN-10 number, the check digit is
calculated based on a weighted sum of the first 9 digits.
2. Bar Codes:
o Bar codes used in retail include a check digit to ensure that
the scanned data is correct.
Benefits of Check Digits:
• Check digits are simple and effec+ve for detec+ng common data
entry errors, such as transposing two numbers or entering an
incorrect digit.
AutomaRc Repeat Query (ARQ)
DefiniRon:
• AutomaRc Repeat Query (ARQ) is an error control method that
ensures data is received without errors by retransmixng data
when errors are detected.
How ARQ Works:
1. Sender sends a packet of data to the receiver.
2. The receiver checks the packet for errors using an error
detec+on method (e.g., checksum).
3. Acknowledgment (ACK): If the packet is received without
Saad Shah
errors, the receiver sends an acknowledgment (ACK) to the
sender.
4. NegaRve Acknowledgment (NACK): If an error is detected, the
receiver sends a nega+ve acknowledgment (NACK), reques+ng
the sender to resend the packet.
5. Timeout: If the sender does not receive an ACK within a certain
+me, it assumes the packet was lost or corrupted and
retransmits it.
Types of ARQ:
1. Stop-and-Wait ARQ: The sender waits for an acknowledgment
aNer sending each packet before sending the next one.
2. Go-Back-N ARQ: The sender can send mul+ple packets before
receiving an acknowledgment, but if an error is detected in a
packet, all subsequent packets are retransmiQed.
3. SelecRve Repeat ARQ: Only the erroneous packets are
retransmiQed, rather than all subsequent packets.
Benefits of ARQ:
• Ensures data integrity by confirming that each packet has been
received correctly.
• Provides an efficient way to handle errors without requiring
large amounts of redundant data.
Saad Shah
Concept Description
Saad Shah
• Check Digit: A digit added to the end of a number
sequence to detect data entry errors.
• Automa$c Repeat Query (ARQ): An error control
method that uses acknowledgments and retransmissions
to ensure data integrity.
• Acknowledgment (ACK): A signal sent to confirm that
data has been received correctly.
• Nega$ve Acknowledgment (NACK): A signal sent to
indicate that an error was detected in the received data.
Topic: EncrypIon in Data Transmission
The Need for and Purpose of EncrypRon
Why EncrypRon is Necessary:
• Data security is a cri+cal concern in today's digital world. When
data is transmiQed over a network, there is a risk that
unauthorized individuals could intercept and access it.
• Cyber threats like hacking, data breaches, and eavesdropping
can compromise sensi+ve data, especially when it is sent over
the internet.
Saad Shah
• Encryp+on protects data by making it unreadable to
unauthorized par+es, ensuring that only the intended recipient
can access the original informa+on.
Purpose of EncrypRon:
1. ConfidenRality:
o Encryp+on ensures that data remains confiden+al by
transforming it into an unreadable format. Only
authorized users with the correct decryp+on key can read
the data.
2. Data Integrity:
o Encryp+on helps prevent unauthorized tampering. If
encrypted data is altered during transmission, the
decryp+on process will likely produce unreadable or
corrupted data, signaling an issue.
3. AuthenRcaRon:
o Encryp+on can be combined with digital signatures to
authen+cate the sender's iden+ty, ensuring that the data
comes from a legi+mate source.
4. PrevenRng Unauthorized Access:
o By encryp+ng data, it becomes challenging for
unauthorized individuals to interpret or misuse the
informa+on if they intercept it during transmission.
Example Scenarios Where EncrypRon is EssenRal:
Online banking transacRons: Protects sensi+ve financial
Saad Shah
•
Saad Shah
•
Asymmetric EncrypRon
DefiniRon:
Saad Shah
• Asymmetric encrypRon (also known as public-key encryp+on)
uses a pair of keys: a public key and a private key. Each key
performs a one-way func+on, meaning that data encrypted
with one key can only be decrypted with the other key in the
pair.
How Asymmetric EncrypRon Works:
1. The sender uses the receiver's public key to encrypt the data.
The public key can be shared openly and is not sensi+ve.
2. The encrypted data (ciphertext) is sent to the receiver.
3. The receiver uses their private key to decrypt the ciphertext
back into plaintext. The private key is confiden+al and should
not be shared.
Example of Asymmetric EncrypRon Algorithm:
• RSA (Rivest-Shamir-Adleman): One of the most widely used
asymmetric encryp+on algorithms, commonly used in secure
data transmission, digital signatures, and SSL/TLS for website
security.
Advantages of Asymmetric EncrypRon:
• Secure Key DistribuRon: Since the public key is used for
encryp+on and can be shared openly, there is no need to send a
secret key over the network.
AuthenRcaRon: Asymmetric encryp+on can also be used to
Saad Shah
•
Saad Shah
Secure communica+on, e.g.,
Use Cases of data, e.g., file
SSL/TLS, secure emails
encryp+on
Saad Shah
The unreadable, encrypted version of the original
Ciphertext
data (plaintext).
Technical Vocabulary
• EncrypRon: The process of conver+ng readable data (plaintext)
into an unreadable format (ciphertext) to protect it.
• Symmetric EncrypRon: An encryp+on method that uses a single
key for both encryp+on and decryp+on.
• Asymmetric EncrypRon: An encryp+on method that uses a pair
of keys (public and private) for secure data transmission.
• Public Key: A key that is openly shared and used to encrypt data
in asymmetric encryp+on.
• Private Key: A confiden+al key used to decrypt data in
asymmetric encryp+on.
• Ciphertext: The encrypted form of data, which is unreadable
without the decryp+on key.
• Plaintext: The original, readable data before encryp+on.
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Chapter: Hardware
Topic: Input and Output Devices
Input Devices
What is an Input Device?
• An input device is any hardware component that allows users
to enter data and instrucRons into a computer system.
• Input devices are necessary because they enable interacRon
between the user and the computer, allowing the user to
provide data or commands to be processed.
Saad Shah
Why Input Devices are Required:
• User InteracRon: Input devices are essen+al for users to
communicate with and control the computer.
• Data Entry: They allow users to input data, which is essen+al for
tasks like typing documents, entering commands, or capturing
real-world data (e.g., sensors).
• Diverse ApplicaRons: Input devices are needed in various
applica+ons, such as typing (keyboard), drawing (graphics
tablet), or gaming (joys+ck).
Output Devices
What is an Output Device?
• An output device is any hardware component that conveys
Saad Shah
informa+on from the computer to the user or another device.
• Output devices are essen+al for displaying results of processed
data and enabling the user to perceive the informa+on
generated by the computer.
Why Output Devices are Required:
• Display of InformaRon: They allow the computer to present
processed data to the user in various formats (visual, audio,
etc.).
• CommunicaRon with Users: Output devices provide feedback,
enabling users to make decisions based on the displayed
informa+on.
• Diverse ApplicaRons: Output devices are used for various tasks,
from displaying text on a screen to prin+ng documents or
playing audio.
Examples of Output Devices:
1. Monitor: Displays text, images, and videos to the user.
2. Printer: Produces a hard copy of digital documents, such as text
and images.
3. Speaker: Plays audio output, such as music or voice.
4. Projector: Displays images or videos on a large screen, oNen
used in presenta+ons.
5. Headphones: Provide a private audio output for the user.
Sensors
Saad Shah
a. What is a Sensor?
DefiniRon of a Sensor:
• A sensor is a device that detects and measures physical
proper+es in the environment (such as temperature, light, or
mo+on) and converts these measurements into data that a
computer or digital system can interpret.
• Sensors act as input devices by capturing data from the physical
world and sending it to the computer for processing.
Purpose of Sensors:
• AutomaRon: Sensors are essen+al for automated systems (like
smart homes) that respond to environmental changes.
• Data CollecRon: Sensors allow computers to collect real-+me
data from the physical environment, which is used in
applica+ons like weather monitoring and security systems.
• Decision-Making: The data collected by sensors is oNen used to
trigger ac+ons, such as turning on lights when mo+on is
detected or adjus+ng the thermostat based on temperature.
Saad Shah
Types of Sensors, Data Captured, and Usage
Example Use
Sensor Type Data Captured Suitable Context
Case
LighRng systems
Automa+c that adjust based
Light Sensor Light intensity
street ligh+ng on ambient light
levels
Saad Shah
MoRon Security Security systems to
Mo+on detec+on
Sensor systems detect movement
Industrial
Manufacturing and
Pressure Pressure applica+ons
industrial
Sensor measurement (e.g., pressure
processes
in pipes)
Climate monitoring
Humidity Weather
Humidity levels and agricultural
Sensor sta+ons
applicaRons
Example Use
Sensor Type Data Captured Suitable Context
Case
Remote
Home electronics
Infrared (IR) controls and
Heat or mo+on and security
Sensor night-vision
systems
cameras
Saad Shah
Environmental
Noise level monitoring and
Sound Sensor Sound levels
monitoring security in noise-
sensi+ve areas
Environmental and
Acidity/alkalinity Water quality health applicaRons
pH Sensor
levels tes+ng in water quality
control
SelecRng the Most Suitable Sensor for a Given Context
1. Security System: A moRon sensor would be ideal for detec+ng
intruders. If any movement is detected, an alarm could be
triggered.
2. Smart LighRng System: A light sensor would be suitable for
adjus+ng indoor ligh+ng based on ambient light levels. Lights
could automa+cally turn on when it’s dark.
3. Agricultural Use: A humidity sensor could be used to monitor
soil moisture, ensuring crops receive the right amount of water.
4. Climate Control: A temperature sensor is ideal for adjus+ng
Saad Shah
hea+ng and cooling systems in buildings to maintain
comfortable temperature levels.
Summary of Key Concepts
Concept DescripRon
Saad Shah
into data.
Saad Shah
• MoRon Sensor: A sensor that detects movement or mo+on.
• Light Sensor: A sensor that measures the intensity of light.
• Humidity Sensor: A sensor that measures the moisture level in
the air or soil.
• Proximity Sensor: A sensor that detects the presence of nearby
objects without physical contact.
• Pressure Sensor: A sensor that measures pressure exerted by
gases or liquids.
Chapter: The internet and its uses
Topic: The internet and the world wide web
1. Difference Between the Internet and the World Wide Web
• The Internet:
o The internet is a global network of interconnected
computers and devices. It serves as the physical
infrastructure (wires, routers, satellites) that allows
computers to communicate and share data globally.
Saad Shah
o Key Point: The internet is the hardware (infrastructure)
that supports communica+on and data transfer.
• The World Wide Web (WWW):
o The WWW is a system of interlinked documents and
mul+media content that can be accessed via the internet.
These documents, or web pages, are wriQen in HTML
(Hypertext Markup Language) and can be viewed using a
web browser.
o Key Point: The WWW is the soNware (content) that is
accessed through the internet.
• Diagram:
Saad Shah
2. What is a Uniform Resource Locator (URL)?
• DefiniRon:
A Uniform Resource Locator (URL) is the address used to access
resources on the World Wide Web. It specifies the loca+on of a
web page or file on a web server and how it should be retrieved.
• Structure of a URL:
o Protocol: Specifies the method used to retrieve the
resource (e.g., hbp or hbps).
o Domain Name: The name of the website (e.g.,
example.com).
o Path: Specifies the loca+on of a specific page or resource
on the server (e.g., /about-us).
• Example:
In the URL hQps://www.example.com/page1,
o hQps is the protocol,
o www.example.com is the domain name,
o /page1 is the path to the specific page.
Saad Shah
communicate by transferring web pages.
o Purpose: HTTP defines how messages are formaQed and
transmiQed and how web servers and browsers should
respond to various commands (e.g., sending web pages,
images, etc.).
• HTTPS (Hypertext Transfer Protocol Secure):
o HTTPS is the secure version of HTTP. It encrypts the
communica+on between the browser and the web server
using SSL/TLS encryp+on to prevent unauthorized access.
o Purpose: Ensures that data sent over the internet is secure
from eavesdropping or tampering.
• Diagram:
Saad Shah
• Main Purpose of a Web Browser:
o The web browser’s primary job is to render HTML (the
code used to structure web pages) and display the content
in a readable format for users.
• FuncRons of a Web Browser:
1. Storing Bookmarks and Favorites:
§ Allows users to save links to web pages for easy
access later.
2. Recording User History:
§ Keeps a record of previously visited websites.
3. MulRple Tabs:
§ Enables users to browse several websites at once in
different tabs.
4. Storing Cookies:
§ Stores small data files that track user preferences
and login informa+on.
5. Providing NavigaRon Tools:
§ Includes tools like forward, back, refresh, and home
buQons.
6. Providing an Address Bar:
§ Allows users to enter URLs to visit specific web
pages.
5. How Web Pages Are Located, Retrieved, and Displayed
When a user enters a URL into the address bar, the following steps
Saad Shah
occur:
1. The Web Browser:
o The web browser sends a request to the domain specified
in the URL.
2. IP Address:
o The Domain Name System (DNS) translates the domain
name (e.g., example.com) into an IP address, which is the
numerical address of the web server.
3. DNS (Domain Name Server):
o DNS servers are responsible for conver+ng domain names
into IP addresses.
4. Web Server:
o The request is sent to the web server associated with the
IP address, which hosts the requested web page.
5. HTML and Response:
o The web server responds by sending the HTML document
of the requested page. The web browser then renders the
HTML into the user-readable web page format.
• Diagram:
Saad Shah
o The user requests a URL, the DNS translates the domain to
an IP, and the web server sends the requested HTML page.
6. Cookies: What They Are and How They Are Used
• DefiniRon of Cookies:
o Cookies are small data files stored on a user's device by
websites they visit. They track user preferences and login
details, allowing for a more personalized browsing
experience.
• Types of Cookies:
1. Session Cookies:
§ These are temporary cookies stored during a
browsing session and are deleted when the browser
is closed.
§ Use Case: Remembering items in an online shopping
cart.
2. Persistent Cookies:
§ These remain on the user's device even aNer the
session ends, un+l they expire or are deleted.
§ Use Case: Storing login details for automa+c login.
FuncRons of Cookies:
Saad Shah
•
Saad Shah
Digital currency is a form of currency that exists only in digital
form, rather than physical coins or notes. Transac+ons are
performed electronically over the internet.
• Examples:
o Bitcoin, Ethereum, Ripple.
• Uses:
o Digital currencies are used for buying goods and services,
transferring money, and inves+ng. They are decentralized,
meaning they are not controlled by a central bank or
government.
Saad Shah
4. Block Added to Chain: Once verified, the block is added to the
exis+ng chain of blocks, forming a blockchain.
Saad Shah
Topic: Cybersecurity
1. Cybersecurity Threats
• Cybersecurity threats aim to compromise data, disrupt services,
or gain unauthorized access to systems. Here are common
types:
• Brute-Force Aback:
• An aQacker tries many combina+ons of passwords un+l the
correct one is found.
• Data IntercepRon:
Saad Shah
• Data is captured and read during transmission between two
devices (man-in-the-middle aQack).
• Distributed Denial of Service (DDoS):
A network or website is overwhelmed with fake requests,
causing the service to crash.
• Hacking:
Gaining unauthorized access to a computer system.
• Malware:
Includes viruses, worms, Trojan horses, spyware, adware, and
ransomware, each designed to harm or exploit systems.
• Virus:
AQaches itself to programs and replicates.
• Worm:
Self-replicates and spreads across networks.
• Trojan Horse:
Disguises itself as legi+mate soNware.
• Spyware:
Secretly monitors user ac+vi+es.
• Adware:
Displays unwanted adver+sements.
• Ransomware:
Locks files un+l a ransom is paid.
• Pharming:
Redirec+ng users from a legi+mate website to a fraudulent one
Saad Shah
to steal personal informa+on.
• Phishing:
Fraudulent emails or messages trick users into providing
personal informa+on.
• Social Engineering:
Manipula+ng people into divulging confiden+al informa+on.
Saad Shah
o
Saad Shah
Technical Vocabulary
• Internet: The global network of
interconnected devices.
• World Wide Web (WWW): System of
interlinked documents accessible over the
internet.
• Uniform Resource Locator (URL): The address
Saad Shah
of a resource on the web.
• HTTP/HTTPS: Protocols used for transferring
data over the web (secure and non-secure).
• DNS: Translates domain names into IP
addresses.
• Blockchain: A decentralized ledger used for
tracking transacAons in cryptocurrencies.
• Brute-Force AKack: A method of trial-and-
error used to crack passwords.
• Phishing: A fraudulent aCempt to steal
sensiAve informaAon.
• Firewall: A system that monitors and controls
incoming and outgoing network traffic.
• SSL (Secure Socket Layer): A security protocol
for encrypAng data over the internet.
Saad Shah
Exam Style Ques.ons
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Chapter: Hardware
Topic: Computer Architecture
1. Role of the Central Processing Unit (CPU)
What is a CPU?
• The CPU (Central Processing Unit) is often referred to as the "brain" of
Saad Shah
o Execute: Perform the required action, such as calculation or data
transfer.
What is a Microprocessor?
• A microprocessor is an integrated circuit that contains the core
calculations.
§ Program Counter (PC): Holds the address of the next
instruction.
§ Memory Address Register (MAR): Holds the address of the
memory location to read/write.
§ Memory Data Register (MDR): Temporarily holds data being
read from or written to memory.
Saad Shah
3. The Fetch-Decode-Execute Cycle
Fetch:
• The Program Counter (PC) holds the memory address of the next
instruction to be executed.
• This address is sent to the Memory Address Register (MAR).
• The instruction is fetched from memory and stored in the Memory Data
Register (MDR).
Decode:
• The instruction in the MDR is passed to the Control Unit (CU).
(arithmetic or logical).
• The result is stored in a register (such as the Accumulator or another
register), and the PC is updated to the address of the next instruction.
4. Core, Cache, and Clock in a CPU
Core:
• A core is an independent processing unit within the CPU. A multi-core CPU
has multiple cores, which allows it to perform several tasks
simultaneously (parallel processing).
o Effect on performance: More cores enable the CPU to handle more
tasks at the same time, improving multitasking and overall speed.
Cache:
• Cache is a small, high-speed memory located close to the CPU. It stores
Saad Shah
access data from main memory, thus speeding up processing.
Clock Speed:
• The clock speed of a CPU determines how many cycles per second the CPU
medical devices.
Characteristics of Embedded Systems:
• Dedicated Functionality: Performs a single, specific task.
Saad Shah
frame.
• Low Power Consumption: Optimized for energy efficiency.
external environment.
Output Device:
• Definition: A device that allows data to be communicated from the
computer to the user or another device.
• Examples: Monitor, printer, speakers.
output.
8. Sensors
What is a Sensor?
• A sensor is a device that detects and measures physical properties (e.g.,
Saad Shah
• Motion Sensor: Detects movement (e.g., used in security systems).
Choosing the Right Sensor:
• Sensors are selected based on the specific task at hand. For example, a
temperature sensor is ideal for monitoring the climate in a greenhouse,
while a motion sensor might be used in automatic doors.
and includes:
o RAM (Random Access Memory): Temporarily holds data and
Saad Shah
• Operation: Data is read and written using a magnetic head that moves
across the disk surface.
Optical Storage:
• Definition: Uses lasers to read and write data on optical disks.
• Operation: Data is stored in the form of tiny pits and lands on the disk
surface, which a laser reads.
Solid-State Storage (Flash Memory):
• Definition: Uses non-volatile memory chips to store data.
• Examples: Solid-State Drives (SSD), USB flash drives.
• Operation: Data is stored in flash memory cells, and since there are no
moving parts, it's faster and more durable than magnetic storage.
were RAM when the actual RAM is full. It extends the apparent size of the
memory available to programs.
• How it's Created and Used: When the physical RAM is full, less-used data
is transferred to virtual memory (on the hard drive or SSD), freeing up
space in the RAM for active programs.
• Why It's Necessary: It allows a system to run more applications
simultaneously than it has physical memory for, though at a cost to
speed since accessing data from the hard drive is slower than from RAM.
Saad Shah
Advantages:
• Accessibility: Data can be accessed from any device connected to the
internet.
• Backup: Provides an additional backup of data in case local storage fails.
Disadvantages:
• Security Risks: Data is stored off-site, which might raise concerns about
Saad Shah
15. Internet Protocol (IP) Address
Definition:
• An IP address is a unique number assigned to each device connected to a
network using the Internet Protocol for communication.
Purpose:
• It identifies devices on a network and enables communication between
them.
Types of IP Addresses:
• IPv4: 32-bit address (e.g., 192.168.1.1).
Saad Shah
• Microprocessor: Small chip containing a CPU, commonly
used in embedded systems.
• Von Neumann Architecture: Common computer design with
shared memory for instructions and data.
• Core, Cache, and Clock: Impact the performance of the
CPU; more cores, larger cache, and higher clock speed
improve efficiency.
• Instruction Set: The collection of commands a CPU can
execute.
• Embedded Systems: Dedicated systems within devices like
microwaves and washing machines.
• Primary Storage (RAM/ROM): Fast, volatile memory
directly accessible by the CPU.
• Secondary Storage (HDD/SSD): Non-volatile storage for
long-term data.
• Cloud Storage: Remote storage accessed via the internet.
• NIC: Allows computers to connect to networks.
• MAC Address: Unique hardware identifier for a NIC.
• IP Address: Identifies devices on a network, either IPv4 or
IPv6.
• Router: Manages data traffic between networks.
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Chapter: The internet and its uses
Topic: The internet and the world wide web
1. Difference Between the Internet and the World Wide Web
• The Internet:
o The internet is a global network of interconnected computers and
Saad Shah
supports communication and data transfer.
• The World Wide Web (WWW):
o The WWW is a system of interlinked documents and multimedia
content that can be accessed via the internet. These documents,
or web pages, are written in HTML (Hypertext Markup Language)
and can be viewed using a web browser.
o Key Point: The WWW is the software (content) that is accessed
through the internet.
• Diagram:
o The internet is the underlying network, while the WWW is the system
of content hosted on servers.
2. What is a Uniform Resource Locator (URL)?
• Definition:
A Uniform Resource Locator (URL) is the address used to access
resources on the World Wide Web. It specifies the location of a web page
or file on a web server and how it should be retrieved.
• Structure of a URL:
o Protocol: Specifies the method used to retrieve the resource (e.g.,
http or https).
o Domain Name: The name of the website (e.g., example.com).
o Path: Specifies the location of a specific page or resource on the
server (e.g., /about-us).
Saad Shah
• Example:
In the URL https://www.example.com/page1,
o https is the protocol,
o www.example.com is the domain name,
o /page1 is the path to the specific page.
Saad Shah
4. Purpose and Functions of a Web Browser
• Main Purpose of a Web Browser:
o The web browser's primary job is to render HTML (the code used to
later.
2. Recording User History:
§ Keeps a record of previously visited websites.
3. Multiple Tabs:
§ Enables users to browse several websites at once in
different tabs.
4. Storing Cookies:
§ Stores small data files that track user preferences and login
information.
5. Providing Navigation Tools:
§ Includes tools like forward, back, refresh, and home buttons.
Saad Shah
o DNS servers are responsible for converting domain names into IP
addresses.
4. Web Server:
o The request is sent to the web server associated with the IP
requested page. The web browser then renders the HTML into the
user-readable web page format.
• Diagram:
o The user requests a URL, the DNS translates the domain to an IP,
and the web server sends the requested HTML page.
6. Cookies: What They Are and How They Are Used
• Definition of Cookies:
o Cookies are small data files stored on a user's device by websites
they visit. They track user preferences and login details, allowing
for a more personalized browsing experience.
• Types of Cookies:
1. Session Cookies:
§ These are temporary cookies stored during a browsing
2. Persistent Cookies:
§ These remain on the user's device even after the session
Saad Shah
ends, until they expire or are deleted.
§ Use Case: Storing login details for automatic login.
• Functions of Cookies:
o Saving Personal Details: E.g., storing a user's language
preferences.
o Tracking User Preferences: E.g., tracking website preferences or
search history.
o Holding Items in Shopping Carts: Cookies store data about
selected items even if the user navigates away from the page.
o Storing Login Details: Remembering usernames and passwords for
future logins.
Topic: Digital Currency
1. What is Digital Currency and How is It Used?
• Definition:
Digital currency is a form of currency that exists only in digital form,
rather than physical coins or notes. Transactions are performed
electronically over the internet.
• Examples:
o Bitcoin, Ethereum, Ripple.
• Uses:
o Digital currencies are used for buying goods and services,
Saad Shah
2. Blockchain and Digital Currency Transactions
• Blockchain:
o A blockchain is a distributed, decentralized ledger that records all
Saad Shah
Topic: Cybersecurity
1. Cybersecurity Threats
• Cybersecurity threats aim to compromise data, disrupt services, or gain
unauthorized access to systems. Here are common types:
• Brute-Force Attack:
• An attacker tries many combinations of passwords until the correct one
is found.
• Data Interception:
• Data is captured and read during transmission between two devices
(man-in-the-middle attack).
• Distributed Denial of Service (DDoS):
Saad Shah
A network or website is overwhelmed with fake requests, causing the
service to crash.
• Hacking:
Gaining unauthorized access to a computer system.
• Malware:
Includes viruses, worms, Trojan horses, spyware, adware, and
ransomware, each designed to harm or exploit systems.
• Virus:
Attaches itself to programs and replicates.
• Worm:
Self-replicates and spreads across networks.
• Trojan Horse:
Disguises itself as legitimate software.
• Spyware:
Secretly monitors user activities.
• Adware:
Displays unwanted advertisements.
• Ransomware:
Locks files until a ransom is paid.
• Pharming:
Redirecting users from a legitimate website to a fraudulent one to steal
personal information.
• Phishing:
Fraudulent emails or messages trick users into providing personal
information.
• Social Engineering:
Manipulating people into divulging confidential information.
Saad Shah
that only authorized personnel can view or modify sensitive
information.
2. Anti-Malware Software:
o Anti-virus and anti-spyware programs detect and remove
malicious software.
3. Authentication:
o Username and Password: Basic form of authentication.
o Biometrics: Uses fingerprints or facial recognition for secure
authentication.
o Two-Step Verification: Requires two forms of identification,
Saad Shah
Technical Vocabulary
• Internet: The global network of interconnected
devices.
• World Wide Web (WWW): System of interlinked
documents accessible over the internet.
• Uniform Resource Locator (URL): The address of a
resource on the web.
• HTTP/HTTPS: Protocols used for transferring data
Saad Shah
over the web (secure and non-secure).
• DNS: Translates domain names into IP addresses.
• Blockchain: A decentralized ledger used for tracking
transactions in cryptocurrencies.
• Brute-Force Attack: A method of trial-and-error
used to crack passwords.
• Phishing: A fraudulent attempt to steal sensitive
information.
• Firewall: A system that monitors and controls
incoming and outgoing network traffic.
• SSL (Secure Socket Layer): A security protocol for
encrypting data over the internet.
Exam Style Questions
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Chapter: Introduction of Boolean
Logic
Topic: Logic Gates and Circuits
1. Identify and Use the Standard Symbols for Logic Gates
• Logic Gates:
Logic gates are building blocks of digital circuits. They perform basic
logical functions based on binary inputs (0 or 1) and produce a binary
output.
• Standard Symbols: Below are the standard symbols used for logic gates,
Saad Shah
each representing a specific Boolean function:
Input: 1, Output: 0.
Saad Shah
o
AND Gate:
• Symbol:
• Function: Produces a 1 output only when both inputs are 1.
• Truth Table:
A B Output
0 0 0
0 1 0
1 0 0
1 1 1
OR Gate:
• Symbol:
• Function: Produces a 1 output if at least one input is 1.
• Truth Table:
A B Output
0 0 0
0 1 1
1 0 1
1 1 1
Saad Shah
NAND Gate:
• Symbol:
• Function: Produces a 1 output unless both inputs are 1 (the opposite of
AND).
• Truth Table:
A B Output
0 0 1
0 1 1
1 0 1
1 1 0
NOR Gate:
• Symbol:
• Function: Produces a 1 output only when both inputs are 0 (the opposite
of OR).
• Truth Table:
A B Output
0 0 1
0 1 0
1 0 0
1 1 0
Saad Shah
• Symbol:
• Function: Produces a 1 output if exactly one input is 1, but not both.
• Truth Table:
A B Output
0 0 0
0 1 1
1 0 1
1 1 0
Saad Shah
and input A, B.
o Diagram:
1 0 1
1 1 0
(b) Complete a Truth Table from a Problem Statement, Logic Expression,
or Logic Circuit
1. From a Problem Statement:
o Example:
0 1 0
1 0 0
Saad Shah
1 1 1
1 0 1 1 1
1 1 1 0 0
3. From a Logic Circuit:
o Example:
A B NOT B A OR (NOT B)
0 0 1 1
0 1 0 0
1 0 1 1
Saad Shah
1 1 0 1
1 1 0
o Solution:
Saad Shah
The logic expression is:
X = A AND (NOT B)
Chapter: Databases
Topic: Tables, Fields, Records, MS Access
1. Define a Single-Table Database
What is a Single-Table Database?
• A single-table database is a database that stores data in a single table,
where each row represents a record, and each column represents a field.
It is commonly used to store simple, related data that doesn't require
multiple tables.
• Components of a Single-Table Database:
Saad Shah
1. Fields (Columns):
§ A field is a column in a table that stores a specific attribute
of the data. Each field has a name and a data type.
§ Example Fields:
2. Records (Rows):
§ A record is a row in the table, representing a single instance
of data. Each record contains values for each field.
§ Example Record:
§ John Smith, 25, Male, john@example.com, P 001.
3. Validation:
§ Validation ensures that the data entered into the database
is correct and conforms to specific rules.
§ Common validation techniques include:
§ Range checks: Ensuring that a value falls within a
Saad Shah
2. Character:
o Definition: A single letter, number, or symbol.
3. Boolean:
o Definition: A data type that has only two possible values: TRUE or
FALSE.
o Example: "TRUE" (yes) or "FALSE" (no).
4. Integer:
o Definition: A whole number without decimal places, used for
numeric values.
o Example: 25, 100, -7.
5. Real (Floating Point):
o Definition: A number that includes decimal places, used when
precision is required.
o Example: 19.99, -5.67.
6. Date/Time:
o Definition: Stores dates and times in various formats.
o Example: "2024-09-11," "12:30 PM."
3. Purpose of a Primary Key
What is a Primary Key?
• A primary key is a field (or combination of fields) in a database table
that uniquely identifies each record. Every record must have a unique
primary key value, and it cannot be NULL.
Saad Shah
• StudentID in a student database where each student has a unique
o Syntax:
3. WHERE:
o Filters records that meet a specific condition.
o Syntax:
SELECT field FROM table_name WHERE condition;
o Example:
Saad Shah
SELECT Name FROM Students WHERE Age > 18;
o This query selects students whose Age is greater than 18.
4. ORDER BY (ASC/DESC):
o Sorts the result set in ascending (ASC) or descending (DESC)
order.
o Syntax:
o Syntax:
o Syntax:
Saad Shah
o Example:
SELECT Name FROM Employees WHERE Age > 30 AND Department =
'HR';
o This query selects employees who are older than 30 and work in the
HR department.
Bob 22
Charlie 20
2. Example Query with SUM:
SELECT SUM(Salary) FROM Employees WHERE Department = 'Sales';
o Explanation:
§ This query calculates the total Salary of employees working
o Example Output:
§ 55000
Saad Shah
§ This query counts how many employees are older than 40.
o Example Output:
§ 5
ProductName
Laptop
Smartphone
2. SQL Query (ORDER BY):
SELECT CustomerName FROM Customers ORDER BY PurchaseDate DESC;
o Explanation: This query retrieves the names of customers and
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Chapter: Software
1. Difference Between System Software and Application Software
System Software:
• Definition: System software is software designed to manage and control
the hardware components of a computer so that application software
can run. It acts as a bridge between the hardware and the user or
application software.
• Examples:
to run.
o Utility Software: Helps maintain the system (e.g., antivirus
Saad Shah
software, disk defragmenters).
o Device Drivers: Enable communication between hardware and the OS
(e.g., printer driver, graphics driver).
Application Software:
• Definition: Application software is designed to perform specific tasks
for the user. These tasks can be general-purpose, like writing a document,
or specialized, like editing a video.
• Examples:
o Word Processing Software: For creating documents.
o Web Browsers: For browsing the internet.
Saad Shah
giving the appearance that they run simultaneously.
3. File Management:
o Provides a way to create, delete, read, and write files on storage
Saad Shah
the first instructions for the OS during the boot process.
Operating System (OS):
• The OS acts as a middle layer between the hardware and application
software. Once the firmware initializes the hardware, the OS takes over
to manage resources and allow applications to run.
Application Software:
• To run applications like web browsers or word processors, the OS
allocates necessary resources (like memory and CPU time) and provides
access to hardware devices (e.g., display screens, printers).
4. Role and Operation of Interrupts
What is an Interrupt?
• An interrupt is a signal that is sent to the CPU from hardware or
Saad Shah
• Pressing a key on the keyboard triggers a hardware interrupt. The CPU
stops its current task, processes the keypress, and then resumes the
original task.
Saad Shah
o Fast Execution: Low-level programs are faster because they are
to the AX register).
Role of an Assembler:
• An assembler is a program that translates assembly language into
machine code (binary code), which the CPU can execute directly.
• Why Use Assembly Language?
o Assembly language is easier to understand than machine code and
Saad Shah
an executable file.
• How It Works:
o The program is written in a high-level language.
o The interpreter reads each line, translates it, and executes it.
o If there is an error, the program stops, and the error is reported
immediately.
Error Reporting:
• Compiler: Errors are reported after the entire program has been
compiled. You need to fix all errors before running the program.
• Interpreter: Errors are reported line-by-line as the program is executed,
machine code.
o The executable file can be distributed without sharing the source
code.
• Disadvantages:
Saad Shah
• Advantages:
code line-by-line.
• Disadvantages:
o Slower execution because the code is translated each time it runs.
Programmers can set breakpoints and step through their code line-
by-line.
4. Error Highlighting:
o The IDE can detect syntax errors as you write code and highlight
them, helping programmers correct mistakes before running the
program.
5. Build Automation:
o The IDE automates the process of compiling, linking, and packaging
Saad Shah
code into an executable file.
Summary of Key Terms
• System Software: Manages the hardware and allows
application software to run.
• Application Software: Programs that perform specific
tasks for users.
• Operating System (OS): Manages hardware and software
resources.
• Interrupts: Signals that require immediate attention from
the CPU.
• High-Level Languages: Easy to write, abstracted from
Saad Shah
machine code, but slower to execute.
• Low-Level Languages: Harder to write but offer direct
control over hardware and faster execution.
• Assembler: Converts assembly language into machine code.
• Compiler: Translates the entire program into machine code
at once.
• Interpreter: Translates and executes code line-by-line.
• IDE: A tool for writing, debugging, and managing code.
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Chapter: Automated and Emerging
Technologies
Topic: Automated Systems
1. How Sensors, Microprocessors, and Actuators Collaborate in Automated
Systems
Automated systems are designed to perform tasks with minimal or no human
intervention. They rely on a combination of sensors, microprocessors, and
actuators to function.
1. Sensors
Saad Shah
• Definition:
Sensors are devices that detect and measure physical properties from
the environment (e.g., temperature, light, motion) and convert them into
data that a microprocessor can process.
• Common Types of Sensors:
• Example:
o A light sensor detects the brightness level of a room, and based
• Example:
o The microprocessor in a smart thermostat receives input from a
Saad Shah
from the microprocessor. They convert electrical signals into physical
movement or force.
• Types of Actuators:
o Motors: Control mechanical movement.
• Example:
o An actuator in an automatic door system receives a command
detects movement).
2. Microprocessor Processes:
o The microprocessor receives the data from the sensor, processes
Saad Shah
threshold, it decides to turn the lights on.
3. Actuator:
Receives the signal from the microprocessor and switches on the lights.
Saad Shah
• Accuracy and Precision: Automation reduces human error and ensures
consistency in production.
• Cost Savings: Over time, automated systems can reduce labor costs.
Disadvantages:
• High Initial Costs: Installing automated systems can be expensive due to
the cost of equipment and setup.
• Job Losses: Automation can replace human workers, leading to
unemployment.
• Maintenance Needs: Automated systems require regular maintenance and
updates to function efficiently.
accidents.
• High Development Costs: The technology for autonomous vehicles is
expensive and still being developed.
• Legal and Ethical Concerns: Questions arise over who is responsible in
Saad Shah
monitor soil moisture and only water when necessary, reducing water
waste.
• Increased Efficiency: Automated systems ensure crops receive the right
workers.
Disadvantages:
• Initial Setup Costs: The cost of installing automated irrigation systems
Saad Shah
to players' actions, making games more challenging and interactive.
• Customizable Difficulty Levels: AI systems can adjust the difficulty of a
game in real-time based on the player's skill level.
• Enhanced Realism: Automated systems create more realistic behavior for
non-player characters (NPCs), improving immersion.
Disadvantages:
• High Development Costs: Creating AI and automation systems for games
Saad Shah
• Privacy Concerns: Automated lighting systems may store usage data,
raising concerns over privacy.
experiments and data collection with high precision, reducing human error.
• Increased Efficiency: Automated systems can carry out experiments
Saad Shah
• Actuator: A device that converts electrical signals into
physical actions, such as movement or force.
• Algorithm: A set of instructions or rules that a
microprocessor follows to process data.
• Calibration: The process of adjusting a sensor or system
to ensure accurate measurements.
Chapter: Automated and Emerging
Technologies
Topic: Robotics
1. What is Robotics?
Definition:
• Robotics is a branch of computer science and engineering that involves
Saad Shah
• Robots are programmable machines that can perform tasks traditionally
2. Characteristics of a Robot
Robots generally have the following key characteristics that enable them to
perform specific tasks:
1. Mechanical Structure or Framework:
• Definition:
The mechanical structure is the physical form or body of the robot,
which enables it to perform movements or tasks. This structure is usually
made of materials like metal or plastic, designed to fit the purpose of the
robot.
• Example:
o A robotic arm used in manufacturing may have a jointed mechanical
Saad Shah
• Sensors:
o Definition: Devices that collect data from the environment and
avoid collisions.
• Microprocessors:
Saad Shah
3. Roles and Applications of Robots
Robots are increasingly being used in many areas of society due to their ability
to operate autonomously, reduce human error, and work in hazardous or
repetitive conditions.
Common Roles Robots Perform and Their Applications:
1. Industry:
o Example:
plants).
o Disadvantages:
§ High initial cost for setting up robotic systems.
§ Potential for job loss as robots replace human workers in
certain roles.
2. Transport:
• Example:
easily reach.
• Disadvantages:
o Legal and ethical concerns, especially in case of accidents involving
autonomous vehicles.
o Expensive technology and infrastructure requirements.
Saad Shah
3. Agriculture:
• Example:
• Disadvantages:
o High cost of purchasing and maintaining robotic equipment.
4. Medicine:
• Example:
5. Domestic Settings:
• Example:
o Robots are being used in homes to perform daily tasks, such as
robotic vacuum cleaners (e.g., Roomba) or smart home
assistants (e.g., Amazon Alexa, Google Home) that can control
home appliances.
Saad Shah
• Advantages:
o Convenience in performing repetitive household tasks.
• Disadvantages:
o High purchase cost for advanced robots.
6. Entertainment:
• Example:
• Disadvantages:
o High development and production costs.
unpredictable interactions.
Advantages and Disadvantages of Robots in General:
Advantages:
1. Efficiency and Productivity:
Robots can work 24/7 without breaks, increasing productivity and
reducing downtime.
2. Precision and Accuracy:
Robots can perform tasks with a high degree of accuracy, minimizing
human error and improving quality control.
3. Dangerous or Hazardous Work:
Robots can work in environments that are too dangerous for humans,
such as handling toxic materials, deep-sea exploration, or space missions.
4. Cost Savings (Long-Term):
Saad Shah
Although robots are expensive to implement initially, they can save costs
in the long run by reducing the need for human labor and minimizing
errors.
Disadvantages:
1. High Initial Costs:
The cost of designing, building, and programming robots can be very high,
making them less accessible for small businesses or individuals.
2. Job Displacement:
Robots can replace human workers in certain industries, leading to
unemployment in sectors like manufacturing or logistics.
3. Limited Flexibility:
Robots are typically programmed for specific tasks. Changing the task
requires reprogramming or redesigning the robot, which can be time-
consuming and expensive.
4. Maintenance and Repairs:
Robots require regular maintenance to ensure they function correctly.
Repairs can be costly and time-consuming, especially for highly specialized
robots.
Technical Vocabulary for Robotics
• Robotics: A branch of computer science and engineering
focused on the design, construction, and operation of
robots.
• Robot: A programmable machine capable of performing
tasks autonomously or semi-autonomously.
• Sensor: A device that collects data from the environment
and sends it to the robot's processor.
• Microprocessor: The central processing unit of a robot
that processes data and makes decisions.
Saad Shah
• Actuator: A device that converts electrical signals into
physical actions, such as movement.
• Programmable: Refers to a robot's ability to follow coded
instructions to perform specific tasks.
• Autonomous: The ability of a robot to perform tasks
without human intervention.
Chapter: Automated and Emerging
Technologies
Topic: Artificial Intelligence (AI)
1. What is Artificial Intelligence (AI)?
Definition:
• Artificial Intelligence (AI) refers to the simulation of human
Saad Shah
• Key Characteristics of AI:
o AI can analyze data, reason based on that data, and sometimes
1. Data Collection:
• Definition:
AI systems need data to function. They collect large amounts of data
from various sources, such as sensors, user inputs, or databases.
• Example:
A self-driving car collects data using cameras and sensors to detect
objects and navigate its environment.
2. Rules for Using Data:
• Definition:
AI systems follow specific rules or algorithms to process the data they
collect and make decisions.
• Example:
In a spam email filter, the AI system has rules that classify an email as
"spam" or "not spam" based on certain keywords or patterns.
3. Ability to Reason:
• Definition:
AI systems can make decisions based on the data they process. This
involves reasoning, which is the ability to analyze information, draw
conclusions, and make decisions based on certain rules or patterns.
• Example:
Saad Shah
A medical diagnosis AI might analyze symptoms and patient data to
determine possible conditions based on its knowledge of diseases and
treatments.
4. Ability to Learn and Adapt:
• Definition:
Some AI systems have the ability to learn from experience and adapt
their behavior based on new data. This is a key feature of machine
learning.
• Example:
A recommender system (like the one used by Netflix or Amazon) can learn
user preferences over time and adapt by suggesting more personalized
content.
A. Expert Systems
Definition:
• An expert system is a computer program that simulates the decision-
making ability of a human expert. It uses a knowledge base and a set of
rules to make decisions or solve problems.
Saad Shah
• Definition:
The rule base contains a set of rules or conditions that define how
the knowledge is applied. These rules are often in the form of if-
then statements.
• Example:
o Rule:
Saad Shah
2. Processing:
The inference engine applies the rules from the rule base to the data in
the knowledge base.
3. Output:
The system provides a conclusion or recommendation (e.g., the most likely
diagnosis based on the input data).
• Diagram:
B. Machine Learning
Definition:
• Machine learning is a type of AI where a system is able to automatically
adapt its processes and improve its performance by learning from data.
Instead of following predefined rules, machine learning systems can
modify their behavior based on the data they analyze.
Types of Machine Learning:
1. Supervised Learning:
o Definition:
Saad Shah
o Example:
Saad Shah
2. Algorithms:
• Definition:
3. Model:
• Definition:
The model is the output of the learning process. It represents the
system's understanding of the data and is used to make future
predictions.
• Example:
After training, a machine learning model might be able to predict
house prices based on features like square footage, number of
bedrooms, and location.
Operation of a Machine Learning System:
1. Training:
The system is trained on a large dataset (e.g., images of animals). The
model learns from this data and adjusts its parameters.
2. Testing:
The system is tested on new, unseen data to evaluate how well it
performs.
3. Prediction:
Once trained, the system can make predictions on new data (e.g.,
correctly identifying an image of a cat based on what it learned during
training).
4. Comparison: Expert Systems vs. Machine Learning
Saad Shah
Feature Expert System Machine Learning
Basis Knowledge base, rule base,
inference engine
Learns from data, no fixed rule
base
Data Uses
data
predefined rules to process Learns and adapts from large
datasets
Learning Does not learn or adapt Learns from data, improves over
time
Example Medical diagnosis system Self-driving cars, image
recognition
Technical Vocabulary for AI Systems
• Artificial Intelligence (AI): The simulation of human
intelligence by machines, capable of learning, reasoning, and
problem-solving.
• Data Collection: The process by which AI systems gather
data from various sources to function.
• Rule Base: A set of rules used in expert systems to make
decisions based on input data.
• Knowledge Base: A database of information used by expert
systems to reason and make decisions.
Saad Shah
• Inference Engine: The part of an expert system that
applies rules from the rule base to the knowledge base to
draw conclusions.
• Machine Learning: A branch of AI where machines can learn
from data and improve their performance over time.
• Supervised Learning: A type of machine learning where the
model is trained on labeled data.
• Unsupervised Learning: A type of machine learning where
the model learns from data without labels.
• Reinforcement Learning: A type of machine learning where
the model learns from interacting with its environment and
receiving feedback.
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah
Saad Shah