If 0o is for octal, and 0x is for hex....
Is there one for representing binary annotation in text form?
Posted Dec 16, 2017, 7:08 PM UTC
25
Is there one for representing binary annotation in text form?
Posted Dec 16, 2017, 7:08 PM UTC
0xABC = 0o37 47 57 = 0b1010 1011 1100
Alternatively
ABCx = 37 47 57o = 1010 1011 1100b
Although who uses octal today, honestly? I don't think I've ever seen it outside a classroom.
Unix file permissions, and as '\0' in C are the only places I see octal used.
0x is hex 0b is binary
Some languages use
0bfor binary. That said, binary numbers are also relatively easily represented in hex, since each hexadecimal digit is just 4 binary digits.