The following table lists the notations for integer constants. Use the preferred notation for new code. The alternate notations are for porting existing code.
| Type | Preferred Notation | Alternate Notation |
|---|---|---|
| Hexadecimal | 0x followed by a string of hexadecimal digits, such as 0xdeadbeef. | $ followed by string of hexadecimal digits, such as $deadbeef. (For certain processors, this is the preferred notation.) |
| 0 followed by a string of hexadecimal digits, ending with h, such as 0deadbeefh. | ||
| Decimal | String of decimal digits, such as 12345678. | String of decimal digits followed by d, such as 12345678d. |
| Binary | % followed by a string of binary digits, such as %01010001. | 0b followed by a sting of binary digits, such as 0b01010001. |
| String of binary digits followed by b, such as 01010001b. |