0% found this document useful (0 votes)
7 views27 pages

ComputerScience MT RT Grade9

Uploaded by

nehiithjakkidi
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)
7 views27 pages

ComputerScience MT RT Grade9

Uploaded by

nehiithjakkidi
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

Chapters Wise Key Concepts

Sl. No. Chapter Key Concepts

1 CH-1 Data  Number Systems


Representation  Text, sound and images
 Data Storage and Compression
2 CH-7 Algorithm  Program Life Cycle and Sub-Systems
Design and Problem  Flowcharts and Trace tables
Solving
3 CH-2 Data  Types and Methods of Data Transmission
Transmission  Methods of Error Detection
 Encryption
Notes

Unit 1- Data Representation


 The basis of any number system consists of:
o A base: the number of digits that a number system can use to represent numbers
o Place value for each digit: digits in certain positions have a specific value

 Denary - Base 10 integer digits-0 to 9

 Binary Systems - Base 2


o Possible bits (binary digits): 0 and 1
o All data and characters are represented in binary
128 64 32 16 8 4 2 1

0 1 0 0 0 0 0 1
 E.g. 65 in binary is 0100001

Hexadecimal Systems - Base 16


o Possible digits: 0 to 9 and A to F, where A to F represent denary digits 10 to 15

o Practical applications:
 Defining colours in HTML
 Defining Media Access Control (MAC) addresses
 Assembly languages and machine code
 Debugging via memory dumps

Converting Hexadecimal to Denary


o E.g. A5 in Denary = (16×10) + (1×5) = 165

Converting Denary to Hexadecimal


o E.g. 65 in Hexadecimal = 65÷16=4 Remainder 1∴ = 41

Binary Coded Decimal (BCD)

o Binary representation where each positive denary digit is represented by a sequence of 4 bits (nibble)

o Only certain digits are converted to BCD, because particular digits represent a digit greater than 9.

o Ex. 429 in BCD:


 Convert each digit to their binary equivalents
 4 = 0100 | 2 = 0010 |9 = 1001
Concatenate the 3 nibbles (4-bit group) to produce BCD: 0100 0010 1001

 Practical applications:
o A string of digits on any electronic device displaying numbers (eg. Calculators)
o Accurately measuring decimal fractions
o Electronically coding denary numbers
ASCII Extended ASCII Unicode

Superset for ASCII &


Only the English ASCII’s extension - Also
extended ASCII -
alphabets can be includes most European
recognized by various
represented languages’ alphabets
global languages

Each character encoding ASCII extended to 8 bits, Greater range of


takes up 7 bits, hence 128 hence 256 possible characters, as it uses 2 or 4
possible characters characters. bytes per character.

Sound

Sound is analogue, and for it to be converted to digital form, it is sampled

The sound waves are sampled at regular time intervals where the amplitude is measured. However, it
cannot be measured precisely, so approximate values are stored
How is Sound Recorded?
The amplitude of the sound wave is first determined at set time intervals
The value is converted to digital form
Each sample of the sound wave is then encoded as a series of binary digits
A series of readings gives an approximate representation of the sound wave
Sampling Resolution:

The number of bits per sample is known as the sampling resolution (aka bit depth)

Increasing the sampling resolution increases the accuracy of the sampled sound as more detail is stored
about the amplitude of the sound.

Increasing the sampling resolution also increases the memory usage of the file as more bits are being used
to store the data.
Sampling Rate

The sampling rate is the number of sound samples taken per second, which is measured in Hertz (Hz)

A higher sampling rate would allow more accurate sound as fewer estimations will be done between
samples.

Images
Bitmap Images

Bitmap images are made up of pixels


A bitmap image is stored in a computer as a series of binary numbers
Colour Depth

The number of bits representing each colour is called the colour depth.
An 8-bit colour depth means that each pixel can be one of 256 colours (because 2 to the power of 8 = 256)

A 1-bit colour depth means each pixel can store one colour (because 2 to the power of 1 is 2) - ( This is
done as the bit can either be 0 or 1, with 0 being white and 1 being black)
Increasing colour depth increases the size of the file when storing an image.
Run-Length Encoding

It reduces the size of a string of adjacent, identical data (e.g. repeated colours in an image)

A repeating string is encoded into two values: the first value represents the number of identical data items
(e.g. characters), and the second value represents the code of the data item (such as ASCII code if it is a
keyboard character), e.g. ‘aaaaabbbbccddddd’ becomes “05 97 04 98 02 99 05 100.”
RLE is only effective where there is a long run of repeated units/bits
One difficulty is that RLE compression isn't perfect for strings like "cdcdcdcdcd".

Lossy File Compression


The file compression algorithm eliminates unnecessary data bits like in MP3 and JPEG formats.
It is impossible to get the original file back once it is compressed
Reduces file quality.

Unit 7: Algorithm Design and Problem Solving

Program Development Life Cycle (PDLC)

 Analysis

 Design

 Coding

 Testing

 Maintenance

Analysis

 Before solving a problem, it is essential to define and document the problem clearly, known as the

"requirements specification" for the program.

 The analysis stage involves using tools like abstraction and decomposition to identify the specific

requirements for the program.

 Abstraction focuses on the essential elements needed for the solution while eliminating unnecessary details

and information.

 Decomposition involves breaking down complex problems into smaller, more manageable parts that can be

solved individually.

 Daily tasks can be decomposed into constituent parts for easier understanding and solving.
Pseudocode & Flowcharts

 Pseudocode - Verbal representation of an algorithm (a process or set of steps) and flowcharts are a

diagrammatic representation.

 Flowcharts: A flowchart shows diagrammatically the steps required to complete a task and the order that

they are to be performed

 Algorithm: These steps, together with the order, are called an algorithm

Data Type Purpose / Description Example Values


INTEGER Whole numbers (positive -10, 0, 35
or negative)
REAL Numbers with decimal 3.14, -0.75, 100.0
points
BOOLEAN Stores logical values TRUE, FALSE
CHAR A single character 'A', '3', '$'
STRING A sequence of characters "Hello", "123abc"
CASE…OF…OTHERWISE…ENDCASE – Multiple conditions and corresponding consequences(SIMILAR

TO IF-ELSE)

Note: IF-ELSE/ CASE OF are SELECTION

Loop Structures: (Also known as Iteration)

FOR…TO…NEXT : Count-Controlled Loop; Will run for a determined/known amount of times

REPEAT… UNTIL : Post-condition Loop; Will run at least once till condition is satisfied; Verification is

done after running code. Here, the Condition has to be TRUE to stop the loop.

WHILE…DO…ENDWHILE – Pre-Condition Loop; May not ever run; Verification is done before running

code. Here, the

Condition has to be TRUE to continue the loop.

Test Data-It refers to input values that helps identify errors and assess how the program handles different

scenarios

Normal Data
 Normal data is the test data which accepts values in acceptable range of values of the program

 e.g. in a program where only whole number values ranging from 0 to 100 (inclusive) are accepted, normal

test data will be : 23, 54, 64 , 2 and 100

Abnormal Data
 Test data that would be rejected by the solution as not suitable, if the solution is working properly is called

abnormal test data / erroneous test data.

 e.g. in a program where only whole number values ranging from 0 to 100 (inclusive) are accepted,

abnormal data will be: -1, 151, 200, 67.2, “Sixty-Two” and -520
Ask students to input their age. Validate the age of students. The allowed range of age is 12 yrs to
15 yrs old. If the student enters an age, outside the range, ask them to enter again.

Type of Validation Check- Range Check


REPEAT
INPUT Age
UNTIL Age>=12 AND Age<=18

Example of Verification Check-

REPEAT
INPUT try1, try2
UNTIL try1=try2

Unit 2: Data Transmission


What is a Packet?

 A packet is a small unit of data used in network transmission.


 Header: Contains sender IP, receiver IP, and packet number.
 Payload: Contains the actual data being transmitted.
 Trailer: Marks the end of the packet and includes error checking methods.

Packet Switching:

 Data is divided into multiple packets.


 Each packet can take a different route through the network.
 A router:
o Examines each packet’s destination address.
o Sends it via the fastest route.
 Once all packets arrive, they are reordered at the destination.

Methods of Transmission

Type Description

Serial Sends data 1 bit at a time over a single wire.

Parallel Sends multiple bits at once using multiple wires.

Simplex Data flows one way only.

Half-Duplex Data flows both ways, but one direction at a time.

Full-Duplex Data flows both ways at the same time.

Advantages & Use


Serial Parallel

Less chance of interference Quick transmission for short distances

No signal skewing No need to convert to serial inside PC

Cheaper and simpler Used for communication between PC components

Good for long-distance communication Limited to 5 meters


Parity Block Check (2D Parity)

 Combines row and column parity.


 Creates a grid of bits with:
o Row parity: parity bits for each row (i.e., individual data bytes)
o Column parity: a parity byte for each bit position (like parity byte)

Example(Assuming even Parity):


Row Bit 1 Bit 2 Bit 3 Bit 
Parity 4
Byte 1 0 1 0 0 1
Byte 2 1 1 1 1 0
Byte 3 1 0 1 0 0
Col P. 0 0 0 1 1
If one bit is corrupted, both the row and column parity fail — helps identify and locate the error.

Feature Parity Bit (Single) Parity Block Check (2D Parity)

Works on Single byte Grid of bytes

Extra data added 1 bit per byte 1 bit per row + 1 byte for columns

Error detection 1-bit errors only Detects and locates single-bit errors

Complexity Very simple More complex

Common use Low-level protocols Memory (RAM), communication systems

2. Checksum

 A calculated value (e.g., mod 11) is added to the data.


 Receiver recalculates and compares.
 If values match → No error; otherwise → Error detected.

3. Echo Check

 Receiver sends the data back to the sender.


 Sender compares sent data with returned data.
 Disadvantage: Slow and retransmission itself may be corrupted.

4. Automatic Repeat Request (ARQ)

ARQ is a method used to ensure error-free data transmission by retransmitting data when an error is
detected.

 If an error is detected in transmitted data, ARQ triggers retransmission.


 There are two types of acknowledgements:
o ✅ Positive Acknowledgement
o ❌ Negative Acknowledgement
 A timer is used to monitor the response time.

Positive Acknowledgement (ACK)

1. A timer is started.
2. Sender sends the first packet.
3. Receiver checks for errors in the received packet.
18

Recap of All Error Detection Methods (Summary Table)

Method Detects Extra Data Sent Strengths Weaknesses

Parity Bit 1-bit errors 1 bit per byte Simple, fast Fails if even number of bits flip

Some multi- Detects column-based Cannot detect all multi-bit


Parity Byte 1 byte per group
bit errors errors

Parity Single-bit 1 bit per row + 1 Locates exact bit error in


More complex
Block errors byte grid

Very common in network Can be bypassed by cleverly


Checksum Most errors 1 checksum value
protocols altered data

Echo None (retransmit Slow, prone to retransmission


Single errors Simple to implement
Check data) errors

Resends entire data Highly accurate, Time-consuming, high


ARQ All errors
block guarantees integrity overhead

1 digit with the Cannot detect transmission


Check Digit Entry errors Useful in barcodes, ISBNs
number errors

Encryption

Why Encrypt?

 To protect sensitive data if packets are intercepted.


 Plain text is encrypted to form cipher text.
 Decryption requires a key.

Types of Encryption

Type Description

Symmetric Same key is used for encryption and decryption. Key and data must be sent
Encryption separately. Suitable for small-scale use. Less secure.

Uses a public key for encryption and a private key for decryption. Even if the public
Asymmetric
key is intercepted, decryption is not possible without the private key. More secure,
Encryption
used on larger scale.
20
22
24
26
28

Unit 7: Algorithm Design and Problem Solving

1. This is an algorithm to find if a batch of parts has been manufactured successfully.


30
32

3. What are the stages of Program Development Life Cycle? Describe two features of each stage.

Stage 1…………………………………………………………………………………………………………..

Description………………………………………………………………………………………………………

……………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………….

Stage 2…………………………………………………………………………………………………………..

Description………………………………………………………………………………………………………

……………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………….

Stage 3…………………………………………………………………………………………………………..

Description………………………………………………………………………………………………………

……………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………….

Stage 4…………………………………………………………………………………………………………..

Description………………………………………………………………………………………………………

……………………………………………………………………………………………………………………
34

(e) Explain how ARQ can be used in error detection. [4]


36

(c) Identify one benefit and one application of each of the following data transmission. [4]
Benefit Application
Serial

Parallel
38

5
.

6
.
1

DELHI PUBLIC SCHOOL


Nacharam
Cambridge International Education
AY 2025 - 2026
Worksheet Worksheet No.: DPSNH

COMPUTER SCIENCE Subject Code: 0478


Paper: P2 Month: August
Paper Type: Pseudocode Duration: 60 minutes

Candidate Name: Grade: 9 Section:

Centre Number: Candidate Number:

Chapter / Unit: Unit 7


Concept in Focus: Pseudocode(Selection/Iteration)

______________________________________________________________________________________________

1. Write a pseudocode for the following problem:


 Input a temperature value in Celsius.
 Input the user's choice for conversion:

 If the choice is 1, convert the temperature to Fahrenheit and display it.


 If the choice is 2, convert the temperature to Kelvin and display it.
 Otherwise, display an error message indicating an invalid choice.

You can use the following formulas for conversion:


C / 5 = (F – 32 ) / 9
K = C + 273

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………
3

3. Write an algorithm to input ages of individuals to determine voting eligibility. A person is eligible to
vote if they are 18 years old or older. The input ends when the user enters a value of -99. There are
three Categories of Voters: Category 1: 18-35 Category 2: 36 -70 Category 3: Above 70 Count and
output the number of eligible voters and the category that has the maximum number of eligible
voters.

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………

……………………………………………………………………………………………………
1

DELHI PUBLIC SCHOOL


Nacharam
Cambridge International Education
AY 2025 - 2026
Worksheet Worksheet No.: DPSNH

COMPUTER SCIENCE Subject Code: 0478


Paper: Paper-II Month: August
Paper Type: Revision Duration: 60 minutes

Candidate Name: Grade: IGCSE Section:

Centre Number: Candidate Number:

Chapter / Unit: Unit 7


Concept in Focus: Test Data, Validation Checks, Verification Checks
______________________________________________________________________________________________

1. Tick one box:

2. Answer the following:


3

5. A programmer is designing an algorithm to calculate the cost of a length of rope.


5
2

Identify the three errors in the pseudocode and suggest corrections.

2. This is an algorithm to find if a batch of parts has been manufactured successfully.


4

3. This pseudocode should allow 500 marks to be entered into the algorithm. If the mark is 80 or greater it is
stored in an array for higher marks. If the mark is less than 80, but greater than or equal to 50 it is stored in
an array for middle marks. The remaining marks are stored in an array for lower marks. The results from
the algorithm are displayed at the end.

(a) Identify the four errors in the pseudocode and suggest a correction for each error.

Error1……………………………………………………………………………………………………………
Correction………………………………………………………………………………………………………
……………………………………………………………………………………………………………………
Error2……………………………………………………………………………………………………………
……………………………………………………………………………………………………………………
Correction………………………………………………………………………………………………………
……………………………………………………………………………………………………………………
Error3……………………………………………………………………………………………………………
……………………………………………………………………………………………………………………
Correction………………………………………………………………………………………………………
……………………………………………………………………………………………………………………
Error4……………………………………………………………………………………………………………
……………………………………………………………………………………………………………………
Correction………………………………………………………………………………………………………
……………………………………………………………………………………………………………………
6

5. This flowchart represents an algorithm to find the average size of groups of visitors to an attraction.

You might also like