docs icon indicating copy to clipboard operation
docs copied to clipboard

Incorrect output value in example

Open syntaxartisan opened this issue 3 years ago • 1 comments

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.

syntaxartisan avatar Aug 03 '22 03:08 syntaxartisan

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.

BillWagner avatar Aug 03 '22 13:08 BillWagner

@syntaxartisan @BillWagner #30671 "fixes" the output by adding the necessary amount of leading zeros

pkulikov avatar Aug 13 '22 13:08 pkulikov