0% found this document useful (0 votes)
88 views18 pages

CAIE-IGCSE-Computer Science - Practical

The document provides a comprehensive overview of the CAIE IGCSE Computer Science syllabus, focusing on algorithm design, problem-solving, and program development life cycle (PDLC). It covers essential concepts such as analysis, design, coding, testing, and maintenance, along with documentation methods like pseudocode and flowcharts. Additionally, it discusses data types, test data, and validation techniques to ensure effective program functionality.

Uploaded by

atharvapandey
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)
88 views18 pages

CAIE-IGCSE-Computer Science - Practical

The document provides a comprehensive overview of the CAIE IGCSE Computer Science syllabus, focusing on algorithm design, problem-solving, and program development life cycle (PDLC). It covers essential concepts such as analysis, design, coding, testing, and maintenance, along with documentation methods like pseudocode and flowcharts. Additionally, it discusses data types, test data, and validation techniques to ensure effective program functionality.

Uploaded by

atharvapandey
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/ 18

ZNOTES.

ORG

UPDATED TO 2023-2025 SYLLABUS

CAIE IGCSE
COMPUTER SCIENCE
SUMMARIZED NOTES ON THE THEORY SYLLABUS
Prepared for Atharva for personal use only.
CAIE IGCSE COMPUTER SCIENCE

The program or set of programs is developed based on


1. Algorithm Design & the design.
Each module of the program is written using a suitable
Problem-Solving programming language.
Testing is conducted to ensure that each module
functions correctly.
1.1. Program Development Life Cycle Iterative testing is performed, which involves conducting
(PDLC) modular tests, making code amendments if necessary,
and repeating tests until the module meets the required
Analysis functionality.
Design
Coding Testing
Testing
Maintenance The completed program or set of programs is executed
multiple times using various test data sets.
Analysis This testing process ensures that all the tasks within the
program work together as specified in the program
Before solving a problem, it is essential to define and design.
document the problem clearly, known as the Running the program with different test data can identify
"requirements specification" for the program. and address potential issues and errors.
The analysis stage involves using tools like abstraction The testing phase aims to verify the overall functionality
and decomposition to identify the specific requirements and performance of the program by evaluating its
for the program. behaviour with various inputs.
Abstraction focuses on the essential elements needed
for the solution while eliminating unnecessary details 1.2. Structure Diagrams
and information.
Decomposition involves breaking down complex Every computer system is made up of sub-systems,
problems into smaller, more manageable parts that can which are in turn made up of further sub-systems.
be solved individually. Structure Diagrams – The breaking down of a computer
Daily tasks can be decomposed into constituent parts for system into sub-systems, then breaking each sub-system
easier understanding and solving. into smaller sub-systems until each one only performs a
single action. A structure diagram diagrammatically
Design represents a top-down design. Example below.
The program specification derived from the analysis
stage is used as a guide for program development.
During the design stage, the programmer should clearly
understand the tasks to be completed, the methods for
performing each task, and how the tasks will work
together.
Documentation methods such as structure charts,
flowcharts, and pseudocode can be used to document
the program's design formally. 1.3. Pseudocode & Flowcharts
Coding and iterative testing

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

Pseudocode - Verbal representation of an algorithm (a Declaration & Usage of Variables & Constants
process or set of steps) and flowcharts are a Variable – Store of data which changes during
diagrammatic representation. execution of the program (due to user input)
Flowcharts: A flowchart shows diagrammatically the Constant – Store of data that remains the same
steps required to complete a task and the order that during the execution of the program
they are to be performed Basic Data Types
Algorithm: These steps, together with the order, are Integer – Whole Number e.g. 2; 8; 100
called an algorithm Real – Decimal Number e.g. 7.00; 5.64
Char – Single Character e.g. a; Y
String – Multiple Characters (Text) e.g. ZNotes; COOL
Boolean – Only 2 Values e.g. True/False; Yes/No; 0/1
Input & Output (READ & PRINT) – Used to receive and
display data to the user respectively. (It is recommended
to use input and output commands)
INPUT Name
OUTPUT "Hello Mr." , Name

// Alternatively //

READ Name
PRINT "Hello Mr," , Name
An example of a flowchart is given below from a past paper
question in which all of the functions of a flowchart are Declaration of variable - A variable/constant can be
shown: declared by the following manner

DECLARE [Variable Name] : [DATATYPE OF VARIABLE]

Array: Array is similar to variable but it can store


multiple values of same datatype under single name
DECLARE [ARRAYNAME] : ARRAY [Lower Limit : Upper Lim

Assignment - Each variable is assigned using a left


arrow.

[VARIABLE NAME] <---- [Value to be assigned]


ArrayName [IndexValue] <---- [Value to be assigned]

Conditional Statements:
This flowchart’s task is to check if a rider’s height is more the IF…THEN…ELSE…ENDIF
requirement (1.2) in this case. It then counts until the
accepted riders are 8. After they are 8, it outputs the
number of rejected riders and tells the rest that they are
ready to go!

2. Pseudocode

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

Loop Structures:
FOR…TO…NEXT : Will run for a determined/known

REPEAT… UNTIL – Will run at least once till condition is


satisfied; Verification is done after running code

CASE…OF…OTHERWISE…ENDCASE – Multiple conditions and


corresponding consequences \n

WHILE…DO…ENDWHILE – May not ever run; Verification


is done before running code

Note: When using conditions in these loop structures


and conditional statement, it has to be kept in mind that
it can be done in two ways.
1. use of a Boolean variable that can have the value
TRUE or FALSE
2. comparisons made by using coparison operators,
where comparisons are made from left to right

IF [BOOLEAN VARIABLE]
THEN
OUTCOME
ELSE
OUTCOME
ENDIF

IF ((CONDITION 1) OR ( CONDITION 2)) AND (CONDITION


THEN
OUTCOME
ELSE
OUTCOME
ENDIF

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

MaxiumumValue <--- Array[1] MinimumValue <--- Array[


2.1. FOR Counter ← 2 TO LoopLimit
IF Array[Counter] > MaximumValue
THEN
MaximumValue ← Array[Counter]
ENDIF

IF Array[Counter] < MinimumValue


THEN
MinimumValue ← Array[Counter]
ENDIF
NEXT Counter

// Average//

2.2. Standard methods used in Total ← 0


FOR Counter ← 1 TO NumberOfValues
algorithm: Total ← Total + StudentMark[Counter]
NEXT Counter
Totalling :Totalling means keeping a total that values are Average ← Total / NumberOfValues
added to
Linear Search: In a linear search, each item in the list is
Total ← 0 inspected sequentially until a match is found or the
FOR Counter ← 1 TO LoopLimit entire list is traversed.
Total ← Total + ValueToBeTotalled
NEXT Counter
INPUT Value
Counting: Keeping a count of the number of times an Found ← FALSE
action is performed is another standard method. Counter ← 0
REPEAT
PassCount ← 0
IF Value = Array[Counter]
FOR Counter ← 1 TO LoopLimit
THEN
INPUT Value
Found ← TRUE
IF Value > Range ELSE
THEN Counter ← Counter + 1
PassCount ← PassCount + 1
ENDIF
ENDIF
UNTIL Found OR Counter > NumberOfValues
NEXT Counter IF Found
THEN
Maximum, minimum and average : Finding the largest
OUTPUT Value , " found at position " , Counter, "
and smallest values in a list are two standard methods
ELSE
that are frequently found in algorithms
OUTPUT Value , " not found."
ENDIF

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

Bubble Sort: Iteratively compare and swap adjacent Test data that would be rejected by the solution as not
elements in a list to sort them. Start from the first suitable, if the solution is working properly is called
element and continue until the second-to-last element. abnormal test data / erroneous test data.
After each pass, the last element is in its correct place. e.g. in a program where only whole number values
However, other elements may still be unsorted. Repeat ranging from 0 to 100 (inclusive) are accepted, abnormal
the process, excluding the last element, until only one data will be: -1, 151, 200, 67.2, “Sixty-Two” and -520
element remains or no swaps are needed.

First ← 1
3.3. Extreme Data
Last ← 10
Extreme data are the largest and smallest values that
REPEAT
normal data can take
Swap ← FALSE
FOR Index ← First TO Last - 1
e.g. in a program where only whole number values
IF Array[Index] > Array[Index + 1]
ranging from 0 to 100 (inclusive) are accepted, extreme
THEN
data will be: 0 and 100
Temp ← Array[Index]
Array[Index] ← Array[Index + 1] 3.4. Boundary Data
Array[Index + 1] ← Temp
Swap ← TRUE This is used to establish where the largest and smallest
ENDIF values occur
NEXT Index At each boundary two values are required: one value is
Last ← Last - 1 accepted and the other value is rejected.
UNTIL (NOT Swap) OR Last = 1 e.g. in a program where only whole number values
ranging from 0 to 100 (inclusive) are accepted, one
example of boundary data will be: 100 and 101. 100 will
3. Test Data be accepted and 101 will not be accepted

Test data refers to input values used to evaluate and


assess the functionality and performance of a computer 4. Trace Table
program or system.
It helps identify errors and assess how the program A trace table is utilized to document the outcomes of
handles different scenarios every step in an algorithm. It is employed to record the
variable's value each time it undergoes a change.
A dry run refers to the manual process of systematically
3.1. Normal Data executing an algorithm by following each step in
Normal data is the test data which accepts values in sequence.
A trace table is set up with a column for each variable
acceptible range of values of the program
and a column for any output e.g.
Normal data should be used to work through the
solution to find the actual result(s) and see if they are the
same as the expected result(s)
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

3.2. Abnormal Data


Test data is employed to execute a dry run of the flowchart
and document the outcomes in a trace table. During the dry
run:

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

Whenever a variable's value changes, the new value is Trace tables can be used to trace errors in a program.
recorded in the respective column of the trace table. For example, if the requirement for the previous
Each time a value is outputted, it is displayed in the question would be to accept riders that are of height 1.2
output column. too, rather than rejecting them, then the error would
have been caught in the trace table as when 1.2 is
An example of trace table is given below using a past paper entered, it would increment rejected which it shouldn’t in
question: our example
Q: The flowchart below inputs the height of children who
want to ride on a rollercoaster. Children under 1.2 metres
are rejected. The ride starts when eight children have been 5. How to write an algorithm?
accepted.
The ability to write an algorithm is very important for
this syllabus and paper. Some key steps/points to be
known in-order to write the perfect algorithm are as
follows:

1. Make sure that the problem is clearly understood


which includes knowing the purpose of the algorithm
and the tasks to be completed by the algorithm.
2. Break the problem into smaller problems (e.g. in a
program which outputs average values, divide the
problem into multiple ones i.e. how to count the
number of iterations and how to count the total of all
values)
Complete the trace table for the input data: 1.4, 1.3, 1.1, 1.3, 3. Identify the data that is needed to be saved into
1.0, 1.5, 1.2, 1.3, 1.4, 1.3, 0.9, 1.5, 1.6, 1.0 variables/constants/arrays and what datatype it is,
Riders Reject Height OUTPUT and declare all the variables/constants/arrays
0 0 accordingly, with meaningfull names
1 1.4 4. Decide on how you are going to construct your
2 1.3
algorithm, either using a flowchart or pseudocode. If
you are told how to construct your algorithm, then
1 1.1
follow the guidance.
3 1.3
5. Construct your algorithm, making sure that it can be
2 1.0
easily read and understood by someone else. Take
4 1.5 particular care with syntax e.g. when conditions are
3 1.2 used for loops and selection.
5 1.3 6. Use several sets of test data (Normal, Abnormal and
6 1.4 Boundary) to dry run your algorithm and check if the
7 1.3 expected results are achieved (a trace table can be
4 0.9 used for this purpose) . If error is found, find the
8 1.5 Ready to go 4 point of error in the trace table and fix it in the code.

Note: The algorithms that you have looked at so far in these


4.1. Identifying errors: notes were not designed with readability in mind because
you needed to work out what the problem being solved was.

5.1. Validation and Verification

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
To ensure the acceptance of reasonable and accurate data
inputs, computer systems must thoroughly examine each Type check
data item before accepting it, and this is where Validation
and Verification come into play! A type check verifies that the entered data corresponds to a
specific data type.
Validation
OUTPUT "Enter the value "
Validation in computer systems involves automated checks REPEAT
to ensure the reasonableness of data before accepting it. If INPUT Value
the data is invalid, the system should provide an explanatory IF Value <> DIV(Value, 1)
message for rejection and allow another chance to enter the THEN
data. OUTPUT "This must be a whole number, please re-en
\n There are many types of it. ENDIF
UNTIL Value = DIV(Value, 1)
Range check
Presence check
A range check verifies that a numerical value falls within
specified upper and lower limits. A presence check checks to ensure that some data has been
entered and the value has not been left blank
REPEAT
INPUT Value OUTPUT "Please enter the value "
IF Value < MinimumValue OR Value > MaximumValue REPEAT
THEN INPUT Value
OUTPUT "The student's mark should be in the range" IF Value = ""
ENDIF THEN
UNTIL Value >= MinimumValue AND Value <= MaximumValu OUTPUT "*=Required "
ENDIF
Length check UNTIL Value <> ""

This can either ensure that data consists of a precise Format Check
number of characters.
A format check checks that the characters entered conform
OUTPUT "Please enter your value of ", Limit , " cha to a pre-defined pattern.
REPEAT
INPUT Value Check Digit
IF LENGTH(Value) <> Limit
THEN A check digit is the final digit included in a code; it is
OUTPUT "Your value must be exactly" , Limit ," cha calculated from all the other digits.
ENDIF Check digits are used for barcodes, product codes,
UNTIL LENGTH(Value) = Limit International Standard Book Numbers (ISBN), and
Vehicle Identification Numbers (VIN).
It can also check if the data entered is a reasonable number
of characters or not Verification
OUTPUT "Please enter your value " Verification is checking that data has been accurately copied
REPEAT from one source to another
INPUT Value There are 2 methods to verify data during entry ( there
IF LENGTH(Value) > UpperLimit OR LENGTH(Value) < Lo are other methods during data transfer, but they are in
THEN paper 1)
OUTPUT "Too short or too long, please re-enter "
ENDIF 1. Double Entry
UNTIL LENGTH(Value) <= UpperLimit AND LENGTH(Value)

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

Data is inputted twice, potentially by different operators. Different data types are assigned to computer systems
The computer system compares both entries and if they for effective processing and storage.
differ, an error message is displayed, prompting the data Data types allow data, such as numbers or characters, to
to be reentered. be stored appropriately.
Data types enable effective manipulation using
2. Screen/Visual check mathematical operators for numbers and character
concatenation.
A screen/visual check involves the user manually Some data types provide automatic validation.
reviewing the entered data. The types of datatypes are told in Chapter 1 already!
After data entry, the system displays the data on the
screen and prompts the user to confirm its accuracy Input and Output
before proceeding.
The user can compare the displayed data against a paper Programs require input and output statements to handle
document used as an input form or rely on their own data.
knowledge to verify correctness. In IGCSE Computer Science, algorithms and programs
are designed to take input from a keyboard and output
5.2. Programming Concepts to a screen.
Prompting the user with clear instructions for input is
Constructs of a Program necessary for the user to understand what is expected.
Input data in programming languages must match the
Data use – variables, constants and arrays required data type of the variable where it will be stored.
Sequence – order of steps in a task By default, inputs are treated as strings, but commands
Selection – choosing a path through a program can convert input to integer or real number data types.
Iteration – repetition of a sequence of steps in a program Users should be provided with information about the
Operators use arithmetic for calculations and logic and output/results for a program to be useful.
Boolean for decisions. Each output should be accompanied by a message
explaining the result's meaning or significance.
Variables and Constants If an output statement has multiple parts, they can be
separated by a separator character.
A variable within a computer program refers to a named
storage unit with a value that can be modified
throughout the program's execution. To enhance 6. File Handling
comprehension for others, it is advisable to assign
significant names to variables. Computer programs store data that will be needed again
A constant within a computer program represents a in a file.
named storage unit that holds a value which remains Data stored in RAM is volatile and will be lost when the
unchanged throughout the program's execution. Similar computer is powered off.
to variables, it is recommended to assign meaningful Data saved to a file is stored permanently, allowing it to
names to constants to enhance comprehensibility for be accessed by the same program at a later date or by
others. other programs.
Stored data in a file can be transferred and used on
Data Types other computers.
The storage of data in files is a commonly used feature in
programming.

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
Key point: When writing in a file, the program is
outputing the data to the file, and when reading a file, Programming language development systems often
the program in inputing the data from the file provide library routines that can be readily incorporated
\n There are 3 ways a file can be opened in a program i.e. to into programs.
write, to read and to append Library routines are pre-tested and ready for use, making
programming tasks easier.
Integrated Development Environments (IDEs) typically
6.1. Writing in a file include a standard library of functions and procedures.
Standard library routines perform various tasks,
OPENFILE "filename.txt" FOR WRITE
including string handling.
MOD – returns the remainder of a division
//When opening a file to write, all the data already
DIV – returns the quotient (i.e. the whole number part) of
a division
ROUND – returns a value rounded to a given number of
WRITEFILE "filename.txt" , Value
decimal places
RANDOM – returns a random number.
// The next command of WRITEFILE would be writen on
Examples:
CLOSEFILE "filename.txt"
Value1 <--- MOD(10,3) returns the remainder of 10
divided by 3
6.2. Reading a file: Value2 <---- DIV(10,3) returns the quotient of 10 divided
OPENFILE "filename.txt" FOR READ
by 3
READFILE "filename.txt" , Variable Value3 <--- ROUND(6.97354, 2) returns the value
// The value in the line (which is identified by the
rounded to 2 decimal places
CLOSEFILE "filename.txt"
Value4 <--- RANDOM() returns a random number
between 0 and 1 inclusive

6.3. Reading a file till EOF: 6.5. Creating a Maintainable Program


OPENFILE "filename.txt" FOR READ
DECLARE DataVariable : STRING
A maintainable program should:
WHILE NOT EOF("filename.txt) DO always use meaningful identifier names for variables,
READFILE "filename.txt", DataVariable constants, arrays, procedures and functions
// here the line can be outputted or stored in an a be divided into modules for each task using procedures
//before the file ends has been read and functions
ENDWHILE be fully commented using your programming language’s
commenting feature
6.4. Library Routines
Commenting in pseudocode:

// Now the text written is commented and thus ignore

""
This method can also be used to comment
multiple lines but the singular line method
is more widely accepted and reccomended too
""

7. Programming

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

Strings are used to store text and can contain various


7.1. Programming Languages characters.
An empty string has no characters, while the
There are many high-level programming languages to programming language specifies the maximum number
choose from. We will only be treating Python, Visual
of characters allowed.
Basic, or Java.
Characters in a string can be identified by their position
Python is an open-source, versatile programming number, starting from either zero or one, depending on
language that encourages quick program development the programming language.
and emphasises code readability. The integrated String handling is an important aspect of programming.
development environment (IDE) showcased in this In IGCSE Computer Science, you will need to write
chapter is referred to as IDLE. algorithms and programs for the following string
Visual Basic is a popular programming language that is methods:
extensively used for Windows development. The Length: Determines the number of characters in a
integrated development environment (IDE) featured in string, including spaces.
this chapter is known as Visual Studio, which is utilised Substring: Extracts a portion of a string.
for capturing screenshots. Upper: Converts all letters in a string to uppercase.
Java is a widely adopted programming language utilised Lower: Converts all letters in a string to lowercase.
by numerous developers. The integrated development These string manipulation methods are commonly
environment (IDE) employed for capturing screenshots in provided in programming languages through library
this chapter is known as BlueJ. routines.

Finding the length of a string:


7.2. Basic Concepts
LENGTH("Text Here")
When writing the steps required to solve a problem, the
following concepts need to be used and understood: LENGTH(Variable)

Sequence Extracting a substring from a string:


Selection
SUBSTRING("Computer Science", 10, 7)
Iteration
// returns the next 7 values starting from the 10th
Counting and totalling
SUBSTRING(Variable, Position, Length)
String handling
Use of operators. Converting a string to upper case
Sequence UCASE("Text here")

The ordering of the steps in an algorithm is very important. UCASE(Variable)


An incorrect order can lead to incorrect results and/or extra
steps that are not required by the task. Converting a string to lowercase

LCASE("Text Here")
Selection
Selection is a very useful technique, allowing different routes LCASE(Variable)
through the steps of a program. The code of this is explained
in the notes of previous chapters. Arithmetic, Logical and Boolean Operators

Iteration As explained in the previous chapter, we already

As explained in the previous chapter, we already Use of Nested Statements

Totalling and Counting


As explained in the previous chapter, we already

String Handling

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

Selection and iteration statements can be nested, When defining procedures and functions, the header is
meaning one statement can be placed inside another. the first statement in the definition.
Nested statements help reduce code duplication and The header includes:
simplify testing of programs. The name of the procedure or function.
Different types of constructs can be nested within each Parameters passed to the procedure or function,
other, such as selection statements within condition- along with their data types.
controlled loops or loops within other loops. The data type of the return value for a function.
Procedure calls are standalone statements.
Procedures and Functions Function calls are made as part of an expression,
typically on the right-hand side.
A procedure refers to a collection of programming
statements organized under a single name, invoked at Local and Global Variable
any given point in a program to execute a specific task.
A function is a compilation of programming statements Any part of a program can use a global variable – its
consolidated under a singular name, invoked at any scope covers the whole program
moment within a program to accomplish a particular A local variable can only be used by the part of the
task. Unlike a procedure, a function also has the program it is declared in – its scope is restricted to that
capability to return a value back to the main program. part of the program.
Parameters refer to variables that store the values of
arguments passed to a procedure or function. While not Note: Any variables/arrays made in this procedure and
all procedures and functions require parameters, some functions will be local and cannot be used out of these.
utilize them to facilitate their operations. To be made available all over the program, they must be
declared globally in the following way.
Procedures without parameters:
DECLARE [VariableName] : DataType AS GLOBAL
PROCEDURE ProcedureName ()
[Commands] 7.3. Arrays
ENDPROCEDURE
//Calling/running the procedure An array is a data structure containing several elements
CALL ProcedureName() of the same data type; these elements can be accessed
The procedure with parameters: using the same identifier name.
The position of each element in an array is identified
PROCEDURE ProcedureName (ParameterName : ParameterDa using the array’s index.
[Commands] There are two types of arrays
ENDPROCEDURE
//Calling/running the procedure One-Dimensional Array
CALL ProcedureName (ParameterValue)
Explained in the previous chapter in detail
Function:
Two-Dimensional Array
FUNCTION FunctionName (ParameterName : ParameterData
[Commands]
RETURN ValueToBeReturned
ENDFUNCTION

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE
A Output
A two-dimensional array can be referred to as a table 0 1
with rows and columns.
1 0

AND gate: A.B


A B Output
0 0 0
0 1 0
1 0 0
1 1 1
When a two-dimensional array is declared in
pseudocode, the first and last index values for rows and
the first and last index values for columns alongside the
data type are included.
Declaring a 2D Array: OR gate: A + B
DECLARE Name : ARRAY[RowLower:RowUpper,ColumnLower:C A B Output
0 0 0
Filling a 2-D array using a loop: 0 1 1
FOR ColumnCounter ← 0 TO 2 1 0 1
FOR RowCounter ← 0 TO 9 1 1 1
OUTPUT "Enter next value "
INPUT ArrayName [RowCounter, ColumnCounter]
NEXT RowCounter
NEXT ColumnCounter
NAND gate: A.B
8. Boolean Logic A
0
B
0
Output
1
0 1 1
8.1. Logic Gates and their functions 1 0 1
1 1 0
Six types of logic gates
NOT Gate
AND Gate
OR Gate
NAND Gate NOR gate: A + B
NOR Gate

XOR Gate A B Output


0 0 1
NOT gate: an inverter, A 0 1 0
1 0 0
1 1 0

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

9.4. Example of a LOGIC STATEMENT


(B AND C) OR (A NOR (A NAND C)) is the logic statement for
XOR gate: A ⨁ B​ the following Logic Circuit

A B Output
0 0 0
0 1 1
1 0 1
1 1 0

9. Writing Logic Statements 10. Creating Truth Tables


Logic Statements is a way of showing all the logics that are in
place for a logic circuit. 10.1. From Logic Circuits
9.1. Writing from a logic circuit 1. Create a truth table with each input possible, creating
every possible combination of inputs . Tip: For the
1. Look at the ciruit and go around the logic gates used first input, write it in the combination of 1,0,1,0
in the circuit and so on. For the second, go 1,1,0,0 and so on,
2. Go from the one output that is being given towards and for the third one, go 1,1,1,1,0,0,0,0 going by
the input the powers of 2 for each input. This would
3. Write the last gate ( the first gate you walk through ) guarantee each possible combination
in the middle and then, for each of the value coming 2. Run through the circuit with the inputs and get the
into the gate, leave space at the side output that will be reached and write it accordingly
4. If the value coming into the gate is coming from
another gate, use a bracket for the gate’s logic For logic statements, and problem statements,
5. Repeat process 3-4 till you are able to reach the input convert them to logic circuits first and then do the
values fully rest

9.2. Writing from a truth table 10.2. Example


1. Create logic circuit fom the truth table (shown later) This is the example of a truth table of a logic circuit
2. Write the logic statement using the ciruit

9.3. Writing from a Problem statement


1. See what logics go in place in the statement to take
place
2. Go from the logic of any 2 inputs at the start, and
then keep on going until you are able to reach the
final gate which gives the output
3. When writing the statement, make sure you show the
logic statement where the output is 1

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

12. Exam-Style Question

The circuit:

1. The Conditions are given so make logic statements


using the conditions and the table. (NOT S AND T) OR
(S AND W) OR (NOT T AND W)
2. Make the logic circuit from the given equation
3. Make the truth table

11. Logic Statements from 13. Databases


Truth Tables A database is a well-organized compilation of data that
enables individuals to retrieve information according to their
specific requirements. The data contained within a database
can encompass various forms such as text, numerical
values, images, or any other type of digital content that can
be stored on a computer system.

13.1. Why do we need a database?


To store data about people, things, and events.
Any modifications or additions need to be made only
once, ensuring data consistency.
All users access and utilize the same set of data,
promoting uniformity.
1. Given the truth table above, take the rows where the Relational databases store data in a non-repetitive
output (x) is 1 (Rows 1, 2, 4, 5, 6, 7) manner, eliminating duplication.
2. Create a logic expression from these rows (example,
row 1 will be (NOT A AND NOT B AND NOT C) = X
3. Create logic expressions for all the rows with output
13.2. What makes a database?
1 and connect them with OR gate

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

Data is stored in tables in databases. Each table consists


of a specific type of data e.g. cars. These tables HAVE to
be named according to what they contain e.g. a table
containing patient information will be PATIENT
These tables consist of records (rows). Each record
consists of data about a single entity (a single item,
person or event ) e.g. a single car
These tables also have columns that are knows an fields. Note: Access datatype refers to the software Microsoft
These consist of specific information regarding the Access which is a DBMS (DataBase Management
entities that are written later in records e.g. car name, System). Here, databases could be worked upon in
car manufacturer etc. practical form
Note: In this chapter, skills of dealing with a database
are also required so working with Microsoft Access is 13.5. Primary Key
needed to understand this chapter better. You have to be
able to define a single-table database from given data Each record in a table represents a unique item, person,
storage requirements, choose a suitable primary key for a or event.
database table and also be able to read, complete and To ensure reliable identification of these items, a field
understand SQL scripts. called the primary key is necessary.
The primary key is a unique field that distinguishes each
item within the data.
In order to serve as a primary key, a field must have
values that are never repeated within the table.
An existing field can serve as a primary key if it is unique,
such as the ISBN in the book table.
In cases where all existing fields may contain repeated
data, an additional field, such as "HospitalNumber," can
be added to each record to serve as the primary key.
Source: Cambridge IGCSE and O Level Computer Science by
Hodder Education 13.6. Structured Query Language - SQL
13.3. Validation in databases Structured Query Language (SQL) is the standard
language for writing scripts to retrieve valuable
Database management software automatically provides information from databases.
some validation checks, while others need to be set up By using SQL, we can learn how to retrieve and display
by the developer during construction. specific information needed from a database.
For example; The software automatically validates fields For instance, someone visiting a patient may only require
like "DateOfAdmission" in the PATIENT table to ensure the ward number and bed number to locate them in the
data input is a valid date. \n hospital, while a consultant may need a list of the names
of all the patients under their care. This can be done
using SQL
13.4. Basic Data Types
SQL Scripts
Each field will require a data type to be selected. A data type
classifies how the data is stored, displayed and the
operations that can be performed on the stored value.
The datatypes for database are quite similar to original
datatypes, however, there are a few differences.

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE COMPUTER SCIENCE

An SQL script is a collection of SQL commands that are


used to perform a specific task, often stored in a file for 13.7. Operators
reusability.
To comprehend SQL and interpret the output of an SQL Just like pseudocode, the operators used there can also be
used here for conditions, however, a few more are also used
script, practical experience in writing SQL scripts is
in databases
necessary.
Select Statements:

SELECT (fieldsname)
FROM (tablesname)
WHERE (condition)
ORDER BY (sortingcondition) ;

Selecting Sum of values in a table:

SELECT SUM ( fieldsname )


FROM (tablesname)
WHERE (condition)
ORDER BY (sortingcondition) ;

Counting the number of records where the field


matches a specified condition

SELECT COUNT ( fieldsname )


FROM (tablesname)
WHERE (condition)
ORDER BY (sortingcondition) ;

==ORDER BY Field1, Field2, etc. – this specifies a sort in


ascending or alphabetical order starting with the first
field.==
==ORDER BY Field1, Field2 DESC – this specifies a sort in
descending or reverse alphabetical order starting with the
first field.==
Note: ORDER BY is not necessary to add. It has to be only
added if required!

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by Atharva at Dps on 10/01/25.
CAIE IGCSE
Computer Science

© ZNotes Education Ltd. & ZNotes Foundation 2024. All rights reserved.
This version was created by Atharva on Fri Jan 10 2025 for strictly personal use only.
These notes have been created by Abdullah Aamir, Abhiram Mydi and Shriram Srinivas for the 2023-2025 syllabus.
The document contains images and excerpts of text from educational resources available on the internet and printed books.
If you are the owner of such media, test or visual, utilized in this document and do not accept its usage then we urge you to contact us
and we would immediately replace said media. No part of this document may be copied or re-uploaded to another website.
Under no conditions may this document be distributed under the name of false author(s) or sold for financial gain.
"ZNotes" and the ZNotes logo are trademarks of ZNotes Education Limited (registration UK00003478331).

You might also like