Is there a command line calculator that will let me do bit operations and has good support for hex. E.g. for operations like:
0xff << 3
(1 << 5) ^ 0x77
Bad solutions:
bc
- laughable support for hex- Frink - might work, but it's a big java app and not easily installable through Brew etc.
- radix-calc - close to what I want, but I'd prefer a REPL, with support for variables etc.
- Python - too verbose for printing hex etc.
The software should work on a Mac and ideally be open source. Must support standard C operators, and ideally setting variables and printing them as hex.