CS Revision Booklet 1
CS Revision Booklet 1
128 64 32 16 8 4 2 1
1. Data Representation 1 1 1 0 1 1 1 0
Binary Value Hexadecimal Value Denary Value Note that when the value itself is not divisible by 2, it is
0000 0 0 divided by the previous value of the current number and 1
0001 1 1 is added to the remainder column for that specific
0010 2 2 number
When you reach 0, the remainder has to be read from
0011 3 3
bottom to top giving us the binary value ( as in this case, it
0100 4 4 is 1 0 0 0 1 1 1 0 )
0101 5 5
0110 6 6 Converting Hexadecimal to Binary
0111 7 7
1000 8 8 Separate each value from each other and convert them to
1001 9 9 denary
Each separate denary value to be converted to binary
1010 A 10
All the binary values to be merged together
1011 B 11 e.g.
1100 C 12
1101 D 13 Hexadecimal : 2 1 F D
Denary : 2 1 15 13
1110 E 14
Binary : 0010 0001 1111 1101
1111 F 15
Final Answer: 0010000111111101
Number Conversions
Converting Binary To Hexadecimal
1.2. Converting Binary to Denary Divide the binary value into groups of 4 starting from the
right. If at the end, the last division is less than 4, add 0s
Take the binary value and place it in columns of 2 raised until it reaches 4
to the power of the number of values from the right For each group, find the denary value as shown above,
starting from 0.e.g. For binary value 11101110, place it in and then convert each denary value to its corresponding
a table like this: hexadecimal value (if less than 10, then itself, else, 10 is
A, 11 is B, 12 is C, 13 is D, 14 is E and 15 is F).
CAIE IGCSE COMPUTER SCIENCE
The values we will add are 1 1 0 1 1 1 0 and 1 1 0 1 1 1 1 0 Converting negative values to two complement
1. Convert both the bytes into 8 bits (add zero to the
left-hand side to match them). Find the binary equivalent of the value ignoring the - sign
e.g., 1 1 0 1 1 1 0 would become 0 1 1 0 1 1 1 0 Convert the binary value to two’s complement
2. Add the values as follows with the points given Make the MSB 1, if not already
above
Converting two’s complement value to denary:
CAIE IGCSE COMPUTER SCIENCE
We do it the same way as a normal value is converted ASCII uses one byte to store the value
from binary to denary; we only just replace 128 with -128 When ASCII value of a character is converted to binary, it
e.g., for 10111010 we do the: can be seen that the sixth bit changes from 1 to 0 when
going from lowercase to uppercase of a character and the
-128 64 32 16 8 4 2 1 rest remains the same. e.g.
1 0 1 1 1 0 1 0
-128 + 32 + 16 + 8 + 2 = -70
Image resolution refers to the number of pixels that make Musical Instrument Digital Format (MIDI)
up an image; for example, an image could contain 4096 ×
Storage of music files
3072 pixels
Communications protocol that allows electronic musical
Photographs with a lower resolution have less detail than
instruments to interact with each other
those with a higher resolution
Stored as a series of demands but no actual music notes
When a bitmap image is ‘ blurry ‘ or ‘ fizzy ’ due to having
Uses 8-bit serial transmission (asynchronous)
low amount of pixels in it or when zoomed, it is known as
Each MIDI command has a sequence of bytes:
being pixelated.
First byte is the status byte – informs the MIDI device
High resolution images use high amounts of memory as
what function to preform
compared to low resolution ones
Encoded in the status byte is the MIDI channel
(operates on 16 different channels)
1.6. Measurement of the Size of Examples of MIDI commands:
Computer Memories Note on/off: indicates that a key has been pressed
Key pressure: indicates how hard it has been pressed
A binary digit is referred to as a BIT (loudness of music)
8 bits is a byte Needs a lot of memory storage
4 bits is a nibble
MP3
Byte is used to measure memory size
Uses technology known as Audio Compression to convert
IECB System (more commonly used):
music and other sounds into an MP3 file format
Name of memory No. of This compression reduces the normal file size by 90%
Equivalent Denary Value
size Bytes Done using file compression algorithms which use
1 kibibyte (1KB) 210 1 024 bytes Perceptual Music Shaping
Removes sounds that human ear cannot hear properly
1 mibibyte (1MB) 220 1 048 576 bytes
Certain sounds are removed without affecting the
1 gibibyte (1GB) 230 1 073 741 824 bytes quality too much
CD files are converted using File Compression Software
1 tibibyte (1TB) 240 1 099 511 627 776 bytes
Use lossy format as the original file is lost following the
1 125 899 906 842 624
1 pibibyte (1PB) 250 compression algorithm
bytes
MP4
Conventional System:
This format allows the storage of multimedia files rather
Name of memory No. of
Equivalent Denary Value than just sound
size Bytes
CAIE IGCSE COMPUTER SCIENCE
Joint Photographic Experts Group (JPEG) 2.1. Types and Methods of Data
Transmission
JPEG is a file formats used to reduce photographic file
sizes
Data Packets
Reducing picture resolution is changing the number of
pixels per centimetre
Packet Structure -
When photographic file undergoes compression, file size
Header
is reduced
Contains the IP address of the sender and the
JPEG will reduce the raw bitmap image by a factor
receiver
between 5 and 15
Sequence number of the packet
Size of the packet
Lossless and Lossy File Payload
Contains the actual data
Compression Trailer
Includes a method of identifying the end of the
packet
1.8. Lossless File Compression Error-Checking methods
Packet Switching - Method of data transmission where the
All the data bits from the original file are reconstructed data is broken into multiple packets. Packets are then sent
when the file again is uncompressed independently from start to end and reassembled at the
Important for files where loss of data would be disastrous receiver’s computer.
(spreadsheet)
An algorithm is used to compress data Advantages Disadvantages
No data is lost No need to create a single
Packets may be lost
Repeated patterns/text are grouped together in indexes line of communication
Possible to overcome failed or More prone to errors in real-
Run-Length Encoding busy nodes time streaming
It reduces the size of a string of adjacent, identical data Delay at the receiver while
(e.g. repeated colours in an image) High data transmission speed the packets are being re-
A repeating string is encoded into two values: the first ordered
value represents the number of identical data items (e.g. Easy to expand package
characters) and the second value represents the code of usage
the data item (such as ASCII code if it is a keyboard
character) e.g. ‘aaaaabbbbccddddd’ becomes “05 97 04 Data Transmission
98 02 99 05 100”
RLE is only effective where there is a long run of repeated Simplex data transmission is in one direction only (e.g.
units/bits computer to printer)
One difficulty is that RLE compression isn't very good for Half-duplex data transmission is in both directions but not
strings like "cdcdcdcdcd". We use a flag to solve this, e.g. at the same time (e.g. phone conversation where only one
255 can be made the flag. Now 255 will be put before person speaks)
every repeating value, e.g. our previous example Full-duplex data transmission is in both directions
becomes 255 05 97 255 04 98 255 02 99 255 05 100 simultaneously (e.g. broadband connection on phone line)
where 255 now indicated that now the next character/set Serial data transmission is when data is sent one bit at a
of characters is approaching time over a single wire
Parallel data transmission is when data several bits (1
Lossy File Compression byte) are sent down several wires at the same time
The file compression algorithm eliminates unnecessary Comparsion of Serial and Parallel data transmission
bits of data like MP3 and JPEG formats
Impossible to get original file back once compressed
Serial Parallel
Reduces file quality Better for longer distances Better for short distances
In this, resolution of the image is reduced, and colour (Telephone Lines) (Internal circuits)
depth is reduced
CAIE IGCSE COMPUTER SCIENCE
Serial Parallel
Expensive (More hardware
Cheaper Option
required)
Used when the size of data Used when speed is
transmitted is small necessary
Slower Option Faster than Serial
Encryption
CAIE IGCSE COMPUTER SCIENCE
Encryption is a process of turning the data into an Increments the value of the instructions by 1 and also
unreadable form so it doesn’t make sense to hackers and fetches the data and instructions.
other attackers. Memory Address Register:
Stores the Address of the instruction and copies it and
2.4. Plaintext and Ciphertext sends to MDR
Memory Data Register:
Plaintext is the original data that is being sent Stores the Data from the address received from the
Ciphertext is the text produced after encryption MAR and sends data to CIR
Current instructions Register:
Symmetric and Asymmetric Encryption Data gets executed from here by sending to bios or
processed by sending to ALU
Symmetric Encryption: Accumulator:
It uses an encryption key for the encryption process,
During calculations data is temporarily held in it
The same key is used for both encrypting and
decrypting the data.
Asymmetric Encryption:
Uses a public key and a private key. The public key is
available to everyone whereas the private key is only
available to the user
The receiver would have the private key and they
would send the public key to the sender. The sender
can encrypt the message with the public key and the
data can be on decrypted using the private key.
integrated circuits
Factors that determine the Software produces a digital image from the electronic
form
performance of a CPU Optical Character Recognition (OCR) is a software which
converts scanned documents into a text file format
3.2. System Clock If the original document was a photo/image, then the
scanned image forms an image file such as JPEG
The clock defines the clock cycle that synchronises all
Three-dimensional Scanners
computer operations. By increasing clock speed, the
processing speed of the computer is also increased. This 3D scanners can scan solid objects and produce a three-
doesn’t mean that the performance of the computer is dimensional image
increased however. Scanners take images at several points, x, y and z (lasers,
magnetic, white light)
Overclocking The scanned images can be used in Computer Aided
Design (CAD) or to a 3D printer to produce a working
Using a clock speed higher than the computer was designed model
for.
It leads to multiple issues Application of 2D Scanners at an Airport:
Operations become unsyncronised - (the computer would Make use of (OCR) to produce digital images which
frequently crash and become unstable) represent the passport pages
can lead to serious overheating of the CPU Text can be stored in ASCII format
The 2D photograph in the passport is also scanned and
Length of data buses stored as jpeg image
The passenger’s face is also photographed using a digital
The wider the data buses, the better the performance of the camera and compared using face recognition software
Key parts of the face are compared (distance between
computer
eyes, width of nose)
Cache memory is located within the CPU itself A barcode is a series of dark and light parallel lines of
-- allows faster access to CPU varying thicknesses
-- stores frequently used instructions and data that need to be The numbers 0 -9 are each represented by a unique
accessed faster, which improves CPU performance series of lines
The larger the cache memory size the better the CPU The left and right hand sides of the barcode are separate
performance using guard bars
Allows barcode to be scanned in any direction
Barcode is read by a red laser or red LED
Cores
Light is reflected back off the barcode; dark areas
reflect little light which allows the bars to be read
More the cores in the CPU, the better and faster the
Reflected light is read by sensors (photoelectric cells)
performance
Pattern is generated which is converted to digital
3D cutters can recognise objects in x, y, z direction This beam of light is then sent to a group of chromatic-
3D laser cutters can cut; glass, crystal, metal, wood coated mirrors; these reflect the light back at different
wavelengths
Actuators When the white light hits the mirrors, the reflected light
has wavelengths corresponding to red, green and blue
Used in many control applications involving sensors and
These three different light pass through three LCD
devices (ADC and DAC)
screens; these screens show the image to be projected as
Loudspeakers/Headphones millions of pixels in grayscale
When the coloured light passes through the LCD screens,
Sound is produced by passing the digital data through a a red, green and blue version of the grey image emerges
DAC then through amplifier and then emerges from Finally, the image passes through the projector lens onto
loudspeaker the screen
Produced by voltage differences vibrating a cone in the
speaker at different frequencies
Used to store start up instruction (basic input/output Cloud storage is a method of data storage where data is
systems) stored on remote servers
Data/contents of a ROM chip can only be read, cannot The same data is stored on more than one server in case
be changed of maintenance or repair, allowing clients to access data
at any time. This is known as data redundancy.
Secondary Storage: The following are it’s types:
Hard Disk Drives (HDD) » Public cloud – this is a storage environment where the
customer/client and cloud storage provider are different
Data is stored in a digital format on the magnetic surface
companies
of the disks (platter)
» Private cloud – this is storage provided by a dedicated
Number of read/write heads can access all of the
environment behind a company firewall; customer/client
surfaces of the disk
and cloud storage provider are integrated and operate as
Each platter will have two surfaces which can be used to
a single entity
store the data
» Hybrid cloud – this is a combination of the two above
Data is stored on the surfaces in sectors and tracks
environments; some data resides in the private cloud and
HDD have very slow data access compared to RAM
less sensitive/less commercial data can be accessed from
Solid-State Drive (SSD) a public cloud storage provider
\
No moving parts and all data is received at the same time There is a risk that important and irreplaceable data could
(not like HDD) be lost from the cloud storage facilities.
Store data by controlling the movement of electrons
within NAND chips, as 1s and 0s
3.6. Embedded Systems
Non-volatile rewritable memory
Benefits of using SSD rather than HDD:
Combination of Hardware and Software which is designed
More reliable (no moving parts)
to carry out a specific set of tasks.
Considerably lighter (suitable for laptops)
Embedded systems may contain -
Lower power consumption
Microcontrollers - CPU, RAM, ROM and other
Run much cooler than HDDs
peripherals on one single chip
Very thin
Microprocessor - Integrated circuit with CPU only
Data access is faster than HDD
System on Chips (SoC) - microprocessor with I/O ports,
Drawback – questionable longevity (20GB per day)
storage and memory
Off-Line Storage: Process of Embedded Devices -
CD/DVD Disks Input from the user is sent to the microprocessor
(ADC needed if the data is analogue)
Laser (red) light is used to read and write data in the Data from the user interface is also sent to the
surface of the disk microprocessor
Use a thin layer of metal alloy to store data Microprocessor then sends signals to actuators which
Both systems use a single, spiral track which runs from is the output
the centre of the disk to the edge Non-programmable devices need to be replaced if they
DVD uses Dual-Layering which increases the storage need a software update.
capacity (two individual recoding layers) Programmable devices have two methods of updating -
Connecting the device to a computer and downloading
Blu-ray Disks the update
Updating automatically via a satellite, cellular or Wi-Fi
Uses blue laser to carry out read and write operations
link
Wavelength of laser light is less than CD and DVD (stores
up to five times more data than DVD) < centre>Advantages and Disadvantages of using embedded
Automatically come with secure encryption (prevent systems
piracy and copyright infringement)
Advantages Disadvantages
Used as back-up systems
Small in size, therefore can
Can be difficult to upgrade
USB Flash Memories easily fit into devices
The interface can be
Very small, lightweight suitable from transferring files Low cost to make
confusing sometimes
Small back-up devices for photo, music
Troubleshooting is a
Solid state so need to be treated with care Requires very little power
specialist’s job
Cloud Storage:
CAIE IGCSE COMPUTER SCIENCE
Advantages and Disadvantages of CLI and GUI Easier to read and understand as the language is closer
to human language
Easier to write in a shorter time
Easier to debug at the development stage
Easier to maintain once in use
Low-Level Languages
Memory Management - Manages the RAM and the Source: Cambridge IGCSE and O Level Computer Science
HDD/SSD during the execution of programs - Second Edition (Hodder Education)
Security Management - Providing security features such
as Anti-Virus, System updates and so on Assembly Language
Hardware Peripheral Management - Managing the device
Few programmers use assembly language to -
drives, Inputs, Outputs, Queues and buffers
Make use of special hardware
File Management - Opening, Creating, Deleting, Renaming
Write code that doesn’t take up much space
and many more functions
Write code that runs very quickly
Multitasking - OS would share the hardware resources
with each of the processes
Management of User Accounts - OS would allow multiple 4.2. Translators
users where each individually customize their account.
Compiler
4.1. Running of Applications
Translates a program written in high-level language into
The computer starts its OS (booting up the computer) machine code
through the bootstrap loader. Used without compiler
The BIOS (Basic Input/Output System) tells the computer Executable file of machine code produced
the location of the OS in the storage. One high-level language translated into several machine
BIOS is often referred to as the firmware code instructions
Used for general use
Interrupts
Interpreter
Signal that causes the operating system to stop what it’s Executes a high-language program a statement at a time
doing and service a task No executable file of machine code produced
Ensures important tasks are dealt on priority basis One high-level language program statement may require
Can be a software or a hardware interrupt several machine code instructions to be executed
Can be generated by peripherals like keyboard & mouse Interpreted programs cannot be used without interpreter
Different interrupts have different levels of priority Used when program is being developed
After interrupt is dealt with previous process continues
CAIE IGCSE COMPUTER SCIENCE
Computer users have access to utility programs as part of locally backed-up copy on a portable SSD, and a remote
system software backup on cloud storage.
Utility programs can be initiated by the user or run in the
background without user input Security Software
Common utility programs include virus checkers,
defragmentation software, disk analysis and repair tools, Security software is a utility software that manages
file compression and management software, backup access control, user accounts, and links to other utilities
software, security tools, and screensavers. such as virus and spyware checkers.
It also protects network interfaces using firewalls to
4.4. Virus Checker / Anti Virus software prevent unauthorized access.
Security software uses encryption and decryption to
Virus checkers or anti-virus software are important for ensure intercepted data is unreadable without a
protecting computers from malware. decryption key.
They should be kept up to date and run in the background It oversees software updates to verify legitimate sources
to maintain their effectiveness. and prevent malicious software from installing.
Anti-virus software checks files before they are run or Access control and user accounts use IDs and passwords
loaded and compares possible viruses against a database to secure user data and prevent unauthorized access.
of known viruses.
Heuristic checking is used to identify possible viruses that Screensavers
are not yet on the database.
Infected files are put into quarantine for automatic Screensavers display moving and still images on the
deletion or for the user to decide. monitor screen after a period of computer inactivity.
Anti-virus software must be kept up to date as new They were originally developed to protect CRT monitors
viruses are constantly discovered. from 'phosphor burn'.
Full system scans should be carried out regularly to detect Screensavers are now mostly used for customizing a
dormant viruses. device and as a part of computer security system.
They are used to automatically log out the user after a
Disk Defragmenting Software certain period of inactivity.
Some screensavers activate useful background tasks like
Defragmentation software is used to rearrange the blocks virus scans and distributed computing applications.
of data on a hard disk drive (HDD) to store files in
contiguous sectors, reducing head movements and Device Drivers
improving data access time.
As an HDD becomes full, blocks used for files become Device drivers translate data into a format that can be
scattered all over the disk surface, making it slower to understood by the hardware device they are associated
retrieve data as the HDD read-write head needs several with.
movements to find the data. Without the appropriate device driver, a hardware device
When a file is deleted or extended, the vacant sectors are cannot work with a computer and may not be recognised
not filled up straight away by new data, causing the files to by the operating system.
become more scattered throughout the disk surfaces. USB device drivers contain descriptors, which include a
A disk defragmenter rearranges the blocks of data to vendor id (VID), product id (PID) and unique serial number
store files in contiguous sectors wherever possible, that allow the operating system to identify the device.
allowing for faster data access and retrieval. Serial numbers must be unique to avoid confusion if two
The defragmentation process can free up previously different devices with the same serial number were
occupied sectors and leave some tracks empty. plugged into a computer at the same time.
Backup Software
5. The Internet
Backup software is a utility software that helps in creating
and managing backup copies of data files and programs. 5.1. The Internet and the World Wide
Manual backups using memory sticks or portable hard
drives are good practices, but using operating system Web
backup utilities is also recommended.
Backup utilities allow scheduling backups and only backup Internet World Wide Web (WWW)
files if changes have been made to them. Uses transmission protocols
Collection of webpages and
For total security, there could be three versions of a file: such as TCP and IP (Internet
other information on websites
the current version stored on the internal HDD/SSD, a Protocols)
CAIE IGCSE COMPUTER SCIENCE
URLs are used to locate and access web pages. The Digital Currency
typical format of URLs is -
Form of payment to pay for goods and services
protocol://website address/path/file name A few examples are Debit/Credit Cards, Apps (Paypal,
Apple Pay, Bank Transfers and many more)
The protocol would usually be HTTP or HTTPS
Cryptography was later introduced due to the problem in
The website address would contain -
centralised banking systems.
domain host (www)
Cryptocurrency uses cryptography to maintain track of
domain name (website name)
transactions.
domain type (.com, .org, .net, .gov) or sometimes
Cryptocurrency is also more secure because it uses
country codes (.uk, .in, .cy)
Blockchain Network
The path would usually become the le directory roots. for
example, https://www.igcse.com/computer-science
The /computer-science is the file name 5.2. Blockchain Network
Cookies
Cookies are small files stored on the user’s computer The first block is called the genesis block as it doesn’t
They are used to track data about the users and autofill point to any previous block (Previous Hash Value - 0000)
forms or give suggestions accordingly
Types of Cookies -
Cyber Security
Session Cookie Persistent Cookie
CAIE IGCSE COMPUTER SCIENCE
Brute Force Attack: Ransomware - Attackers encrypt the user’s data until a
certain amount of money is paid
Hackers try to guess your password by trying all the Adware - Displays unwanted ads on user’s screen
different combinations of letters, numbers and symbols. Trojan Horse - Programs that are disguised as
Effect: legitimate software
Hacker gets access to user’s personal data (credit Spyware - Sends data about all the activities of the
cards, passwords and more) user to the attacker
To remove risk: Worms - Programs that can replicate itself with the
Use stronger passwords with more characters and intention of corrupting the entire network instead of
symbols the computer alone
This involves stealing data by tapping into a wired or a Attackers send legitimate-looking emails to bait the user
wireless transmission line into giving out their information.
Wardriving - The act of locating and using wireless To remove risk:
internet connections illegally Don’t open links from unknown receivers
Packet Sniffing - Uses Packet sniffers to examine Use anti-phishing tools
packets sent over a line, all the data collected is sent Block pop-up ads
back to the attacker Have an up-to-date browser
Effect:
Can cause a computer to crash Pharming
Can delete or corrupt files/data
To remove risk: The attacker installs a malicious code on the computer
Install anti-virus software which redirects the user to fake websites
Don’t use software from unknown sources Effect:
Be careful when opening emails from unknown User gives out login details and other personal details
To remove risk:
Distributed Denial of Service Attacks (DDoS) Using anti-virus software
Checking the spelling and the weblink carefully
An attempt at preventing users from accessing part of a Making sure that the green padlock is present in the
network URL bar
Usually temporary but may be damaging
Attacker may be able to prevent user from: Social Engineering
Accessing their emails
Accessing websites Attackers create a social situation which leads to victims
Accessing online services giving out their details (For example - Spam calls
informing that your account has been hacked)
Hacking
5.3. Keeping data safe from threats
The act of gaining illegal access to a computer system
Effect: Access Levels - Having Different levels of access for
Leads to identity theft, gaining personal information different people (for example - Only doctors can have
Data can be deleted, changed or corrupted access to patient’s data)
To remove risk: Antivirus - Protects user’s computer from malware attacks
Firewalls Authentication - User proving who they are. Most
Strong passwords/ user IDs common methods are passwords, PINs, Mobiles (OTPs),
Use of anti-hacking software biometrics and more)
Difference between hacking and cracking
Hacking breaks into computer system to steal data Benefits and Drawbacks of Biometric Method
Cracking is where someone edits a program code, Biometric
Benefits Drawbacks
malicious Methods
Most development Intrusive as used to
Malware
Method, Very easy to identify criminals,
Fingerprint
Stands for Malicious Software, A few examples are - use, Requires very low Can’t be used if the
Scans
Virus - Program that can replicate itself with the storage to store the finger gets dirty or
intention of deleting or corrupting files, cause biometric data damaged (e.g. cuts)
computer malfunction
CAIE IGCSE COMPUTER SCIENCE