开发者

What is this encoding? 0x21

开发者 https://www.devze.com 2023-03-15 20:32 出处:网络
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 开发者_StackOverfl

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 开发者_StackOverflowto 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消