Numbering format in code syntax
0x followed by a series of digits means a hexadecimal number in C and many other languages (other common formats are decimal, octal, and binary).

The number of digits after the x represents the number of bits, in multiples of 4:

0x0        - 4 bits (or one "nibble")
0x00       - 8 bits (or one byte)
0x0000     - 16 bits
0x000000   - 24 bits
0x00000000 - 32 bits


But as Nick Johnson points out, regardless of the number of digits in the constant, in C a numeric constant is treated as an int unless it has an l or L suffix, or preceded by a cast.  On 8 and 16-bit machines, an int is usually 16 bits, and on 32-bit machines it is 32-bits.

Because the number is hexadecimal, each digit can represent one of 16 values, 0-9 and A-F (A=10, B=11, C=12, D=13, E=14 and F=15).

Each digit position, going from right to left, represents a hexadecimal "nibble" or four bits, with a placeholder value of 1, 16, 256, 4096, 65536, etc.

So 0x0ABC, for example would equal decimal 2748:

4096   256   16     1

  0     A     B     C     =&gt;     0*4096 + 10*256 * 11*16 + 12*1 = 2748


The 0 after the x could be omitted and you'd end up with the same thing.

The largest unsigned value in each of the fields above is:

0xf        - 15         (2⁴-1)
0xff       - 255        (2⁸-1)
0xffff     - 65535      (2¹⁶-1)
0xffffff   - 1677215    (2²⁴-1)
0xffffffff - 4294967295 (2³²-1)