Exercises · Q17
Q.Encode the word ‘COMPUTER’ using ASCII and convert the encode value into binary values.
Tamil Nadu DgeTextbookSubjective· 3mImportance★★★★★est
93% · 42/45 Questions
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →Encode each letter with its ASCII decimal code, then convert every code to 7-bit binary — the word becomes the concatenation of those eight 7-bit patterns.
The idea. ASCII assigns the upper-case letters the codes 65 (A) through 90 (Z). Since ASCII codes fit within 7 bits, each character of COMPUTER becomes one 7-bit binary group.
Encoding table:
| Letter | ASCII (decimal) | 7-bit binary |
|---|---|---|
| C | 67 | 1000011 |
| O | 79 | 1001111 |
| M | 77 | 1001101 |
| P | 80 | 1010000 |
| U | 85 | 1010101 |
| T | 84 | 1010100 |
| E | 69 | 1000101 |
| R | 82 | 1010010 |
Sample conversion of one code, 67, by repeated division by 2:
67/2 = 33 r 1
33/2 = 16 r 1
16/2 = 8 r 0
8/2 = 4 r 0
4/2 = 2 r 0
2/2 = 1 r 0
1/2 = 0 r 1 read remainders bottom-up: 1000011
Generate the whole encoding in Python:
word = "COMPUTER"
print([ord(c) for c in word]) …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.