Des Moines, WA - USA
Offline
God Member
Karma: 21
Posts: 697
|
 |
« Reply #17 on: December 21, 2012, 12:09:54 am » |
Number bases are usually denoted with a prefix.
Octal values have a leading '0' character with following characters limited to '0', '1', '2', '3', '4', '5', '6' and '7'.
010 is decimal 8
Hex values have a leading two character indicator of '0x' or '0X' with the following characters limited to '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a' (or 'A'), 'b' (or 'B'), 'c' (or 'C'), 'd' (or 'D'), 'e' (or 'E'), 'f' (or 'F').
0xF is decimal 15
Binary numbers have a leading '0b' with the following characters limited to '0' and '1'.
0b1000 is decimal 8
|