Data Representation: Number Systems - Worksheets, Questions and Revision

20 original exam-style questions - 9 pages of questions with a full mark scheme - free printable PDF.

Download PDFJump to mark scheme (page 10)Read the revision guide
« Previous: Boolean LogicNext: Data Representation: Images, Sound and Compression »
Revision Library
revisionlibrary.co.uk
GCSE · Data Representation

P2.5 Data Representation: Number Systems

OCR J277 · Calculators not allowed · about 100 minutes
Total Marks
Name: _______________________________    Date: ____ / ____ / ______
Answer ALL questions. Show all your working.
1
Computers represent all data internally using binary digits (bits), where each digit is either 0 or 1. Which of these 4-bit binary numbers represents the denary value 9?
  • A) 1001
  • B) 1010
  • C) 0110
  • D) 1100
(Total for Question 1 is 1 mark)
2
Whole numbers can be converted between denary (base 10) and binary (base 2) using the binary place values 128, 64, 32, 16, 8, 4, 2 and 1.
(a)Convert the denary number 6 to a 4-bit binary number.(1)
(b)Convert the 4-bit binary number 1011 to denary.(1)
(c)Convert the denary number 250 to an 8-bit binary number. Show your working.(2)
(Total for Question 2 is 4 marks)
3
Hexadecimal (base 16) uses the digits 0-9 and the letters A-F, where A=10, B=11, C=12, D=13, E=14 and F=15.
(a)Convert the denary number 58 to hexadecimal. Show your working.(2)
(b)Convert the hexadecimal number 2F to denary. Show your working.(2)
(c)State the largest denary value that can be represented using a single hexadecimal digit.(1)
(Total for Question 3 is 5 marks)
4
Because 4 bits (a nibble) can represent exactly 16 different values (0-15), each hexadecimal digit maps directly onto one 4-bit nibble.
(a)Convert the 8-bit binary number 10110101 to hexadecimal by splitting it into nibbles. Show your working.(2)
(b)Convert the hexadecimal number E3 to an 8-bit binary number. Show your working.(2)
(Total for Question 4 is 4 marks)
5
One byte of data is made up of two nibbles.
(a)State how many hexadecimal digits are needed to represent one byte of data.(1)
(b)Explain why two hexadecimal digits can represent exactly one byte, with no bits left over.(2)
(Total for Question 5 is 3 marks)
6
Programmers often display memory addresses, error codes and colour values in hexadecimal rather than in binary or denary.
(Total for Question 6 is 3 marks)
7
Units of data storage are built up from the bit: 1 nibble = 4 bits, 1 byte = 8 bits, and larger units (kilobyte, megabyte, gigabyte) are each 1000 times the previous unit.
(a)Put these units in order of size, smallest first: byte, bit, kilobyte, nibble.(1)
(b)State the number of bits in one byte.(1)
(c)A downloaded document is 4 kilobytes (KB) in size. Using 1 KB = 1000 bytes, calculate the number of bits in the document. Show your working.(2)
(Total for Question 7 is 4 marks)
8
The table below shows the same three numbers written in denary, 8-bit binary and hexadecimal. Some values are missing.
DenaryBinary (8-bit)Hexadecimal
100??
?01011001?
??7D
Complete the table by filling in every missing value. Show your working for at least one conversion in each row.
(Total for Question 8 is 6 marks)
9
The number of different values that can be represented using a fixed number of bits, n, can be calculated using a simple formula.
(a)State, in the form 2n, the formula for the number of different values that can be represented using n bits.(1)
(b)Calculate the number of different values that can be represented using 5 bits. Show your working.(2)
(c)A games console stores each player's score as an unsigned 16-bit binary number. Calculate the maximum denary score that can be stored. Show your working.(2)
(Total for Question 9 is 5 marks)
10
Show that the 8-bit binary number 11001001 represents the denary value 201.
(Total for Question 10 is 2 marks)
11
Binary addition follows the same column method as denary addition, but any column that totals 2 or more requires a carry into the next column.
(a)Add the two 8-bit binary numbers 01001101 and 00110110. Show your carries and give your answer as an 8-bit binary number.(2)
(b)State the denary value of the result to check your answer to part (a) is correct.(1)
(Total for Question 11 is 3 marks)
12
A colour in a graphics program is stored as the hexadecimal code #2F8C00, giving the Red, Green and Blue (RGB) intensities as three pairs of hex digits.
(a)Calculate the denary value of the Green component, given by the hex pair 8C. Show your working.(2)
(b)Give one everyday example, other than colour codes, where hexadecimal is used to represent data.(1)
(Total for Question 12 is 3 marks)
13
A binary shift moves every bit in a binary number a fixed number of places to the left or right, filling any empty places with zeros.
(a)State the effect on the denary value of a binary number when a single left binary shift is performed.(1)
(b)The 8-bit register value 00001101 (denary 13) is shifted left by 2 places. State the new 8-bit binary value and its denary equivalent.(2)
(c)The 8-bit register value 11000000 (denary 192) is shifted left by 2 places. State the resulting 8-bit binary value, and explain why this shift no longer represents multiplying the denary value by 4.(2)
(Total for Question 13 is 5 marks)
14
A processor uses 8-bit registers to store unsigned binary numbers, so the largest value it can hold is 255.
(a)Add the binary numbers 11110101 (denary 245) and 00010000 (denary 16). Show your carries and give your answer as a 9-bit binary number.(2)
(b)State the 8-bit value that would actually be stored in the register, and explain why this is described as an overflow error.(2)
(Total for Question 14 is 4 marks)
15
A network technician reads the hexadecimal pair B4 from part of a device's MAC address and needs to check it against a filter rule written in binary.
(a)Convert the hexadecimal value B4 to an 8-bit binary number. Show your working.(2)
(b)Convert your answer to part (a) to denary. Show your working.(2)
(Total for Question 15 is 4 marks)
16
A digital camera stores the colour of each pixel using 24 bits, made up of 8 bits each for the red, green and blue components.
(a)Calculate the total number of different colours that can be represented using 24 bits. Give your answer both in the form 2n and as a denary value. Show your working.(2)
(b)Explain why increasing the number of bits used to store each pixel's colour increases the overall file size of an image.(2)
(Total for Question 16 is 4 marks)
17
A programmer writes the following algorithm, using the OCR Exam Reference Language, to convert a positive denary number entered by the user into its binary representation, using the divide-by-2 remainder method:
number = input("Enter a positive whole number: ")
number = int(number)
binary = ""
WHILE number > 0
    remainder = number MOD 2
    binary = str(remainder) + binary
    number = number DIV 2
ENDWHILE
print(binary)
(a)Complete a trace table for this algorithm when the user enters the value 22, showing the value of number at the start of each pass of the loop, the remainder calculated, the value of binary after it is updated, and the new value of number after the DIV 2 step.(5)
(b)State the value that would be output by print(binary) once the algorithm has finished running.(1)
(Total for Question 17 is 6 marks)
18
A programmer wants to write an algorithm, using the OCR Exam Reference Language, that inputs two positive integers, num1 and num2, calculates their total, and outputs whether adding these two numbers together would cause an overflow if the result were stored in an 8-bit register (i.e. whether the total is greater than 255). Write this algorithm. Any correct logic will be credited; minor syntax errors will be ignored.
(Total for Question 18 is 4 marks)
19
Discuss the benefits of using hexadecimal, rather than binary or denary, when programmers need to work with large binary values such as memory addresses, error codes or colour values. In your answer, you should refer to the readability of the numbers, the length of the numbers, and how easily hexadecimal can be converted to and from binary.
(Total for Question 19 is 6 marks)
20
A microcontroller stores unsigned integers using 8-bit registers.
(a)A register holds the binary value 10101100. Convert this value to hexadecimal. Show your working.(2)
(b)The values 10101100 and 01100101 are added together in the register. Perform the binary addition, showing your carries, and state whether an overflow occurs, giving a reason.(3)
(c)State the 8-bit binary value that would actually be stored in the register once the overflow has occurred, and give this value in denary.(2)
(Total for Question 20 is 7 marks)
Mark scheme · P2.5 Data Representation: Number Systems

Question 1

Question 2

Question 3

Question 4

Question 5

Question 6

Question 7

Question 8

Question 9

Question 10

Question 11

Question 12

Question 13

Question 14

Question 15

Question 16

Question 17

Question 18

Question 19

Question 20