-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Binary AND returns incorrect value #4031
Copy link
Copy link
Closed
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.The issue is fixed.WG-Languageparser, language semanticsparser, language semantics
Metadata
Metadata
Assignees
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.The issue is fixed.WG-Languageparser, language semanticsparser, language semantics
Steps to reproduce
[Convert]::ToString(0xFFFFFFFFFFFF -band 0xFF0000000000,2)
[Convert]::ToString(0xFFFFFFFFFFFF -band 0x00FF00000000,2)
[Convert]::ToString(0xFFFFFFFFFFFF -band 0x0000FF000000,2)
[Convert]::ToString(0xFFFFFFFFFFFF -band 0x000000FF0000,2)
[Convert]::ToString(0xFFFFFFFFFFFF -band 0x00000000FF00,2)
[Convert]::ToString(0xFFFFFFFFFFFF -band 0x0000000000FF,2)
Expected behavior
111111110000000000000000000000000000000000000000
1111111100000000000000000000000000000000
11111111000000000000000000000000
111111110000000000000000
1111111100000000
11111111
Actual behavior
111111110000000000000000000000000000000000000000
1111111100000000000000000000000000000000
111111111111111111111111000000000000000000000000
111111110000000000000000
1111111100000000
11111111
Environment data