Languages such as python and C support writing binary numbers with a leading zero: 0b1000. Bitwise does not currently support this, but I think it is something that should be. For one, I thought bitwise had a bug when it interpreted 0b1000 as simply 0.
This merge request implements support for this. Thanks to 0x already being supported, it was a minor change and I don't expected it to break anything. Additionally, I added two new tests; one for making sure that the result is same when using b and b, and another one for making sure that there would not be any issues putting 0b in the beginning of the calculation.
Languages such as python and C support writing binary numbers with a leading zero:
0b1000
. Bitwise does not currently support this, but I think it is something that should be. For one, I thought bitwise had a bug when it interpreted0b1000
as simply0
.This merge request implements support for this. Thanks to
0x
already being supported, it was a minor change and I don't expected it to break anything. Additionally, I added two new tests; one for making sure that the result is same when usingb
andb
, and another one for making sure that there would not be any issues putting0b
in the beginning of the calculation.Thank you for a great little utility :)