0b00000010
0b00000010 is a binary literal used in many programming languages to denote the numeric value formed by the bits 00000010. The 0b prefix signals that the following digits are in base 2. The eight-bit sequence 00000010 represents the decimal number 2.
In other common bases, this value is written as decimal 2 or hexadecimal 0x02. In ASCII, the
As a bit mask, 0b00000010 has only the second least-significant bit set (bit 1, if counting from
In an 8-bit unsigned integer, the value is 2. In an 8-bit signed two's-complement representation, the value
Support for binary literals such as 0b00000010 appears in several programming languages, including Python, C++14 and