0% found this document useful (0 votes)
14 views19 pages

Remember_Computer_Science_ (1)

The document provides an overview of software and hardware concepts, including types of software (system and application), the role of operating systems, and the function of drivers and firmware. It explains the importance of interrupts, high and low-level programming languages, and the differences between interpreters and compilers. Additionally, it covers internet technologies, cybersecurity threats, malware types, and methods for data protection, alongside a detailed explanation of CPU components and the fetch-decode-execute cycle.

Uploaded by

aura.arshia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views19 pages

Remember_Computer_Science_ (1)

The document provides an overview of software and hardware concepts, including types of software (system and application), the role of operating systems, and the function of drivers and firmware. It explains the importance of interrupts, high and low-level programming languages, and the differences between interpreters and compilers. Additionally, it covers internet technologies, cybersecurity threats, malware types, and methods for data protection, alongside a detailed explanation of CPU components and the fetch-decode-execute cycle.

Uploaded by

aura.arshia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Hey there, I’ve arranged the topics in such a way that helps you to finish your revision as quickly

as possible :)

Software
A software is a set of instructions written in a programming language that performs a certain task in the computer.

System software provides the services that the computer requires:


Eg: Operating System, and Utility Software.
Application software provides the services that the user requires for day to day activities:
Eg: Word Processor and Calculator.

Task of an operating system: m(fimpmu), p(psu)

It performs the basic operations of a computer


It manages the hardware and provides a platform for the software to run.

Managing Provides
●​ Files and directories ●​ Platform for the OS to run
●​ Interrupts ●​ System Security
●​ Memory ●​ User Interface
●​ Peripherals & drivers
●​ Multi-tasking
●​ User Accounts

Driver: Software that is required for the communication between two devices which are externally
connected, which translates code from one device to another.

A firmware is a program that provides low level control for devices. For example: Bootloader.
●​ Stores instruction required for bootup
●​ Provides a platform for the OS to load.

Hardware Interrupt Software Interrupt

●​ Key being pressed on the keyboard ●​ Division by Zero


●​ Moving the mouse ●​ When Two processes are trying to access
●​ Hardware Failure the same memory location
●​ Input Required

Interrupt is a signal sent to the computer’s CPU asking for its attention.

Interrupts have their priority level.


They are organized in a priority queue by the CPU’s interrupt handler based on their importance.

Interrupt Service Routine retrieves the interrupt and performs necessary actions to resolve it.

After the current FDE cycle finishes, the CPU checks the interrupt queue.

If an interrupt is found with a higher priority level than the current process then:
●​ The current process is stored.
●​ The source of the interrupt is found
●​ An appropriate Interrupt Service Routine is called to handle the interrupt.

1
After the interrupt is handled, the CPU then once again checks for interrupts with high priority. If none, the current process is
loaded.

High Level Languages: Close to the human language which is


Low Level Languages: Close to the language processed by computers which may use mnemonics

High Level Language (MLEND) Low Level Language

●​ Easier to Read & Debug ●​ Hard to Read & Debug


●​ Less memory efficient, thus slower execution ●​ More memory efficient thus faster execution
●​ Machine Independent, code can run on any ●​ Machine Dependent, code only runs on a specific
computer computer
●​ Needs to be translated to low level language first, ●​ Needs to be translated to machine code before
thus more time consuming execution, thus less time consuming.
●​ Doesn’t allow direct manipulation of the hardware. ●​ Allows direct manipulation of the hardwar

●​ May use mnemonics.

Assembly Language uses mnemonics and requires assembler to translate it to machine code.

Assemblers translates assembly language to machine language


●​ By creating an executable file
●​ If any errors are found
●​ It will create an error report by displaying it on the screen
●​ Without producing an executable file.

Interpreter Compiler

●​ Translate high level language into machine code. ●​ Translate high level language into machine code
●​ It translates the code line by line ●​ It translates the entire code all in one go

●​ It stops if any error is found ●​ Creates an executable file.


●​ Will only continue when the error is fixed ●​ Creates an error report for the entire code.

●​ Code needs to be run every single time. ●​ Code needs to be compiled only once.
●​ Which requires an interpreter software to run. ●​ Doesn’t require a compiler to run the code.

Integrated Development Environment (IDE) is a software that allows users to write, edit and execute code.
●​ Purpose: To translate the code to low level language

IDE’s features include (CEAP)


●​ Compiler and Interpreter
●​ Auto-completion and Autocorrect
●​ Error Diagnostics
●​ Pretty Print with color codes keywords.

Internet and Its uses


The Internet is a collection of interconnected networks.
The World Wide Web is the collection of websites and web pages.

A web browser is a software that allows users to: Functions (SPRUM)

2
●​ Access Web pages ●​ Save Bookmarks & Store Cookies
●​ Render HTML & display it to the user ●​ Provides address bar and navigation tools
●​ Render HTML
●​ User History
●​ Multiple Tabs

Web Servers: A web server is a remote computer that stores the files needed to display a web page on the
Internet.

URL is a text based address that is used to uniquely identify a webpage on the internet.
Format: protocol://[domain host].[domain name].[domain type]/[path]/[filename]/

How are web pages loaded?

●​ The user types the URL in the address bar.


●​ The web browser sends the URL to the DNS.
●​ The DNS stores the index of the URL and searches for its IP
address.
○​ IP address is sent back to the browser (If found)
○​ Sends a request to another DNS to look up for the URL (If not
found)
●​ The browser sends a request to the IP of the web server requesting
for its web pages
●​ The web server sends the webpages to the browser and renders it
by displaying it to the user.

HTTPS is a protocol which is the secure version of HTTP.


It involves the usage of SSL/TLS, which means the data is encrypted when sent over the network.

To ensure the communication is secure , HTTPS kicks in.


●​ Before the web pages are loaded, the browser sends a request to the web server asking for its digital
certificates which contain a public key that is used by the browser to authenticate the website.
●​ If the digital certificate is authentic, then the browser establishes a secure connection where
communication can take place

Cookies are small text files sent by a website to the user’s browser, to remember the user's preferences every time they
visit the website.

Stores information such: (STH)


●​ Saving personal information & login details
●​ Tracking user’s browsing activity and preferences
●​ Holds items in online shopping cart

Session Cookie Persistent Cookie

Stored temporarily in the primary memory Stored permanently in the secondary memory
Will be deleted as soon as the browser is closed. Will be deleted if the user deletes it or expires

Digital currency is a type of currency that exists in a digital form.


●​ Only exists electronically
●​ Can be a decentralised / centralised system
●​ Usually encrypted

3
Cryptocurrency is a form of digital currency that uses decentralized computers to monitor transactions (No
government intervention)

Block chain is a digital ledger which is a time-stamped series of records that cannot be altered.
●​ It is secure because every participant in the network has a copy of the transaction that can be verified.

Block chains are made up of blocks that are linked together in


a chain. It contains:
●​ The unique hash for the current block
●​ Data about the sender, receiver and the amount of money.
●​ The unique hash for the previous block

Blockchain requires a proof-of-work that requires 10 minutes,


before the block is added to the chain.
●​ To prevent fraudulent activities
●​ To maintain decentralization to ensure no single entity is
controlling the block chain.

Type of attack Purpose Protection

Brute Force The perpetrator tries multiple combinations of passwords 2-factor authentication.
until it finds the correct one to gain unauthorized access to Use stronger passwords that contains
their accounts. symbols and numbers

This can be carried out using a software that automatically


does it.

Data The perpetrator uses a packet sniffer to collect data that is Use WEP encryption protocol & firewalls.
Interception & being sent on the network through a router to compromise the Avoid using public wifi.
Theft user’s login details to gain unauthorized access.

DDoS attack The perpetrator spreads malware to infect as many Use a proxy server
computers as possible to turn them into botnets to repeatedly Use anti malware software
spam traffic to web servers, potentially crashing them and
preventing users from accessing it.

Signs of DDoS attack:


●​ Slow network performance
●​ Unable to access certain websites
●​ Large amount of spam emails

Hacking The perpetrator hacks user’s devices or accounts to gain 2-factor authentication
unauthorized access to their data without their consent. Use stronger passwords that contains
symbols and numbers
Biometrics

Phishing The perpetrator sends legitimate looking emails to users Avoid clicking any unwanted links
requiring them to follow a link to a fake website.
Ensure the website is genuine by
Pharming The perpetrator causes the user to install a malware that checking its URL
redirects users to fake websites.

Both phishing and pharming are used to trick users into giving their sensitive information to compromise their data

4
All the malware mentioned requires two basic things: Anti Malware Software & Firewall
Type of Malware Purpose Prevention

Virus A malware that can self-replicate with the intention Avoid downloading third-party
of corrupting and deleting user’s files, by causing softwares from the internet.
a crash to the user’s computer
Mindfulness while clicking
Requires an active host, thus the virus affects a unwanted links
software by attaching itself to the program.
Backup any data.
Requires the user to initiate it.
(AMB)

Worm A malware that can self replicate with the intention Mindfulness while clicking
of corrupting computer network by spreading unwanted links
over the network by finding vulnerabilities
Scan computer networks regularly
Doesn’t require an active host
Doesn’t require the user to initiate it. (MS)

Spyware A malware that gathers information by monitoring Use anti-spyware softwares


a user’s activities and sends it to the perpetrator
Using an on-screen keyboard
Record keystrokes on a computer which can be Using auto-filled passwords
used to compromise a user's login details. Using drop-down menus
as its clicks cannot be detected

(UUUU)

Adware A malware that floods the end-user with unwanted Mindfulness while clicking any
advertisements on websites and applications. unwanted links

Can hijack a user's browser to create its own (M)


search requests.

Ransomware A malware that encrypts the user’s data on the Backup any important data
computer and holds it hostage until a payment is
received by the perpetrator (B)

Trojan Horse A malware that disguises as legitimate software Avoid downloading third-party
with the intention of harming the user’s computer. softwares from the internet.

Requires the user to initiate the program Mindfulness while clicking any
unwanted links

(AM)

Keeping data safe Descriptions

Firewalls (FRCB) It can be both hardware and software

Examines the incoming and outgoing traffic


Criterias can be set for the traffic, such as blacklist certain IP addresses
Check whether traffic meets criteria set by the user or not
Reject traffic that does not meet criteria.

NOTE: Firewalls DON’T encrypt data being sent over the network.

Proxy Servers Acts as an intermediate between the user and the web server (FACK U W[enny])

5
Examines any incoming and outgoing traffic.
Allows faster access to web pages with the help of cache.

Can block requests from certain IP addresses.


Keeps the IP address of the user hidden.

Used to direct any invalid traffic from web servers.


Whitelists or Blacklists certain webpages based on criterias set by the user.

Secure Socket Layer SSL is a security protocol that encrypts any data that is sent over the network.
(SSL)
The browser sends a request to the web server for its SSL certificate in order to
authenticate itself.

The web server sends a copy of its SSL certificate which contains a public key .

The browser uses the public key for authentication to establish a secure connection to
take place.

Anti Virus/Spyware Scans for viruses/spywares in the computer.


Removes or Quarantines any viruses/spywares that are found in the computer.
Prevents the user from downloading viruses/spywares.

2FA Extra data is sent to device, pre-set by user


Making it more difficult for hacker to obtain it
Data has to be entered into the same system

Biometrics (DHL) Data needed to be entered is unique to individuals.


Hard to replicate thus, making it impossible to hack.
Locks out after a set number of attempts.

Access Levels Providing users with different permissions which..


Which limits their access to read and edit certain data.
Normally linked to a username

To prevent accidental loss of data:

Create a backup, this means data can be restored


Add verification, to get the user to confirm whether they want to delete the data or not.
Set access rights, to prevent the user from deleting the data.

Hardware
●​ A CPU (Central Processing Unit) processes and executes instructions that are input to the computer
so the result can be output.
●​ A microprocessor is an integrated circuit on a single chip.

The CPU contains 3 important features:

Units Control Unit


●​ Ensure the synchronization of the data flow by sending control signals to other
components using control bus
●​ Decodes instructions during FDE cycle

Arithmetic Logic Unit


●​ Performs all sorts of arithmetic and logical operations

Registers High speed memory components that temporarily stores data in the CPU

6
PC → Stores the memory address of the next instruction to be fetched.
MAR → Stores the memory address of the instruction that is about to be fetched from the RAM
MDR → Stores the instruction that has just been read from the memory.
CIR → Stores the instruction currently being decoded and executed.
ACC → Temporarily holds values while the ALU performs calculations

Buses Address Bus: Carries the memory address (Unidirectional)


Data Bus: Carries the actual data (Bidirectional)
Control Bus: Carries the control signals to the other part of the CPU (Bidirectional)

An instruction set is a list of all the machine code commands that can be processed by a CPU. It contains a
series of operations [opcode and operand]

The opcode tells the CPU what needs to be done.


The operand is the data that needs to be acted on.

The Fetch Decode Execute Cycle

Fetch:
●​ The PC holds the memory address of the next
instruction to be fetched.
●​ The memory address is copied to MAR from PC via
address bus.
●​ The memory address is then sent to RAM to locate the
instruction.
●​ Instruction is then sent to the MDR via data bus.
●​ Instruction is copied to CIR.
●​ PC increments so that the next instruction can be
fetched.

Decode:
●​ The instructions are then decoded by the CU using an
instruction set.

Execute:
●​ ALU performs operations and stores interim values in
the accumulator if needed.
●​ Instruction is executed and the cycle repeats.

Components Factors that affect the speed of the CPU

Cache A small fast memory built inside the CPU that is used to store instructions that are
frequently used by the CPU.

This is used to speed up the access to data

The larger the size of cache, the less time it spends retrieving/looking for frequently used
instructions.

If the size of cache is extremely large, the CPU will then spend more time looking for the
frequently used instruction, so a limit is set.

Core A core is a single processing unit that performs FDE cycles

A higher number of cores allows more FDE cycles to be completed at the same time.

However, if there are more number of cores, the time taken for the CPU to communicate
with each core increases

7
Clock Speed Controls the number of FDE cycles completed each second. Measured in Hertz (Hz)

Increasing the clock speed means, more number of FDE cycles are being completed each
second

Overclocking can cause:


●​ The unsynchronization of the data, causing a crash to the computer.
●​ The overheating of the CPU.

Embedded Systems are the combination of software and hardware that are used to carry out specific tasks or
functions. They are different from general purpose computers. (SCC, SDC)

Small and easy to fit Susceptible to hackers


Cheap and easy to make Difficult to update/use
Consumes little power Confusing interface

Sensor Description Sensor Description

Acoustic Detect any unusual sounds Infra-red Detect the motion of any object

Measure the heat radiation emitted from


objects

Accelerometer Detect sudden change in the Light Detect light levels


vehicles movement &
Level Detect liquid levels
Measure how tilt or the orientation
of the phone can be

Flow Measure the rate at which fluids Magnetic Used in anti-lock braking systems
are flowing Field Used in turbine & motors

Gas Detects the presence of gas Moisture To detect moisture or the dampness of
Measure gas levels any object.

Humidity Measure water vapour levels in air pH Detect the acidity or the alkalinity of any
object

And the rest of the sensors are pressure, proximity and temperature (self explainable)

Describe how the sensors and the microprocessor are used in this system.
●​ Suitable sensor used e.g. motion sensor/pressure sensor
●​ The sensor continuously sends digitised data to the microprocessor by converting the Analogue data
into Digital data using ADC
●​ The microprocessor compares the data with set values
○​ If value fall outside range, a signal sent to actuator to do work
○​ If value fall within range, no action taken
●​ It repeats as it’s a continuous loop

Primary storage contains data that can be directly accessed by the CPU.
●​ Volatile (Exception is ROM)
●​ Only internal

RAM ROM

Volatile & Temporary Non-Volatile & Permanent

8
Hold instructions that are currently in use Hold instructions required for boot up

Allow Read/Write operations Allow Read Operations only

Secondary storage contains data that cannot be directly accessed by the CPU.
●​ It is used to permanently store data
●​ Used for the creation of virtual memory

Magnetic Storage: Hard Disk


The magnetic storage contains a circular disc known as a platter which is divided into Drives
tracks and sectors with a read-write head over it.

The read-write head uses magnetized (1s) and demagnetized dots (0s) on the platter to
store information.

Optical Storage: CD
The optical storage uses circular discs and a read-write head with a laser to store DVD
information. Blu-Ray

As the discs spin, the laser makes indentations by burning data onto the surface which
creates pits (1) and lands (0). (CD < DVD < Blu Ray)

CD/DVD uses a red laser Blu Ray uses blue laser

DVD uses dual layer technology which allows .. which has a shorter wavelength thus it
it to store more data compared to CD allows more data to be stored in it
compared to CD/DVD.

Solid State Storage: SSD


Solid State Drives are also known as Flash storage.

SSDs use NAND and NOR gates, which consist of millions of floating / control gate
transistors.
Each transistor can trap and store electrons, representing binary data.

SSD (NGMFUQ) HDD Optical Storage

It has no moving parts It has moving parts It has moving parts

Expensive per GB of data Cheaper per GB of data Cheaper per GB of data

More Durable Less Durable Less Durable

Uses flash memory Magnetic Storage Burned pits and lands

Quite and cool Noisy and Generates Heats Noisy

Faster Access to data Slower access to data Slower access to data

Virtual Memory is an extension of the primary storage located in


the secondary storage when the physical RAM is full.
●​ Data is split into pages.
●​ The pages which are not currently being used by the CPU
are moved into virtual memory, which clears up space in
the RAM.
●​ This allows the RAM to be filled with new data.

9
●​ When needed, the pages are moved from virtual memory
back to RAM.

Benefits ●​ To extend RAM Capacity so that it stops crashing when


RAM is full
●​ To allow computer to process large amounts of data

Cloud Storage: A collection of servers that is used to store data in a remote location that can be easily
accessed using an internet connection

(AAMS) Cloud Storage Local Storage

Affordability No upfront hardware costs, but requires an ongoing High costs due to hardware purchases
payment

Accessibility Accessible from anywhere with the internet. No internet required for access.

Maintenance Managed by the third party Needs to be managed by the user with security

Scalability Storage can be easily expanded Storage cannot be easily expanded due to high
costs

A NIC/WNIC ([Wireless] Network Interface Card) is a hardware that is required for a device to connect to a
network.

It contains a MAC address (Media Access Control) which was generated during the manufacturing process.
●​ It is usually written in hexadecimal code.
●​ The first 6 digits refer to manufacturers code, the last 6 digits refer to the serial code.
●​ 48 bits ( 6 groups x 8 bits) in total separated with dashes.

Static IP Addresses is an IP address that doesn’t change.

Dynamic IP Address is an IP address that changes every single time it connects to the network.
●​ IP address is assigned using DHCP by their ISP provider

Static IP Dynamic IP

Faster Slower

Can be traced Cannot be traced

IPv4 (USB) IPv6

Uses denary starting from 0 - 255 Uses hexadecimal starting 0 - F

Separated using dots. Separated using colons

32 bits (4 groups x 8 bits) 128 bits ( 8 groups x 16 bits)

When talking about a IPv4 or IPv6, first state their features and then their characteristics:
IPv4 can be both static or dynamic. Uses denary starting from 0 - 255
It can public or private 4 groups of denary numbers, separated using dots
32 bits

IP Address (ACBM) MAC Address

10
It is assigned by the ISP It is assigned by the manufacturer

IP address can be changed MAC address cannot be changed

IP address has 32/128 bits MAC address has 48 bits

Has no serial code or manufacturer code Has serial code and manufacturer code

A router can assign IP addresses


A router can connect a local network to the internet
A router can send data to a specific destination on a network

Automated and Emerging Technologies


An Automated System is a device that can perform actions without any human intervention

Features of automated system and its role

Sensor Collects information from the environment


Converts analogue data into digital data using ADC
Provides the microprocessor with it as an input

Microprocessor Receives data from the sensor


Analyses the data
Sends signal to trigger actions based on the data

Actuators Makes physical changes causing a mechanical parts to move based on instructions given by the
microprocessor

Advantages (VPRKL) Disadvantages (VNCOO)

Very efficient compared to humans Very expensive to set it up


Provides consistent and faster results Needs to be well maintained
Reduces long term costs Can lead to unemployment
Keeps humans away from hazardous environments Open to cyber attacks
Less chances of human error Over-dependence on automation

Robotics is a branch of CS that brings together the design, construction and operation of Robots.
●​ Factory Equipments, Domestic Robots and Drones

Robots have these 3 distinct features (MEP):


●​ Mechanical structure or framework
●​ Electrical components, such as sensors, microprocessors and actuators
●​ Programmable

Advantages and disadvantages are pretty much the same for Robots too as well, here are some new ones
Can work 24/7 Can cause the people to be deskilled
It frees the farmer up to do other jobs
It can perform boring repetitive tasks

AI is a branch of computer science dealing with The characteristics of AI


●​ the simulation of intelligent behaviours by ●​ Has the ability collect data and set the rules for
computers using that data
●​ Has the ability to reason

11
●​ Has the ability to learn or adapt

Expert System Machine Learning

It is a form of artificial intelligence It is a form of artificial intelligence

It has an interface used to input data and view output It has the ability to learn, adapt or change by editing its own
It has a knowledge base, rule base & inference engine data & algorithms

The inference engine applies rules from the rule base to It can be trained as it can learn with/without human
the knowledge base to provide diagnostics that are used to interaction
derive conclusions.
Analyses patterns and stores successful and unsuccessful
Decides what to ask next based on the previous and current results to influence future decisions
data input

Data Representation
How and why do computers use binary to represent all forms of data?
●​ Computers use logic gates/switches that only process the values 1 and 0 which are stored in registers.

Why should you use hexadecimal instead of binary? Colour codes


●​ Easier to read, write and debug for humans Error messages
●​ Shorter way to represent binary MAC addresses
IP addresses
Locations in memory

Why does overflow error occur?


An overflow error will occur if the value is greater than 255 in an 8-bit register
It will require more than 8 bits to represent the binary value

A character set is a list of characters and symbols that can be represented by a computer system, where each
character and symbol is assigned with an unique value. For example: UNICODE & ASCII

CUBS ASCII UNICODE

Bits 7 bit (128 characters) 16 bit (65536 characters)

Uses ASCII includes a limited set of Unicode includes many more languages
languages & emojis

Characters ASCII has fewer characters Unicode has more characters

Storage Space Less storage is used than ASCII More storage is used than ASCII

Image Sound

An image is a series of pixels that are converted A sound wave is sampled as it is converted to binary,
to binary, which is processed by a computer which is processed by a computer

●​ A camera captures an image, which is then turned into ●​ A microphone records sound, which is then sampled
pixels. by measuring the amplitude.
●​ Each pixel is given a binary value, as they form a grid ●​ With each amplitude having a unique binary value.
to create an image

12
The sample rate is the number of samples taken in a
The image resolution is the dimensions of the image second

The colour depth is the number of bits used to The sample resolution is the number of bits per sample
represent each colour
Each sample is taken and then converted to binary.
The file size and quality of the image increases as
the resolution and colour depth increase The accuracy of the recording and the file size increases as
the sample rate and resolution increase

Always remember that, KiB starts with 210 and ends with PiB with 250

Compression exists to reduce the size of a file.

Importance (BTS):
●​ Less bandwidth required
●​ Shorter transmission time
●​ Less storage space required
●​ Less time taken to upload or download files

Compression: Lossy and Lossless

Lossy compression is when data is permanently removed Lossless compression is when data is encoded in order to
in order to reduce the size of the file on secondary storage reduce the size of the file on secondary storage

Lossy compression is irreversible, as file can’t be restored Lossless compression is reversible, as file can be restored

Lossy can greatly reduce the size of a file but at the Lossless can reduce the size of a file but not as
expense of losing quality dramatically as lossy

Lossy is only suitable for data where a loss in the quality is Lossless is only suitable for data where a loss in the quality
acceptable is unacceptable

RLE (Run Length Encoding) (5 marks)


●​ A compression algorithm is used such as RLE for lossless compression.
●​ Where patterns are identified and indexed with the number of occurrences with their position
●​ No data is lost as the file can be restored back to its original state.

NOTES: All sorts of calculations are not included here. Please refer to your textbook for that

Data Transmission

The data packet consist of 3 things: Header, Payload and Trailer

Header Payload Trailer

●​ Consist the IP address of the ●​ Consist of the actual data (around ●​ Method of identifying the end of
sender and receiver. 64 KiB) the packet
●​ Size of the packets ●​ Error checking method (CRC)
●​ Sequence number of packets

CRC (Cyclic Redundancy Check)


●​ The sender device adds up all the 1 bits in the payload and stores it as a hex value in the trailer.
●​ The receiving device recalculates the sum of 1 bits in the payload and compares it with the one in the
trailer.
●​ If the values are different then an error must have occurred.

13
Packet Switching

Data is broken into small number of packets where each packet takes a different route
Router controls the route each packet takes while selecting the shortest possible path available
Packets may arrive out of order, so they need to be reordered at their destination.
If a packet is missing/corrupted, it is requested again.

Advantages Disadvantages

No need to tie a single communication line Packet may arrive in different order
A high data transmission rate is possible Packets can be lost and need to be re-sent
Relatively easy to expand the packet usage Delay at destination while the packets are being re-ordered

Serial: Data is sent one bit at a time over a single wire Parallel: Data is sent multiple bits at a time down multiple
(CLAWS) wires

●​ Cheaper ●​ Expensive
●​ Arrives in order, no need to be reordered ●​ Can arrive out of sequence (skew)
●​ Less interference thus less chance of errors ●​ More interference, thus high chance of errors
●​ Works well over longer distances ●​ Works well over short distances
●​ Slower response to requests ●​ Faster responses to requests

Universal Serial Bus is the industry’s standard to transmit data. It makes the use of Serial Data Transmission
The USB interface includes a: Port, Cable, Connection, & Device

Advantages Disadvantages

Backward Compatible Slower Speeds


Industry’s Standard Old USBs may not be Supported
Only fits in one way Only supports a maximum length of 5m

Errors can occur during data transmission Data loss can occur due to: Prevention (SAM):
●​ Data Loss
●​ Data Gain ●​ Human Error ●​ Surge Protection
●​ Hardware Failure ●​ Access Rights
●​ Data Change
●​ Physical Damage ●​ Make regular backups of data
●​ Power Failure

ECM Description

Parity Bit An even or odd parity bit is set


Adds an parity bit to each byte to create an odd or even number of 1 bits.
The receiving device counts the number of 1 bits to see if parity block is correct or not

Checksum Checksum is an additional value that is calculated based on the block of data using a checksum
algorithm which is sent alongside the data during data transmission.

Echo Check A copy of the transmitted data is sent back to the sender to be compared with the original data.

Check Digit A value is appended to data that has been calculated using the data. This value is checked on data
entry. Note: This is a data entry check NOT a data transmission check

ARQ Error detection method that involves acknowledgements and timeouts.

… if there is any difference between the values and error must have occurred

14
Describe how parity checks and ARQ operate together to detect and correct errors

An odd or even parity is set for the data


A parity bit is added to each byte to ensure the number of 1s are correct
The receiving device counts the number of 1s to see if parity is correct or not

ARQ (Automatic Repeat reQuest) uses acknowledgements & timeouts


●​ If no error is found → positive acknowledgment is sent to the user
●​ If an error is found → negative acknowledgment is sent to the user that triggers the data to be resent

●​ A timer starts when the data is sent to the receiving device


●​ If the sending device does not receive any positive acknowledgement within the time limit
●​ A timeout occurs where the data packet is sent again until an acknowledgement is received

Encryption is a method that uses a key to scramble the data to make it meaningless by converting it from plaintext to a
cipher text.

Symmetric Encryption Asymmetric Encryption

●​ Uses a public key ●​ Uses public and private keys


●​ Key needs to be sent with the data ●​ Key doesn’t need to be sent with the data
●​ Uses the same key to encrypt and decrypt data ●​ Uses a public key to encrypt and a private key to decrypt
●​ Less Secure ●​ More secure

●​ Plain text is encrypted into a cipher using an ●​ Plain text is encrypted into a cipher using an algorithm
algorithm that uses a public key. that uses a public key.
●​ The key is sent to the receiver, which can be used to ●​ The receiver uses their private key to decrypt cipher text
decrypt the text back to plain text

Hardware (CONTINUED)

QR Code Scan Barcode Scan

A camera that is used to scan the QR code A barcode scanner is used to scan barcodes.

The three large squares are used to define the Scanned using a barcode reader that shines red
alignment of then QR code laser light

Light is reflected back since white lines reflect more Light is reflected back since white lines reflect more
light than black lines light than black lines

The app/device processes the image Sensors detect the light

Each small square is converted to a binary value Different reflections are converted to binary values
which are then processed by a microprocessor.

Types of Touch Screens

Capacitive Touch Screens ●​ Good durability


●​ Allows multi-touch facility
Current is sent from all 4 corners from the screen
●​ Screen will shatter and break
When the finger touches the screen it breaks the
electrostatic field …

15
Infrared Touch Screens ●​ Good durability
●​ Allows multi-touch facility
Uses an invisible grid on the screen
●​ Screen will shatter and break
When the finger touches the screen, it breaks the
infrared beams which are detected by a sensor…

Resistive Touch Screens ●​ Cheap to manufacture


●​ Can use stylus
Contains multiple layers of glass that transmit electric
current ●​ Poor visibility in sunlight
●​ Doesn’t allow multi touch facility
When the top layer touches the bottom layer, it causes a
change in the electric current ….

… which sends a signal to the microprocessor, calculating the exact touch coordinates.

DLP Projector (HRQ) LCD Projector (SBE)

A DMD chip has numerous micro mirrors that A powerful light beam is shone at a chromatic
adjust based on data received by the computer. coated mirror, splitting the image into red, green,
and blue components.
These micro-mirrors create a grayscale version of
the image from the light source. Three separate versions of the image are created.

A bright light is shone on the DMD chip which A prism is used to recombine the image, producing a
passes through an RGB filter that helps to transform large, full-color display..
the grayscale image into a full-color display.

Higher contrast ratios & reliability Provides a sharper image & Better color saturation
Runs Quieter than LCD projector. More efficient use of its energy

LED Screens:
●​ Made of tiny red, green, and blue light-emitting diodes.
●​ Brightness is controlled by varying electric current, creating millions of colors.
●​ A diffuser is used to distribute light evenly
●​ Used in outdoor advertising and sports scoreboards.

LCD Screens:
●​ Made of liquid crystals in a matrix of pixels.
●​ Require backlighting (usually LED) since they don't emit light.
●​ Liquid crystal properties change with the varying electric field.

They reach maximum brightness immediately


They produce a very white light which gives good colour definition
They last almost indefinitely and consume very little power.

IMPORTANT: Application of Magnetic Field Sensors: Anti-lock Brakes (ABS) in Vehicles:


●​ Magnetic field sensors monitor the rotational speed of each wheel.
●​ If a wheel locks up, the microprocessor detects it and adjusts braking force.
●​ Brakes are rapidly applied and released to prevent wheel lock-up.
●​ The driver feels a judder through the brake pedal as the brakes are adjusted.

PAPER 2

Algorithm design and problem solving

Program Development Life Cycle and Its Purpose

16
Analysis It is the abstraction, decomposition, and the identification of the problem and its requirements

Design Develop an algorithm to solve the problem using structure diagrams, flowcharts or pseudocode

Coding Writing and implement instructions and perform iterative testing

Testing Debugging and fixing bugs in program using test data

Abstractions Decomposition

A way to simplify problems A complex problem is divided into smaller parts,


By removing unnecessary details from it. which is further broken down until each part can be
solved individually.

Structure Diagrams

A diagram that shows the design of a computer system in a hierarchical way

A problem can be decomposed into its component parts

Input Data that needs to be entered while the system is active

Processes Tasks that needs to be performed using the input data

Output Data that needs to be displayed to the user on the system

Storage Data that needs to be stored in files for future uses

Different methods to design and construct a solution to a problem

Structure Diagram A diagram that shows the design of a computer system in a hierarchical way.

Flow Chart A diagram that shows the steps required in order to solve a task

Pseudocode A simple way of showing an algorithm using English Keywords

Tips Purpose

Comments To annotate each section of the code to define its purpose, for example: Logic or Syntax

Meaningful To clearly identify the purpose of variables, constants, arrays, procedures etc. For
Identifier names example: INT DaysInAYear = 365

Procedures and To avoid repeated code, by simplifying the logic


Functions To add more functionality and increase the modularity.

Indentation and To make the code more readable to programmers.


white space

Local Variable Global Variable

Scope is a defined block of code Scope is the entire code.


Value cannot be changed anywhere in the program Value can be changed anywhere in the program

17
Validation is an automated check carried out by a Verification is a check carried out to make sure that
computer to make sure the data entered is sensible & a value entered has not changed during input
reasonable

Validations Purpose (RLTPFC)

Range Check To check that the value of a number is between an upper values and a lower value

Length Check To check that the data entered has an appropriate number of characters

Type Check To check that the data entered has an appropriate type

Presence Check To check that some data has been entered

Format Check To check that the data entered matches with a predefined pattern

Check Digit To check that an identification number contains no error

Verification Purpose (VD)

Visual Check To ensure that data has been accurately copied from one source to another

Double data Entry Data is entered twice, the two entries are compared and if they do not match, a re-entry is
requested

Test Data

Normal Data Data is accepted by a program

Abnormal Data Data is rejected by a program

Extreme Data Largest/Smallest data value that is accepted

Boundary Data One value which is accepted while the other is rejected

CONDITIONALS
Count controlled: number of iterations is predetermined
Pre-condition: checks condition at start of loop so loop may not iterate
Post-condition: checks condition at end of loop so loop always iterates at least once

Library Routines

MOD Returns the remainder by performing integer division


Example: 7 MOD 2 = 1

DIV Returns the quotient by performing integer division


Example: DIV(9,4) = 2

ROUND To return a value rounded to a specific number of digits.


Example: ROUND(4.56, 1) = 4.5

RANDOM To generate random numbers within a specified range


Example: RANDOM() * 10 returns a random number between 0 and 10

18
Linear Search
CONSTANT ArrayLength 50​
DECLARE Number : INTEGER

OUTPUT "Enter a number to search for"​
INPUT Number​

FOR Count 1 TO 50​
​ IF Number = Arr[Count] THEN​
​ OUTPUT "Number found"​
​ ENDIF

NEXT Count

Bubble Sort:
DECLARE Swap : BOOLEAN​
DECLARE Temp : INTEGER​
DECLARE Item : INTEGER​

CONSTANT ArrayLength 10​

REPEAT​
Swap FALSE​

FOR Item 0 TO (ArrayLength - 1)​
​ IF Arr[Item] > Arr[Item + 1] THEN
​ // Store the value​
​ Temp Arr[Item]​

​ // Swap Values​
​ Arr[Item] Arr[Item + 1]​
​ Arr[Item + 1] Temp​
​ Swap TRUE​
​ ENDIF​
NEXT Index​
UNTIL NOT Swap

// Notes: For P2 I recommend you using pupnotes, since I didn’t cover everything necessary.
// TO DO:

●​ Software: Update the descriptions

●​ Add FAQ from past papers

19

You might also like