Question 1 Report
(a) The table shows some ASCII character codes.
| Character | Denary code | Binary code |
|---|---|---|
| A | 65 | 01000001 |
| B | 66 | |
| C | ||
| a | 97 | |
| 0 (zero) | 48 |
Complete the table by filling in the missing values.
[4]
(b) Using the pattern shown, calculate the ASCII code for the letter 'F'.
[1]
(c) Explain why the ASCII codes for uppercase and lowercase letters are different.
[1]
(d) State the number of different characters that can be represented using 7-bit ASCII.
[2]
(a) Complete the ASCII code table. [4]
ASCII assigns sequential codes to characters. The uppercase letters A-Z occupy codes 65-90, lowercase a-z occupy 97-122, and the digit characters 0-9 occupy 48-57. Each code can be converted to 8-bit binary:
| Character | Denary code | Binary code |
|---|---|---|
| A | 65 | 01000001 |
| B | 66 | 01000010 |
| C | 67 | 01000011 |
| a | 97 | 01100001 |
| 0 (zero) | 48 | 00110000 |
B = 66: 64 + 2 = 01000010. C = 67: 64 + 2 + 1 = 01000011. a = 97: 64 + 32 + 1 = 01100001. 0 = 48: 32 + 16 = 00110000. [1 per correct entry]
(b) Calculate the ASCII code for the letter 'F'. [1]
The letters follow a sequential pattern: A = 65, B = 66, C = 67, D = 68, E = 69, F = 70. Since F is the 6th letter and A starts at 65, F = 65 + 5 = 70. [1]
(c) Explain why uppercase and lowercase letters have different ASCII codes. [1]
A computer has no concept of "case" inherently. It treats each character as a distinct symbol that needs its own unique binary code. 'A' (65) and 'a' (97) look different, behave differently in sorting and searching, and must be stored as separate values. Without distinct codes, a computer could not distinguish between "Apple" and "apple". [1]
(d) State the number of different characters that can be represented using 7-bit ASCII. [2]
With 7 bits, each bit can be 0 or 1, giving \(2^7\) possible combinations:
\(2^7 = 128\) different characters. [1 for formula, 1 for correct answer]
These 128 codes cover uppercase and lowercase English letters, digits 0-9, punctuation marks, and control characters (such as newline and tab).
Everything you need to excel in your exams