0b111
0b111 is a binary literal that uses the 0b prefix to indicate that the digits following are in base 2. In binary, the digits 111 equal 1×4 + 1×2 + 1×1, which is the decimal value 7 when interpreted as unsigned.
In contexts with fixed-width signed integers, the meaning of the bit pattern 111 can depend on the
Common uses of binary literals like 0b111 include bitwise operations and bit masking. The pattern 0b111 has
Language and notation notes: many modern programming languages provide 0b-style binary literals, including languages such as