Cambridge IGCSE Computer Science Second Edition I.
- The Cambridge IGCSE™ and O Level Computer Science series includes a Student’s Book, Boost eBook, two Workbooks, and a Teacher’s Guide with Boost Subscription.
- The Teacher’s Guide includes a print handbook and a subscription to Boost, offering online resources.
- Boost provides a range of online resources to support teaching, including a scheme of work, answers for Student’s Book activities and exam-style questions, electronic solutions for programming activities, and answers for both workbooks.
- It also offers vocabulary flashcards for ESL learners and automated PowerPoint presentations to tackle technical concepts.
Introduction
- This book is designed for students of Cambridge IGCSE™ Computer Science (0478/0984) and Cambridge O Level Computer Science (2210) for examination from 2023.
- It covers syllabus content, provides guidance, and helps students prepare for examinations.
Assessment
- There are two examination papers:
- Paper 1: Computer Systems (1 hour 45 minutes, 75 marks, 50% of overall marks, Syllabus topics 1–6)
- Paper 2: Algorithms, Programming and Logic (1 hour 45 minutes, 75 marks, 50% of overall marks, Syllabus topics 7–10)
How to use this book
- The content is organized into 10 chapters, corresponding to the syllabus, with content in the same order as the syllabus.
- Chapters 1–6 cover Computer Systems.
- Chapters 7–10 cover Algorithms, Programming, and Logic.
Features
- Learning Outline: Each chapter begins with an outline of the subject material to be covered.
- Chapter Introduction: A short introduction to the chapter topics and their focus.
- Activity: Short questions and exercises to help recap and confirm knowledge.
- Example: Worked examples of technical or mathematical techniques.
- Find out more: Activities that go a bit beyond the syllabus for deeper interest.
- Advice: Tips and background information.
- Links: States where relevant material is covered elsewhere in the book.
- Extension: Details of more sophisticated topics that are explored in the International A Level syllabus.
- Summary: A list of the main points from the chapter.
- Key terms: Definitions.
- Exam-style questions: To help with preparation for examination.
Pseudocode and programming languages
- Pseudocode syntax will be used along with one of the following high-level programming languages: Python, VB.NET or Java.
SECTION 1 COMPUTER SYSTEMS
- Chapters:
- 1 Data representation
- 2 Data transmission
- 3 Hardware
- 4 Software
- 5 The internet and its uses
- 6 Automated and emerging technologies
Data representation
- In this chapter you will learn about:
- number systems
- how and why computers use binary to represent data
- the denary, binary and hexadecimal number systems
- converting numbers between denary, binary and hexadecimal
- how and why hexadecimal is used for data representation
- how to add two positive 8-bit numbers
- overflow when performing binary addition
- logical binary shifts on positive 8-bit integers
- two’s complement notation to represent positive and negative binary numbers
- text, sound and images
- how and why a computer represents text
- the use of character sets including ASCII and Unicode
- how and why a computer represents sound
- sound sample rate and sample resolution
- how and why a computer represents an image
- the effects of the resolution and colour depth on images
- data storage and compression
- how data storage is measured
- calculating the file size of an image and sound file
- the purpose of and need for data compression
- lossy and lossless compression.
1.1 Number systems
- 1.1.1 Binary represents data: basic building block in all computers is the binary number system.
- This system is chosen because it only consists of 1s and 0s.
- Switches used in a computer make use of logic gates are used to store and process data.
- 1.1.2 Binary, denary and hexadecimal systems: binary number system is a base 2 number system.
- Denary number system which counts in multiples of 10; base 10 number system.
- Denary uses ten separate digits, 0-9, to represent all values.
- Only the two ‘values’ 0 and 1 can be used in binary to represent all values.
- Converting from binary to denary: relatively straightforward process; each time a 1-value appears in a binary number column, the column value (heading) is added to a total.
- Converting from denary to binary: two different ways.
- The first method involves successive subtraction of powers of 2 (that is, 128, 64, 32, 16, and so on).
- whilst the second method involves successive division by 2 until the value “0” is reached.
- The hexadecimal system: base 16 system.
- Numbers 0 to 9 and the letters A to F are used to represent each hexadecimal (hex) digit.
- Since 16=24 FOUR binary digits are equivalent to each hexadecimal digit.
- Converting from binary to hexadecimal: fairly easy process; starting from the right and moving left, split the binary number into groups of 4 bits.
- If the last group has less than 4 bits, then simply fill in with 0s from the left. Take each group of 4 bits and convert it into the equivalent hexadecimal digit.
- Converting from hexadecimal to binary: Using the data in a table, simply take each hexadecimal digit and write down the 4-bit code which corresponds to the digit.
- Converting from hexadecimal to denary: values headings of each hexadecimal digit (i.e. 4096, 256, 16 and 1).
- Take each of the hexadecimal digits and multiply it by the heading values add all the resultant totals together to give the denary number.
- Converting from denary to hexadecimal: involves successive division by 16 until the value “0” is reached.
- 1.1.3 Use of the hexadecimal system: computer can only work with binary data; whilst computer scientists can work with binary, they find hexadecimal to be more convenient to use.
- This is because one hex digit represents four binary digits.
- Reviews uses of the hexadecimal system: error codes, MAC addresses, IPv6 addresses, HTML colour codes.
- Error codes: often shown as hexadecimal values; these numbers refer to the memory location of the error and are usually automatically generated by the computer.
- Media Access Control (MAC) addresses: refers to a number which uniquely identifies a device on a network. The MAC address refers to the network interface card (NIC) which is part of the device.
- A MAC address is usually made up of 48 bits which are shown as 6 groups of two hexadecimal digits.
- NN – NN – NN – DD – DD – DD or NN:NN:NN:DD:DD:DD where the first half (NN – NN – NN) is the identity number of the manufacturer of the device and the second half (DD – DD – DD) is the serial number of the device.
- Internet Protocol (IP) addresses: Each device connected to a network is given an address known as the Internet Protocol (IP) address.
- An IPv4 address is a 32-bit number written in denary or hexadecimal form; e.g. 109.108.158.1 (or 77.76.9e.01 in hex).
- An IPv6 address is a 128-bit number broken down into 16-bit chunks represented by a hexadecimal number; e.g. a8fb:7a88:fff0:0fff:3d21:2085:66fb:f0fa
- IPv6 uses a colon (:) rather than a decimal point (.) as used in IPv4.
- HyperText Mark-up Language (HTML) colour codes: HyperText Mark-up Language (HTML) is used when writing and developing web pages.
- All colours can be made up of different combinations of the three primary colours (red, green and blue).
- The different intensity of each colour (red, green and blue) is determined by its hexadecimal value. This means different hexadecimal values represent different colours.
- # FF 00 00 represents primary colour red
- # 00 FF 00 represents primary colour green
- # 00 00 FF represents primary colour blue
- # FF 00 FF represents fuchsia…
- producing almost any colour the user wants
- 1.1.4 Addition of binary numbers: the addition of two 8-bit positive binary numbers. Note the following key facts when carrying out addition of two binary digits:
\begin{array}{|c|c|c|}
\hline
binary~addition & carry & sum \\
\hline
0 + 0 & 0 & 0 \\
0 + 1 & 0 & 1 \\
1 + 0 & 0 & 1 \\
1 + 1 & 1 & 0 \\
\hline
\end{array}
- Overflow: generation of a 9th bit is a clear indication that the sum has exceeded this value; this is known as an overflow error and in this case is an indication that a number is too big to be stored in the computer using 8 bits.
- 1.1.5 Logical binary shifts: Computers can carry out a logical shift on a sequence of binary numbers. The logical shift means moving the binary number to the left or to the right.
- Each shift left is equivalent to multiplying the binary number by 2 and each shift right is equivalent to dividing the binary number by 2.
- 1.1.6 Two’s complement (binary numbers): this section will again assume 8-bit registers are being used.
- Only one minor change to the binary headings needs to be introduced here:
- –128 64 32 16 8 4 2 1
- In two’s complement the left-most bit is changed to a negative value. For instance, for an 8-bit number, the value 128 is now changed to −128, but all the other headings remain the same.
1.2 Text, sound and images
- 1.2.1 Character sets – ASCII code and Unicode: The ASCII code system (American Standard Code for Information Interchange) was set up in 1963 for use in communication systems and computer systems.
- ASCII code has a number of disadvantages. The main disadvantage is that it does not represent characters in non-Western languages, for example Chinese characters.
- One coding system is called Unicode; can represent all languages of the world- supports many operating systems, search engines and internet browsers used globally.
- 1.2.2 Representation of sound: Sound waves are vibrations in the air; the human ear senses these vibrations and interprets them as sound.
- Sound waves vary continuously. Sound is analogue. Computers cannot work with analogue data, so need to be sampled in order to be stored in a computer.
- Sampling means measuring the amplitude of the sound wave. This is done using an analogue to digital converter (ADC).
- Sampling rate is the number of sound samples taken per second; measured in hertz (Hz), where 1Hz means ‘one sample per second’.
- 1.2.3 Representation of Bitmap Images: number of bits used to represent each colour is called the colour depth. Image resolution refers to the number of pixels that make up an image.
1.3 Data storage and file compression
- 1.3.1 Measurement of data storage: bit is the basic unit of all computing memory storage terms and is either 1 or 0.
- The byte is the smallest unit of memory in a computer; 1 byte is 8 bits.
- A 4-bit number is called a nibble – half a byte. 1 byte of memory wouldn’t allow you to store very much information.
- Internal memories (such as RAM and ROM) should be measured using the IEC system
- 1.3.2 Calculation of file size: file size required to hold a bitmap image and a sound sample.
- 1.3.3 Data compression: To save storage space on devices such as the hard disk drive/solid state drive.
- To reduce the time taken to stream a music or video file/upload, download or transfer a file across a network reduced file size also reduces costs.
- 1.3.4 Lossy and Lossless File Compression: File compression can either be lossless (all the data from the original uncompressed file can be reconstructed) or lossy (file compression algorithm eliminates unnecessary data from the file).
- Common lossy file compression algorithms are: MPEG-3 (MP3) and MPEG-4 (MP4) JPEG.
- Lossless file compression uses run-length encoding (RLE) can be used for lossless compression of text and images.