# Spell My Username in the Following Code No. 1

I have developed an interesting code which is a variation of a famous code, and I shall tell you what the code of some of the letters of the English alphabet are. Your goal is to spell my username in the code. The left column is the normal english letter, the right column is the code. Note: letters are separated by hyphens, and spaces are just spaces.

Letter Code
B 8
D 4
F 2B
H 0D
I 0B
J 7A
K 5
L 4A
Q 13

Hint 1:

Other puzzles in the series: No. 2

• Are we sure of the representation of 'Q'? My first thought was rot13(jura zbefr pbqr bs n punenpgre fgnegf jvgu n qnfu, gura jr fvzcyl pbaireg zbefr pbqr gb ovanel (qnfu -> 1 naq qbg -> 0, gura pbaireg gb urk). Gura V jbhyq rkcrpg gung D (qnfu qnfu qbg qnfu) ovanel pbairefvba ercerfragrq ol 0kQ, fb V jbhyq rkcrpg Q. Abgr gung 0kQ vf 13q, urapr zl fhfcvpvba bs n zvfgnxr) Commented Sep 15, 2022 at 15:06
• (1) In new code, is 8 == 08 ? 0D == D ? In other words , is the leading 0 significant ? (2) Are all codes 2 Digits in hex ? Or 3 Digits in Hex ?
– Prem
Commented Sep 15, 2022 at 15:35
• @Prem The leading 0 is significant, and this is not hex. Commented Sep 16, 2022 at 8:32
• @franckvivien I added a hint. Commented Sep 16, 2022 at 8:38

10-0D-0A-0A-0C-0A 10-1A-5-0A

Explanation (credits to @franckvivien for figuring out the most part of the solution):

Use Morse Code of the letter and replace - by 1 and . by 0. Convert this binary number to decimal. If there are leading 0s append a letter A-D corresponding to the number of leading 0s.

C -> -.-. -> 1010 -> 10 + no leading 0s -> 10
H -> .... -> 0000 -> 0 + 4 leading 0s -> D -> 0D
E -> . -> 0 -> 0 + 1 leading 0 -> A -> 0A
S -> ... -> 000 -> 0 + 3 leading 0s -> C -> 0C
A -> .- -> 01 -> 1 + 1 leading 0 -> A -> 1A
K -> -.- -> 101 -> 5 + no leading 0s -> 5

• Hi, congratulations, this is the correct answer! Commented Sep 20, 2022 at 7:51

One tentative answer, which supposes Q's representation is not 13. So I may be wrong....

A-0D-0A-0A-0C-0A A-1A-5-0A

Encoding explanation:

First rule: The first (or unique) character is the hex representation of Morse code of the letter, converted to binary. Using dash==1 and dot==0
For example: B:- ... == 1000 == 0x8
Note that every letter is represented by at most 4 characters in morse code, so we can always convert a letter to an hex digit.
2nd rule: If the morse representation starts with a dash, we've finished.
3rd rule: If morse representation starts with dots, we must declare how many dots are the beginning of morse code.
This is encoded as a 2nd character, using A for 1 dot, B for 2 dots, C for 3 dots and D for 4 dots
For example, H = .... (0) starts with 4 dots (D) So code is 0D
or I = .. (0) starts with 2 dots (B) Code is 0B

Based on this rules, the missing letters are encoded as follow

C: -.-. -> A (starts with a -, no second character)
E: . (0) 1 dot start(A) -> 0A
S: ... (0) 3 dots start (C) -> 0C
A: .- (1) 1 dot start (A) -> 1A

• This is a very close answer, as to what code this is based off, but Q is actually 13. +1 Though. Commented Sep 16, 2022 at 8:32
• By the way, you got E, S and A correct. Commented Sep 17, 2022 at 10:37