SLAU131V October 2004 – February 2020
A binary integer literal is a string of up to 32 binary digits (0s and 1s) followed by the suffix B (or b). Binary literals of the form "0[bB][10]+" are also supported. If fewer than 32 digits are specified, the assembler right justifies the value and fills the unspecified bits with zeros. These are examples of valid binary literals:
00000000B | Literal equal to 010 or 016 |
0100000b | Literal equal to 3210 or 2016 |
01b | Literal equal to 110 or 116 |
11111000B | Literal equal to 24810 or 0F816 |
0b00101010 | Literal equal to 4210 or 2A16 |
0B101010 | Literal equal to 4210 or 2A16 |