I am reading about ASCII and the book said that ! was represented as 0x21.
Now I know that ! is the binary 00100001 in the ASCII table, which is also 33 in decimal, which converted to hex is 21. But what is this 0x part of the encoding 0x21?
0x is the prefix used for hexadecimal numbers in almost every C-like programming language, so it has become the de-facto standard when writing hex numbers.
Sometimes you may also find hexadecimal numbers denoted by the h suffix (many assembly dialects follow this convention), or (in BASIC dialects) by the &H prefix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With