2 ms·
Shameless plug: my `bc` [1] can also display bits like this, as well as do bit operations. It automatically detects how many bits your number must have and use
by gavinhoward 4y ago
Shameless plug: my `bc` [1] can also display bits like this, as well as do bit operations.
It automatically detects how many bits your number must have and uses the minimum, or you can tell it the standard bit sizes or even use a custom bit size. It will handle 2's complement signed integers.
See the manual ([2]), especially the extended math library section ([3]).
It's also a normal `bc`, with every feature of all other implementations.
I should add floating point support, though.
[1]: https://git.yzena.com/gavin/bc https://git.yzena.com/gavin/bc
[2]: https://git.yzena.com/gavin/bc/src/branch/master/manuals/bc/A.1.md https://git.yzena.com/gavin/bc/src/branch/master/manuals/bc/...
[3]: https://git.yzena.com/gavin/bc/src/branch/master/manuals/bc/A.1.md#extended-library https://git.yzena.com/gavin/bc/src/branch/master/manuals/bc/...