Unicode character codes are UTF-8 encoded before being stored in memory. A lot of languages, like HTML, do the conversion for us and allow us to just use the Unicode character code. However, some assemblers and compilers don't do this out of the box and some teachers like making you do the conversions by hand.
I decided to make a quick tutorial on how to do the conversion by hand in case Unicode character codes are not enough for your assembler, compiler or teacher. I am assuming you have already had an introduction to this topic and just want to know how to do the actual conversion. Neither hexadecimal nor binary numbers are explicitly denoted but they are pretty easy to tell apart.
Find the character code you want to convert to hex. These codes are in hex but for any code bigger than
7F you will need to do an extra conversion to get the actual hex value.
7Fthen no conversion is necessary.
Zhas the character code
005Aso in hex it's simply
7Fwe need to convert the character code to binary first.
07FFyou convert the character code to binary, then simply use the template
xxxxand fill the binary number you got into the x's starting from the back.
Ähas the character code
C4), that's bigger than
7Fso we convert it to binary and get
FFFFuse the template
10FFFFuse the template
Quite simple, right?