Write the binary code for EXAM in ASCII-7. (decimal code of A is 65)
2021
Write the binary code for EXAM in ASCII-7. (decimal code of A is 65)
Answer: B. 1000101101100010000011001101 — ASCII-7 assigns every character a 7-bit binary code equal to its decimal position in the ASCII table. Because uppercase letters run consecutively from A…
- A.
1001101101100010000011001101
- B.
1000101101100010000011001101
- C.
1011000100000110110001000001
- D.
1000001101100010011011011000
Attempted by 231 students.
Show answer & explanation
Correct answer: B
ASCII-7 assigns every character a 7-bit binary code equal to its decimal position in the ASCII table. Because uppercase letters run consecutively from A onward, once one letter's decimal code is known, any other uppercase letter's code equals that anchor value plus its alphabetical offset from A. Encoding a word means converting each character to its 7-bit binary code and concatenating the codes in the word's original order.
E is the 5th letter of the alphabet, 4 places after A, so its decimal code = 65 + 4 = 69.
X is the 24th letter of the alphabet, 23 places after A, so its decimal code = 65 + 23 = 88.
A's decimal code is given directly in the question as 65.
M is the 13th letter of the alphabet, 12 places after A, so its decimal code = 65 + 12 = 77.
Convert each decimal value to its 7-bit binary equivalent: 69 becomes 1000101, 88 becomes 1011000, 65 becomes 1000001, and 77 becomes 1001101.
Concatenate the four 7-bit codes in the order E-X-A-M: 1000101 1011000 1000001 1001101, which gives 1000101101100010000011001101.
As a check, the total length is 4 x 7 = 28 bits, matching the length of every option, and substituting the anchor confirms that A's own 7-bit block, 1000001, equals decimal 65 exactly as given in the question.