Difficulty: Easy
Correct Answer: 1010100
Explanation:
Introduction / Context:
ASCII (American Standard Code for Information Interchange) defines 7-bit codes for letters, digits, punctuation, and control characters. Developers often need to translate between characters and their binary or hexadecimal codes for debugging, encoding, and protocol work. This item asks for the 7-bit code of uppercase “T.”
Given Data / Assumptions:
Concept / Approach:
Uppercase “T” is decimal 84 in ASCII. Converting 84 to binary: 84 = 64 + 16 + 4, corresponding to bits at positions 6, 4, and 2 set. Writing 84 in 7 bits yields 1010100. This representation is common in datasheets and protocol analyzers. In hexadecimal, the same code is 0x54, which many programmers recognize from C string dumps or UART traces.
Step-by-Step Solution:
Recall ASCII mapping: ‘‘A’’=65, ‘‘T’’ is the 20th letter, so 65 + 19 = 84.Convert 84 to binary: 84 = 64 + 16 + 4.Mark bits: 64 (2^6) → 1, 32 (2^5) → 0, 16 (2^4) → 1, 8 (2^3) → 0, 4 (2^2) → 1, 2 (2^1) → 0, 1 (2^0) → 0.Therefore the 7-bit pattern is 1 0 1 0 1 0 0 → 1010100.
Verification / Alternative check:
Hex check: 84 decimal = 0x54. Converting 0x54 to binary gives 0101 0100, which as 7-bit ASCII (drop the leading 0) is 1010100, confirming the result.
Why Other Options Are Wrong:
1011010 (90) is ‘‘Z’’; 1011100 (92) and 1011111 (95) are punctuation/other codes in 7-bit context. “None” is incorrect because 1010100 is exactly “T.”
Common Pitfalls:
Mixing uppercase with lowercase codes (lowercase “t” is 116 decimal); forgetting to use 7-bit ASCII rather than 8-bit extended encodings; misplacing bit weights when converting decimal to binary.
Final Answer:
1010100
Discussion & Comments