BorysLevytskyi / BitwiseCmd

Bitwise Calculator Online
http://bitwisecmd.com
GNU Affero General Public License v3.0
310 stars 14 forks source link

64bit numbers not displayed properly #13

Closed CPunch closed 1 year ago

CPunch commented 3 years ago

simply input "0xffff000000000000", the left 4 bytes are all displayed as 0

thanks for making such a useful tool btw!

annazolkieve commented 3 years ago

Confirm in 2021: 0x0fffffffff is displayed as: 0000000011111111111111111111111111111111 instead of 0000111111111111111111111111111111111111 Please fix.

BorysLevytskyi commented 1 year ago

Thank you, @CPunch and @annazolkieve for writing about this issue. I've finally got around to fixing it. The fix works only for positive 64-bit numbers for now. Negative numbers larger than 32bit are not supported. This is because the >>> operator that I use to create binary representations of negative numbers (n >>> 0) doesn't work with 64-bit numbers as of now. I'm closing this issue.