hc, is a calculator for arbitrary bit-width two’s complement
It is primarily created for performing quick calculations and conversions between bases during hardware development, hence the name.
For quick conversions,
hc will always display the result in multiple bases:
hc can work with two’s complement numbers of any bit width:
> 5 + 0b1000i4
-3 (= 13)
Other features include:
- specific or infinite bit width,
- fixed-point numbers, specific or infinite precision,
- repeating digits for input and output,
- assignable variables,
- colored input and output,
- readline capabilities.
See the EXAMPLES section in the man page for examples of how to use them.