Post History
In our documentation, we write binary numbers like this: 1010 But we write hexadecimal numbers like this: 0xABAB Now, according to the GCC compiler conventions: Numbers are normally written in...
#3: Attribution notice added
Source: https://writers.stackexchange.com/q/33563 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
In our documentation, we write binary numbers like this: **1010** But we write hexadecimal numbers like this: **0xABAB** Now, according to the GCC compiler conventions: - Numbers are normally written in **decimal**. - Binary numbers are preceded by **0b**. - Hexadecimal numbers are preceded by **0x**. But in my mind, writing binary numbers as **0b1010** just looks wrong. But I can't tell my writers "don't do it because it looks wrong", especially because we write the hex numbers with a **0x** prefix. Are there any programmers out there who can weigh in on why I **shouldn't** use the **0b** prefix? I need reinforcements :).