Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Write r = 0x00 1

0x00 1 is converted to decimal, that is, 1.

& lt& lt? It is a bit operation, which shifts the value on the left by n bits to the left and fills the right with zeros.

Write r = 0x00 1

0x00 1 is converted to decimal, that is, 1.

& lt& lt? It is a bit operation, which shifts the value on the left by n bits to the left and fills the right with zeros.

Write r = 0x00 1

0x00 1 is converted to decimal, that is, 1.

& lt& lt? It is a bit operation, which shifts the value on the left by n bits to the left and fills the right with zeros.

Example 1: 1? The binary form of 000 1, shifted one place to the left: 1? & lt& lt? 1 = 000 1 & lt; & lt 1 =? 00 10? =? 2

Example 2: The binary form of 3: 0011is shifted to the left by one bit: 3.

So 0x00 1 or more? & lt& lt? 0? = 1? & lt& lt? 0 = 000 1 & lt; & lt0? =? 1

The value has not changed. It's equivalent to not having surgery.

Extension:

Various decimal writing methods of decimal constant 20 in c#;

Hexadecimal: 0x 14, using? 0x? Or? 0X? prefix

Decimal: 20, written by default, without any prefix.

Binary: 0b 10 100, using? Is it? Or? Is it? prefix

Quote:

Integer numeric type (C# reference) (Microsoft documentation)