Skip to content
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
🔒 Locked · start free trial →

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:

LetterASCII (decimal)7-bit binary
C671000011
O791001111
M771001101
P801010000
U851010101
T841010100
E691000101
R821010010

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.