OA. free
Free
Optym Core Computer Science Core Computer Science Medium

In a certain code, A is written as 1, B is 10, C is 11, D is 100, E is 101 and so on.

Optym technical mcq question, verified with a worked answer. Free to practise - no sign-up.

In a certain code, A is written as 1, B is 10, C is 11, D is 100, E is 101 and so on. Then how is TRY code in that language?

Choose one option.
Show answer & explanation
Answer: C. C) 10100 10010 11001

Letters are mapped to their alphabetical indices in binary: T = 20 (10100), R = 18 (10010), Y = 25 (11001).

Step-by-step Derivation:
Step 1: T is the 20th letter: 20 in binary = 16 + 4 = 10100.
Step 2: R is the 18th letter: 18 in binary = 16 + 2 = 10010.
Step 3: Y is the 25th letter: 25 in binary = 16 + 8 + 1 = 11001.
Step 4: Combined code = 10100 10010 11001.