Skip to content
Exercises · Q14

Q.Write the equivalent hexadecimal and binary values for each character of the phrase given below.
“हम सब एक”

Tamil Nadu DgeTextbookSubjective· 3mImportance★★★★★est
87% · 39/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 →

Hindi (Devanagari) characters do not exist in ASCII — each character of "हम सब एक" is represented by its UNICODE code point, written in hexadecimal and stored in binary.

The idea. ASCII covers only 128 English-centric characters. Unicode assigns a unique code point to every character of every script; the Devanagari block runs from U+0900 to U+097F. To answer, look up each character's code point and expand the hex to binary (4 bits per hex digit).

The phrase "हम सब एक", character by character:

CharacterUnicode code point (hex)16-bit binary equivalent
ह09390000 1001 0011 1001
म092E0000 1001 0010 1110
(space)00200000 0000 0010 0000
स09380000 1001 0011 1000
ब092C0000 1001 0010 1100
(space)00200000 0000 0010 0000
ए090F0000 1001 0000 1111
क09150000 1001 0001 0101

The hex-to-binary step is the usual 4-bits-per-digit expansion, e.g. for ह: 0 -> 0000, 9 -> 1001, 3 -> 0011, 9 -> 1001.

Generate the whole table in Python:

for ch in "हम सब एक":
    print(repr(ch), format(ord(ch), "04X"), format(ord(ch), "016b"))
'ह' 0939 0000100100111001
'म' 092E 0000100100101110
' ' 0020 0000000000100000
'स' 0938 0000100100111000
'ब' 092C 0000100100101100
' ' 0020 0000000000100000
'ए' 090F 0000100100001111 …

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.