Skip to content
Cambridge IGCSE0984

Number systems

Computer Science 0984 Chapter Notes

Last updated November 2026

What this chapter covers

Text, sound and imagesData storage and compression
ShareWhatsAppPost

Number systems notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Number systems notes as text: skim, search, and jump between subtopics.

~31 min read

1. Why computers use binary

Any form of data needs to be converted to binary before a computer can process it. Text, images and sound are all stored as binary.

Data is processed using logic gates and stored in registers. A logic gate can only be set as a binary number.

Worked example 11 mark

Data is converted to binary to be stored by a computer.

(c) Tick one box to show the correct statement about why data is converted to binary for storing in a computer.

Statement
ABinary uses numbers and characters to store all the data.
BBinary is one type of data that a computer can store.
CData is processed by logic gates that can only be set as binary numbers.
DOnly binary numbers can be input into a computer.
  1. 1

    C: data is processed by logic gates that can only be set as binary numbers [1]

2. Denary, binary and hexadecimal

Denary is a base 10 system. Binary is a base 2 system. Hexadecimal is a base 16 system. Hexadecimal uses the digits 0 to 9 and the letters A to F, where A to F stand for 10 to 15.

To convert binary to denary, add the place values of the 1s. In 8 bits the place values are 128, 64, 32, 16, 8, 4, 2, 1. To convert hexadecimal to denary, multiply each digit by its place value: 256, 16, 1.

To convert between binary and hexadecimal, work in groups of four bits (nibbles). Each nibble is one hexadecimal digit. Keep the leading zeros so an 8-bit answer has 8 bits.

10010110₂ = 128 + 16 + 4 + 2 = 150

0A2₁₆ = (10 × 16) + 2 = 162

1111 0000 1000₂ = F08₁₆

Examiner insight

“It would be helpful for candidates to understand that values 10 to 15 are represented with a character value of A to F.” “Some candidates did not include leading zeros.”

Worked example 12 marks

(a) Convert the denary number 150 into an 8-bit binary number.

(b) Convert the hexadecimal number F08 into a 12-bit binary number.

  1. 1

    (a) 150 = 128 + 16 + 4 + 2, so 10010110 [1]

  2. 2

    (b) F = 1111, 0 = 0000, 8 = 1000, so 1111 0000 1000 [1]

3. Why hexadecimal is used

Hexadecimal is a shorter representation of binary. One hexadecimal digit stands for four bits.

It is easier to read and understand than binary, and easier to debug. It uses less screen space than binary. It is used where people read binary values, for example error codes, MAC addresses and HTML colour codes.

The computer still stores the value as binary, so hexadecimal does not save storage space.

Examiner insight

“The most common incorrect answer was ‘uses less storage space’. It would be beneficial for candidates to understand that hexadecimal will be stored as a binary value, so no storage space will be saved.” “It would be beneficial for candidates to understand that the use of hexadecimal is for ease of understanding for the user, and that it does not make things any easier to understand for the computer.”

Worked example 13 marks

A video streaming service uses hexadecimal to display error codes when problems occur with their videos.

(a) Tick one box to show which statement is incorrect about why hexadecimal is used to display the error codes.

(b) There is a problem with streaming a video and the error codes 152 and 30F are displayed. Convert the two hexadecimal error codes to binary numbers.

Statement
AHexadecimal is easier to debug than binary.
BHexadecimal is easier to read than binary.
CHexadecimal uses less screen space than binary.
DHexadecimal uses less storage space than binary.
  1. 1

    (a) D [1]

  2. 2

    (b) 152 = 0001 0101 0010 [1]

  3. 3

    30F = 0011 0000 1111 [1]

4. Binary addition and overflow

Add binary numbers column by column from the right. 0+0=0, 1+0=1, 1+1=10 (write 0, carry 1) and 1+1+1=11 (write 1, carry 1). Write the carries down as working.

A register has a predefined limit. An 8-bit register holds values up to 255. An overflow error occurs when a value outside this limit should be returned. The carry out of the eighth bit is the overflow bit.

8-bit maximum = 2⁸ - 1 = 255

Examiner insight

“Some candidates converted the values to denary, added the values and converted the answer back to binary. Candidates should note that this is not answering the question, as they do not demonstrate binary addition.” “Many candidates were able to recognise that an overflow error occurs when the value is larger than 255.”

Worked example 14 marks

(f) Add the binary numbers 10011101 and 11110000 using binary addition. Give your answer in binary. Show all your working.

  1. 1

    ``` 1 1 1 1 0 0 1 1 1 0 1 + 1 1 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 ```

  2. 2

    right nibble 1101 correct [1]

  3. 3

    left nibble 1000 correct [1]

  4. 4

    three carries shown as working [1]

  5. 5

    overflow bit 1 shown. Answer 110001101 [1]

5. Logical binary shifts

In a logical shift every bit moves the same number of places. Bits shifted out of the end of the register are lost. Zeros are shifted in at the opposite end.

A left shift multiplies the number by 2 for each place. A right shift divides it by 2 for each place. In a left shift the most significant bit is lost. In a right shift the least significant bit is lost.

left shift by n places: × 2ⁿ

right shift by n places: ÷ 2ⁿ

Examiner insight

“The most common incorrect answer was from candidates who performed the binary shift to the right and not the left.” “Some candidates replaced the values lost with 1s instead of 0s.”

Worked example 11 mark

(c) Give the 8-bit binary value after a logical binary shift left of two places is performed on the binary number 00110101.

  1. 1

    Move every bit two places left, drop the two bits at the left and add 00 at the right: 11010100 [1]

6. Two’s complement

Two’s complement is a base 2 number system that represents positive and negative integers. In 8 bits the most significant bit has place value -128. The other place values are 64, 32, 16, 8, 4, 2, 1.

A value with a leading 0 is positive. Read it as ordinary binary and do not flip it. A value with a leading 1 is negative: add the place values, with -128 for the leading bit.

To store a negative number, write the positive value in 8 bits, flip every bit and add 1.

-14: 00001110, flip: 11110001, add 1: 11110010

Examiner insight

“Some candidates attempted to ‘flip’ the binary value and then converted this resulting value to denary.” “Some candidates gave the binary value for 22 instead of –22.”

Worked example 13 marks

The current temperature is stored as a two’s complement binary integer and is displayed as a denary number.

(d)(i) Give the denary number that would be displayed for each of the two’s complement binary integers 00100011 and 11101010.

(ii) Give the two’s complement binary integer that would be stored when the denary number 14 is displayed.

  1. 1

    00100011 = 32 + 2 + 1 = 35 [1]

  2. 2

    11101010 = -128 + 64 + 32 + 8 + 2 = -22 [1]

  3. 3

    14 is 0000 1110 [1]

Recap

  • Data is converted to binary because logic gates can only be set as binary numbers.
  • Denary is base 10, binary is base 2, hexadecimal is base 16.
  • Convert binary and hexadecimal in groups of four bits. Keep leading zeros.
  • Hexadecimal is easier for humans to read. It does not save storage space.
  • Overflow: a value above 255 in an 8-bit register.
  • Left shift multiplies by 2 each place. Right shift divides by 2 each place.
  • Two’s complement: leading 0 is positive, leading 1 is negative. The leading bit has value -128.

7. Text as binary

Text is converted to binary to be processed by a computer.

A character set contains all the characters that can be represented. Each character is given a binary value in the character set.

Examiner insight

“Some candidates focussed on how a keyboard process key presses, rather than how text is converted to binary.” “It would be beneficial for candidates to have a greater understanding of how text is converted to binary using a character set.”

Worked example 13 marks

A student opens a document on their computer and inputs text. Explain how the computer represents the text.

  1. 1

    A character set is used [1]

  2. 2

    It contains all the characters that can be represented [1]

  3. 3

    Each character is given a binary value [1]

8. ASCII and Unicode

ASCII and Unicode are both character sets.

Unicode allows a greater range of characters and symbols than ASCII, including different languages and emojis.

Unicode requires more bits per character than ASCII.

Examiner insight

“Most referred to Unicode having more characters. Some expanded on this to state it could cover more languages.” “Common errors included incorrectly stating the binary for the integer value of 9 rather than the binary value of the ASCII value for 9.”

Worked example 13 marks

The computer uses the ASCII character set for a text file. One word from the text file is ‘cat’. The ASCII denary value for the character ‘c’ is 99.

(i) Give the ASCII denary values for ‘a’ and ‘t’.

(ii) Identify one other character set that the computer could use.

  1. 1

    ‘a’ is 2 letters before ‘c’: 99 - 2 = 97 [1]

  2. 2

    ‘t’ is 17 letters after ‘c’: 99 + 17 = 116 [1]

  3. 3

    Unicode [1]

9. Sound: sample rate and resolution

A sound wave is sampled for sound to be converted to binary, which is processed by a computer. A sound sample is a single measure of the amplitude (height) of the sound wave.

The sample rate is the number of samples taken in a second. The sample resolution is the number of bits per sample.

The accuracy of the recording and the file size increase as the sample rate and resolution increase.

Examiner insight

“Some candidates tried to describe the sample resolution in relation to an image.” “Few candidates were able to give any indication about how the accuracy of the recording could be increased.”

Worked example 12 marks

The student stores a video on their computer. The video contains sound and images. Complete the table with the missing terms and descriptions about sound and images.

The two rows about sound:

termdescription
sound sample
the number of samples that are recorded each second
  1. 1

    sound sample: a single measure of the amplitude (height) of a sound wave [1]

  2. 2

    the missing term is the sample rate (sampling rate) [1]

10. Images as pixels

An image is a series of pixels that are converted to binary, which is processed by a computer.

Each pixel is one colour. Each pixel has a binary value for its colour.

Examiner insight

“Some responses describe a pixel as all of the colours in the image, or all of the squares that make up the image.”

Worked example 13 marks

A student has an application (app) on their smartphone that can be used to identify the name of a flower. The student opens the app and takes a photograph of a flower. The photograph is stored as an image. Explain how the image is converted to binary for processing by the smartphone.

  1. 1

    The image is broken down into pixels [1]

  2. 2

    Each pixel is a single colour [1]

  3. 3

    Each colour (pixel) has a binary value [1]

11. Resolution and colour depth

The resolution is the number of pixels in the image: the dimensions of the image.

The colour depth is the number of bits used to represent each colour.

The file size and quality of the image increase as the resolution and colour depth increase.

Examiner insight

“Some candidates did not provide enough information and just stated that it was related to the quality of the image.” “A common error was stating it was the number of pixels per bit, or the number of pixels in an image.”

Worked example 13 marks

The student stores a video on their computer. The video contains sound and images. Complete the table with the missing terms and descriptions about sound and images.

The three rows about images:

termdescription
the smallest unit of an image that is made up of one colour
the dimensions of an image
colour depth
  1. 1

    pixel [1]

  2. 2

    (image) resolution [1]

  3. 3

    colour depth: the number of bits used for each colour (pixel) in an image [1]

Recap

  • Text is converted to binary using a character set. Each character has a binary value.
  • ASCII and Unicode are character sets. Unicode has a greater range of characters and needs more bits per character.
  • Sample rate = samples per second. Sample resolution = bits per sample.
  • Higher sample rate or resolution: more accurate recording, bigger file.
  • An image is a series of pixels. Each pixel is one colour with a binary value.
  • Resolution = number of pixels. Colour depth = bits used for each colour.
  • Higher resolution or colour depth: better quality, bigger file.

12. Measuring data storage

A bit is one binary digit. There are 8 bits in a byte. A nibble is half a byte, so one byte holds two nibbles.

Above the byte, each unit is 1024 times the one before it: kibibyte (KiB), mebibyte (MiB), gibibyte (GiB), tebibyte (TiB), pebibyte (PiB) and exbibyte (EiB).

A binary prefix such as mebibyte uses 1024 in calculations. A denary prefix such as megabyte uses 1000.

1 byte = 8 bits

1 KiB = 1024 bytes

1 GiB = 1024 MiB

Examiner insight

“In this question binary prefixes were used, therefore candidates needed to use the value of 1024 in calculations.” “Many candidates were able state the correct number of nibbles in 1 byte. The most common incorrect answer given was 4.”

Worked example 11 mark

Data storage can be measured in different units. Calculate how many kibibytes (KiB) are equal to 3072 bytes.

  1. 1

    3072 ÷ 1024 = 3 KiB [1]

13. Terms in a file-size question

A pixel is the smallest unit of an image that is made up of one colour. The resolution of an image is its dimensions.

Colour depth is the number of bits used for each colour or pixel. A sound sample is a single measure of the amplitude of a sound wave, and the sample rate is the number of samples recorded each second.

Examiner insight

“A common error was stating it was the number of pixels per bit, or the number of pixels in an image.” “Some candidates did not provide enough information and just stated that it was related to the quality of the image.”

Worked example 15 marks

The student stores a video on their computer. The video contains sound and images. Complete the table with the missing terms and descriptions about sound and images.

termdescription
the smallest unit of an image that is made up of one colour
sound sample
the dimensions of an image
colour depth
the number of samples that are recorded each second
  1. 1

    term: pixel [1]

  2. 2

    a (single) measure of the amplitude of a sound wave [1]

  3. 3

    term: (image) resolution [1]

  4. 4

    the number of bits used for each colour or pixel [1]

  5. 5

    term: sample rate [1]

14. Calculating image and sound file sizes

Answers must be in the units the question asks for. Calculations use 1024, not 1000.

For an image, multiply the number of pixels by the colour depth. For a sound file, multiply the sample rate, the resolution and the length of the track in seconds. With the colour depth or resolution in bits, the answer is in bits.

Divide by 8 to change bits to bytes. A colour depth given in bytes gives bytes straight away. Then divide by 1024 once for each step up to the unit asked for.

image size (bits) = width × height × colour depth

sound size (bits) = sample rate × resolution × length (s)

bytes = bits ÷ 8

Examiner insight

“Some candidates divided by 1024 once instead of twice. Some candidates multiplied by 8 to calculate the bits for a colour depth of 1 byte instead of 2 bytes.” “The most common incorrect answers did not struggle with the mathematics of the calculation, but with the correct methodology for calculating the file size.”

Worked example 12 marks

An image file has a resolution of 1024 pixels high × 1024 pixels wide. The colour depth is two bytes. Calculate the file size of the image. Give the answer in MiB. Show your working.

  1. 1

    working: 1024 × 1024 × 2 bytes, then divide by 1024 × 1024 [1]

  2. 2

    file size of image = 2 MiB [1]

15. Why data is compressed

Compression exists to reduce the size of the file.

This means less storage space is needed, less bandwidth is required and the transmission time is shorter. A video is also less likely to buffer when it is streamed.

Examiner insight

“It would be helpful for candidates to understand that the downloading process would not change, it would be the download time that would be reduced.” “Some candidates lacked detail in their response such as it makes the size smaller, and it uses less space.”

Worked example 11 mark

The video streaming service compresses their videos using lossless compression. Give one advantage to the video streaming service of choosing lossy compression instead of lossless compression to compress the videos.

  1. 1

    smaller file size, so less storage space or a shorter transmission time [1]

16. Lossy compression

Lossy compression reduces the file size by permanently removing data. Examples are reducing the resolution or colour depth of an image, and reducing the sample rate or resolution of a sound.

The data removed is unnecessary data, such as colours that cannot be distinguished between. Once it is removed, the original cannot be recovered.

MP4 and JPEG are lossy.

Examiner insight

“Candidates need to make sure they are referring to the removal of unnecessary data and not unwanted data, because the compression algorithm will not understand what is wanted or not but can identify unnecessary data such as colours that cannot be distinguished between.” “Some candidates gave an example of compression rather than a type of compression.”

Worked example 12 marks

The video streaming service compresses their videos using lossless compression. Give two reasons why the video streaming service chose lossless compression instead of lossy compression.

  1. 1

    they want to retain the original version of the video, which can be recovered [1]

  2. 2

    the videos keep the highest quality, because quality is not reduced [1]

17. Lossless compression

Lossless compression reduces the file size without permanent loss of data. An example is run length encoding (RLE).

A compression algorithm finds repeated patterns and removes the redundancy. No data is removed, so nothing that a person could hear or see is thrown away.

Examiner insight

“Few candidates were able to describe how lossless would reduce the size of the video file. Most candidates described how lossy compression would do this.” “Many candidates described the benefits of lossless compression, rather than how data is compressed using the lossless method.”

Worked example 14 marks

The video streaming service compresses their videos using lossless compression. Explain how the videos are compressed using lossless compression.

  1. 1

    a compression algorithm is used, such as RLE [1]

  2. 2

    repeating frames or pixels are identified [1]

  3. 3

    ... and indexed [1]

  4. 4

    redundancy is eliminated by recording the differences between each frame [1]

Recap

  • 8 bits in a byte. A byte is two nibbles.
  • Each unit up (KiB, MiB, GiB, TiB, PiB, EiB) is 1024 times the one before.
  • Image size = width × height × colour depth. Sound size = sample rate × resolution × length in seconds.
  • Divide bits by 8 for bytes, then by 1024 for each step up. Give the unit asked for.
  • Compression reduces file size: less storage, less bandwidth, shorter transmission time.
  • Lossy permanently removes data. Lossless loses nothing, for example RLE.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. A student takes a photograph. State what must be done to the photograph before a computer can process it.1 mark
    Answer
    1. It must be converted to binary [1].

    Trap: Naming hexadecimal or denary. Hexadecimal only displays binary values to people.

  2. Convert the denary number 45 into an 8-bit binary number.1 mark
    Answer
    1. 45 = 32 + 8 + 4 + 1.
    2. 00101101 [1].

    Trap: Writing 101101 gives only six bits. An 8-bit answer needs its leading zeros.

  3. Convert the hexadecimal number 1C4 into denary.2 marks
    Answer
    1. (1 × 256) + (12 × 16) + 4 [1].
    2. = 256 + 192 + 4 = 452 [1].

    Trap: Converting to binary when the question asks for denary. C is 12, not a denary digit.

  4. Convert the hexadecimal number 14 into an 8-bit binary number.2 marks
    Answer
    1. 1 = 0001 [1].
    2. 4 = 0100, so 00010100 [1].

    Trap: Converting the value 14 to binary gives 00001110. Convert the digits 1 and 4 one at a time.

  5. Convert the binary number 101100001110 into hexadecimal.2 marks
    Answer
    1. Nibbles 1011, 0000 and 1110 [1].
    2. B, 0 and E, so B0E [1].

    Trap: Leaving out the 0 gives BE. A nibble that converts to 0 is still written.

  6. A programmer reads memory values displayed in hexadecimal. (a) Give two reasons why hexadecimal is used instead of binary. (b) The programmer says the values take less storage space in hexadecimal. Explain why this is wrong.3 marks
    Answer
    1. (a)
    2. Easier for humans to read and understand than binary [1].
    3. Uses less screen space, as it is a shorter representation of binary [1].
    4. (b)
    5. The values are still stored as binary, so no storage space is saved [1].

    Trap: “Uses less space” does not say where the space is saved. Say screen space.

  7. Add the 8-bit binary integers 01101011 and 00111001 using binary addition. Show the carries.3 marks
    Answer
    1. Carries written above the 2nd, 3rd, 5th, 6th, 7th and 8th columns from the right [1].
    2. Right nibble 0100 [1].
    3. Left nibble 1010 and no overflow bit, so 10100100 [1].

    Trap: Adding in denary and converting back does not show binary addition.

  8. Two 8-bit binary integers 11001000 and 01100100 are added in an 8-bit register. Explain what happens.4 marks
    Answer
    1. The sum is 200 + 100 = 300, above the 255 an 8-bit register holds [2].
    2. The sum is 100101100, which has nine bits [1].
    3. The ninth bit is lost, so an overflow error occurs [1].

    Trap: Keeping only the eight bits 00101100 and calling it the answer ignores the overflow.

  9. A game stores a player’s score as a positive 8-bit binary integer in a register. The score is 01011100. (a) A bonus performs a logical left shift of two places on the register. Give the binary value now in the register and its denary value. (b) Explain why the bonus has not multiplied the score by 4. (c) A penalty then performs a logical right shift of three places on your answer to (a). Give the value now in the register as two hexadecimal digits.6 marks
    Answer
    1. (a)
    2. 01110000 [1].
    3. 64 + 32 + 16 = 112 [1].
    4. (b)
    5. The score was 64 + 16 + 8 + 4 = 92 and 92 × 4 = 368, which is greater than 255 [1].
    6. A 1 was shifted out of the most significant end of the register and lost [1].
    7. (c)
    8. 00001110 [1].
    9. 0000 = 0 and 1110 = E, so 0E [1].

    Trap: Shifting the wrong way, filling the empty places with 1s, or writing 14 where the hexadecimal digit is E.

  10. A weather buoy stores each temperature as an 8-bit two’s complement integer. It transmits each stored value as two hexadecimal digits. (a) The buoy transmits 5D and then D5. Give the denary temperature for each value. (b) The temperature falls to -37 °C. Give the two hexadecimal digits transmitted. (c) A student reads D5 as 213. Explain the mistake.6 marks
    Answer
    1. (a)
    2. 5D = 01011101 and D5 = 11010101 [1].
    3. 01011101 has a leading 0: 64 + 16 + 8 + 4 + 1 = 93 [1].
    4. 11010101 has a leading 1: -128 + 64 + 16 + 4 + 1 = -43 [1].
    5. (b)
    6. 37 = 00100101; flip to 11011010; add 1 to get 11011011 [1].
    7. 1101 = D and 1011 = B, so DB [1].
    8. (c)
    9. The most significant bit is worth -128 in two’s complement, not +128 [1].

    Trap: Flipping 5D although it is positive, or giving 25, the value for 37 instead of -37.

  11. A student types the word ‘hello’. Describe how the computer stores each letter.2 marks
    Answer
    1. Each letter is given a binary value [1].
    2. The values come from a character set [1].

    Trap: Describing how the keyboard detects a key press is not what is asked.

  12. Give two differences between ASCII and Unicode.2 marks
    Answer
    1. Unicode allows a greater range of characters and symbols (such as different languages and emojis) [1].
    2. Unicode requires more bits per character [1].

    Trap: Swapping the two sets, so that ASCII is said to need more bits.

  13. State what is meant by sample rate and by sample resolution.2 marks
    Answer
    1. Sample rate is the number of samples taken in a second [1].
    2. Sample resolution is the number of bits per sample [1].

    Trap: Giving the sample rate as the answer for both.

  14. Define the terms pixel and image resolution.2 marks
    Answer
    1. A pixel is the smallest unit of an image, made up of one colour [1].
    2. Resolution is the number of pixels in the image [1].

    Trap: A pixel is not all the colours or all the squares in the image.

  15. In ASCII the digit characters ‘0’ to ‘9’ are in order and the character ‘0’ has denary value 48. Give the ASCII denary value of the character ‘7’.2 marks
    Answer
    1. ‘7’ is 7 characters after ‘0’ [1].
    2. 48 + 7 = 55 [1].

    Trap: Answering 7 gives the integer, not the ASCII value of the character ‘7’.

  16. A sound recording is saved again with a lower sample rate. State the effect on the accuracy of the recording and on the file size.2 marks
    Answer
    1. The recording is less accurate [1].
    2. The file size is smaller [1].

    Trap: Reversing the direction: accuracy and file size both increase as the sample rate increases.

  17. The colour depth of an image is changed from 8 bits to 32 bits. (a) State what a colour depth of 32 bits means. (b) State the effect on the file size and the quality of the image.3 marks
    Answer
    1. (a)
    2. 32 bits are used to represent each colour (for a single pixel) [1].
    3. (b)
    4. The file size increases [1] and the quality increases [1].

    Trap: 32 bits is for one colour, not for all the colours in the image.

  18. An image has a colour depth of 3 bits. Calculate the maximum number of different colours it can represent.2 marks
    Answer
    1. Each bit is 0 or 1, so there are 2³ values [1].
    2. 2³ = 8 colours [1].

    Trap: 3 × 2 = 6 and 3² = 9 use the wrong operation.

  19. A camera in a nest box stores each image as 40 pixels wide and 30 pixels high. Each pixel can be any one of 16 different colours. (a) Give the smallest colour depth that allows 16 different colours. (b) Calculate the number of bits needed to store one image. (c) To save storage space, the width and the height of the image are both halved and the colour depth is reduced to 2 bits. Calculate how many of the new images can be stored in the bits used by one original image. (d) Give the maximum number of different colours in a new image.7 marks
    Answer
    1. (a)
    2. 2⁴ = 16, so the colour depth is 4 bits [1].
    3. (b)
    4. Number of pixels = 40 × 30 = 1200 [1].
    5. Bits = 1200 × 4 = 4800 bits [1].
    6. (c)
    7. New number of pixels = 20 × 15 = 300 [1].
    8. New bits = 300 × 2 = 600 bits [1].
    9. 4800 ÷ 600 = 8 images [1].
    10. Check: a quarter of the pixels and half the bits for each pixel is 1/4 × 1/2 = 1/8 of the bits.
    11. (d)
    12. 2² = 4 colours [1].

    Trap: Colour depth is the number of bits, not the number of colours: multiplying by 16 gives 19 200. Halving both dimensions leaves a quarter of the pixels, not half.

  20. A birdsong recorder has two settings. Setting X: 8000 samples per second, 8 bits per sample. Setting Y: 4000 samples per second, 16 bits per sample. The same 3-second call is recorded once with each setting. (a) Calculate the number of bits used by each recording. (b) Using the terms sample rate and sample resolution, describe two ways in which the recordings differ. (c) Setting Z is 8000 samples per second with 16 bits per sample. State how the accuracy of the recording with setting Z compares with setting X. Calculate how many seconds of sound setting Z stores in the bits that setting X used for the call.8 marks
    Answer
    1. (a)
    2. Samples: X = 8000 × 3 = 24 000, Y = 4000 × 3 = 12 000 [1].
    3. X: 24 000 × 8 = 192 000 bits [1].
    4. Y: 12 000 × 16 = 192 000 bits [1].
    5. (b)
    6. X has the higher sample rate: twice as many samples are taken in a second [1].
    7. Y has the higher sample resolution: twice as many bits per sample [1].
    8. (c)
    9. Z is more accurate, because its sample resolution is higher and its sample rate is the same [1].
    10. Z uses 8000 × 16 = 128 000 bits in a second [1].
    11. 192 000 ÷ 128 000 = 1.5 seconds [1].

    Trap: Swapping the terms: 8000 and 4000 are sample rates, 8 and 16 are sample resolutions. Equal file sizes do not mean the same settings.

  21. State how many bits are in one byte.1 mark
    Answer
    1. 8 bits [1].

    Trap: A nibble is half a byte. Do not give the size of a nibble.

  22. State how many nibbles are in one byte.1 mark
    Answer
    1. A byte is 8 bits and a nibble is half a byte, so there are 2 nibbles [1].

    Trap: Examiners reported 4 as the most common wrong answer.

  23. Put these units in order, smallest first: gibibyte, exbibyte, kibibyte, tebibyte, pebibyte, mebibyte.2 marks
    Answer
    1. kibibyte, mebibyte, gibibyte [1], tebibyte, pebibyte, exbibyte [1].

    Trap: Putting exbibyte before tebibyte or pebibyte: the exbibyte is the largest unit in the list.

  24. Calculate how many mebibytes (MiB) are in 5 GiB.2 marks
    Answer
    1. 1 GiB = 1024 MiB [1].
    2. 5 × 1024 = 5120 MiB [1].

    Trap: Using 1000 gives 5000 MiB. Binary prefixes use 1024.

  25. Calculate how many kibibytes (KiB) are equal to 163 840 bits.2 marks
    Answer
    1. 163 840 ÷ 8 = 20 480 bytes [1].
    2. 20 480 ÷ 1024 = 20 KiB [1].

    Trap: Dividing the bits by 1024 without first dividing by 8 gives 160.

  26. A school emails a photograph to parents after compressing it. State the purpose of compressing the photograph and one effect on the email.2 marks
    Answer
    1. Purpose: to reduce the size of the file [1].
    2. Effect: the transmission time is shorter, or less bandwidth is needed [1].

    Trap: Writing that the download speed is reduced. Only the time is reduced.

  27. A music company compresses its master recordings before storing them. State which type of compression it should use and give one reason.2 marks
    Answer
    1. Lossless compression [1].
    2. The original recording can be recovered, or the quality is not reduced [1].

    Trap: Writing only that no data is lost, without saying what the company gains.

  28. An image is 256 pixels wide and 128 pixels high. The colour depth is 16 bits. Calculate the file size in KiB.3 marks
    Answer
    1. Bits = 256 × 128 × 16 = 524 288 [1].
    2. Bytes = 524 288 ÷ 8 = 65 536 [1], so 65 536 ÷ 1024 = 64 KiB [1].

    Trap: Forgetting to divide by 8 gives 512 KiB.

  29. A language app records a learner speaking. The recording has a sample rate of 32 768 samples per second and a resolution of 16 bits. It is 4 minutes 16 seconds long. (a) Calculate the file size of the recording in MiB. (b) To save storage space, the app uses lossy compression. It halves the sample rate and reduces the resolution to 8 bits. Calculate the file size of the compressed recording in KiB. (c) State why the app cannot get the original recording back from the compressed file.6 marks
    Answer
    1. (a)
    2. Length = 4 × 60 + 16 = 256 s [1]. Bits = 32 768 × 16 × 256 = 134 217 728 [1].
    3. Bytes = 134 217 728 ÷ 8 = 16 777 216, so 16 777 216 ÷ 1024 ÷ 1024 = 16 MiB [1].
    4. (b)
    5. Bits = 16 384 × 8 × 256 = 33 554 432 [1].
    6. 33 554 432 ÷ 8 ÷ 1024 = 4096 KiB [1].
    7. (c)
    8. Lossy compression permanently removes data [1].

    Trap: Dividing by 1024 once instead of twice in (a) gives 16 384, the size in KiB.

  30. A weather station takes one photograph of the sky every 30 minutes. Each photograph is 4096 pixels wide and 2048 pixels high. The colour depth is 3 bytes. The photographs are not compressed. (a) Calculate the file size of one photograph in MiB. (b) The photographs are stored on a memory card that holds 3 GiB. Calculate how many photographs the card can hold. (c) Calculate the number of complete days of photographs the card can hold.6 marks
    Answer
    1. (a)
    2. Bytes = 4096 × 2048 × 3 = 25 165 824 [1].
    3. 25 165 824 ÷ 1024 ÷ 1024 = 24 MiB [1].
    4. (b)
    5. 3 GiB = 3 × 1024 = 3072 MiB [1], so 3072 ÷ 24 = 128 photographs [1].
    6. (c)
    7. Photographs each day = 24 × 2 = 48 [1]. 128 ÷ 48 = 2.67, so 2 complete days [1].

    Trap: The colour depth is already in bytes, so dividing by 8 as well gives 3 MiB, not 24 MiB.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
‘uses less storage space’easier to read or less screen space
add in denary, then convert backbinary addition with the carries shown
a right shift when the question says leftlogical shift left: most significant bit lost, zeros enter on the right
14E (values 10 to 15 are A to F)
A key is pressed and the keyboard sends a signal.Each character is given a binary value in a character set.
Sample resolution is the number of samples taken in a second.Sample resolution is the number of bits per sample. Sample rate is the number of samples in a second.
A pixel is all of the colours in the image.A pixel is the smallest unit of an image, made up of one colour.
Resolution is the quality of the image.Resolution is the number of pixels in the image.
Compression reduces the download speed.Compression reduces the download time. The speed stays the same.
Colour depth is the number of pixels in an image.Colour depth is the number of bits used for each colour or pixel.
Lossless compression removes sounds the human ear cannot hear.Lossless compression removes no data. It finds repeating patterns.

Frequently asked questions

Why do computers use binary?
Any form of data must be converted to binary before a computer can process it. Data is processed using logic gates and stored in registers, and a logic gate can only be set as a binary number. Text, images and sound are all stored as binary.
How do you convert the denary number 45 into an 8-bit binary number?
Write 45 as a sum of the place values in 8 bits: 45 = 32 + 8 + 4 + 1. Keep the leading zeros so the answer has 8 bits, which gives 00101101.
How do you perform a logical shift left on a binary number?
A logical shift moves every bit the same number of places, and zeros are shifted in at the opposite end. A left shift multiplies the number by 2 for each place, and the most significant bit is lost. Moving 00110101 two places left gives 11010100.
What is an overflow error in binary addition?
An overflow error occurs when a value outside the limit of a register should be returned. An 8-bit register holds values up to 255, so the carry out of the eighth bit is the overflow bit. The adding of 11001000 and 01100100 gives an overflow because the sum is 300.
How do you read a negative number in two's complement?
A value with a leading 0 is positive and is read as ordinary binary. A value with a leading 1 is negative: add the place values, with -128 for the leading bit. For example, 11101010 is -128 + 64 + 32 + 8 + 2 = -22.
Does hexadecimal use less storage space than binary?
No. Hexadecimal is a shorter representation of binary and is easier to read, so it uses less screen space. The computer still stores the value as binary, so hexadecimal does not save storage space.
How does a computer represent text as binary?
Text is converted to binary to be processed by a computer. Each character is given a binary value in a character set, and a character set contains all the characters that can be represented. A key press only sends a signal to the computer.
What is the difference between ASCII and Unicode?
ASCII and Unicode are both character sets. Unicode allows a greater range of characters and symbols than ASCII, including different languages and emojis. Unicode requires more bits per character than ASCII.
What is the difference between sample rate and sample resolution?
Sample rate is the number of samples taken in a second. Sample resolution is the number of bits per sample. As the sample rate and resolution increase, the accuracy of the recording and the file size both increase.
How is an image converted to binary?
An image is a series of pixels. A pixel is the smallest unit of an image, made up of one colour, and each pixel has a binary value for its colour. A pixel is not all of the colours in the image.
What is the difference between image resolution and colour depth?
Resolution is the number of pixels in the image, which are its dimensions. Colour depth is the number of bits used to represent each colour. As resolution and colour depth increase, the quality and the file size of the image increase.
What mistake do students make when describing sample rate and sample resolution?
A common mistake is giving the sample rate as the answer for both terms. Sample rate is the number of samples taken in a second, and sample resolution is the number of bits per sample. Some candidates described sample resolution in relation to an image.
How many kibibytes are in 3072 bytes?
Divide by 1024 for each step up. The calculation is 3072 ÷ 1024 = 3 KiB. Binary prefixes such as kibibyte use 1024 in calculations, while denary prefixes such as megabyte use 1000.
How many nibbles are in one byte?
A bit is one binary digit and there are 8 bits in a byte. A nibble is half a byte, so one byte holds two nibbles. Many candidates gave the incorrect answer 4.
How do you calculate the file size of an image?
For an image, multiply the number of pixels by the colour depth. The formula is width × height × colour depth, which gives the answer in bits. Divide by 8 to change bits to bytes, then divide by 1024 once for each step up to the unit asked for.
How do you calculate the file size of a sound recording?
Multiply the sample rate, the resolution and the length of the track in seconds. The formula is sample rate × resolution × length (s). The answer is in bits, so divide by 8 to get bytes.
What is the difference between lossy and lossless compression?
Lossy compression reduces the file size by permanently removing data, such as unnecessary colours, and the original cannot be recovered. Lossless compression reduces the file size without permanent loss of data, for example run length encoding (RLE). MP4 and JPEG are lossy.
Does compression make a download faster?
No. Compression reduces the download time, because the file is smaller. The speed stays the same. Compression reduces the size of the file, so less storage space and less bandwidth are needed.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters