docs
docs copied to clipboard
Incorrect output value in example
I think one of your examples has an incorrect answer. Would someone double check it? For the example a ^= 0b_1000_0000; which executes the calculation 0b_1111_1000 XOR 0b_1000_0000 I believe the answer is 01111000 not 1111000 Thanks.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 02b8f7c2-379e-7876-0d36-25b06a294baa
- Version Independent ID: 2410c828-0c66-9efe-ae87-9b07708aa731
- Content: Bitwise and shift operators - C# reference
- Content Source: docs/csharp/language-reference/operators/bitwise-and-shift-operators.md
- Product: dotnet-csharp
- Technology: csharp-language-reference
- GitHub Login: @pkulikov
- Microsoft Alias: wiwagn
Sharp :eye: @syntaxartisan
The output is correct, but isn't obvious. The output doesn't include the leading zero:
1111000
vs.
01111000
We should note that in the comment on the output.
@syntaxartisan @BillWagner #30671 "fixes" the output by adding the necessary amount of leading zeros