Question 3(a)(i) 2016 · October-November · Paper 42 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 3
Part (a)
(i)
Part (a)
(i)
1 mark per bullet to max 2:
- 11011111
- AND
Show text version of question
Question 3
Part (a)
(i)
The numerical difference between the ASCII code of an upper case letter and the ASCII code of its lower case equivalent is 32 denary (3210).
For example, 'F' has ASCII code 70 and 'f' has ASCII code 102.
Bit number 7 6 5 4 3 2 1 0 ASCII code ASCII code in binary 70 0 1 0 0 0 1 1 0
102 0 1 1 0 0 1 1 0
The bit patterns differ only at bit number 5. This bit is 1 if the letter is lower case and 0 if the letter is upper case.
Question 11
(i)
A program needs a mask to ensure that a letter is in upper case.
Write the binary pattern of the mask in the space provided in the table below.
Bit number 7 6 5 4 3 2 1 0 ASCII code ASCII code in binary 70 0 1 0 0 0 1 1 0
102 0 1 1 0 0 1 1 0
Mask
Give the bit-wise operation that needs to be performed using the mask and the ASCII code.
.......................................................................................................................................[2]
Why this question appears here
71% assigned-topic match · Information representation › Data representation
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_w16_qp_42.pdf
