bitwise
Interactive multi-base calculator with bit manipulation
TLDR
Interactive mode
$ bitwise
Convert decimal$ bitwise 12345
Convert hexadecimal$ bitwise 0x563d
Calculate expression$ bitwise "0x123 + 0x20 - 30"
SYNOPSIS
bitwise [OPTIONS] [value|expression]
DESCRIPTION
bitwise is a multi-base interactive calculator supporting dynamic base conversion and bit manipulation. It displays values in decimal, hexadecimal, octal, and binary simultaneously.
PARAMETERS
-i, --interactive
Force interactive mode (the default when no value or expression is given)-w, --width b8|b16|b32|b64
Set the bit width of the calculation--no-color
Disable colored output-v, --version
Print version information-h, --help
Show help messageValues can be specified in different bases:
Decimal: plain numbers (123)
Hexadecimal: 0x prefix (0x7B)
Octal: 0 prefix (0173)
Binary: 0b prefix (0b1111011)Supports C-style arithmetic and bitwise operators (NOT, OR, AND, XOR, and shifts). In command-line mode the result is printed in all bases at once.
INSTALL
sudo apt install bitwise
sudo dnf install bitwise
sudo apk add bitwise
sudo zypper install bitwise
brew install bitwise
nix profile install nixpkgs#bitwise
CAVEATS
Interactive mode provides a visual bit toggle interface. Expressions with special shell characters need quoting. Useful for low-level programming and debugging.
HISTORY
bitwise is an open-source (GPL-3.0) ncurses-based calculator written by Ramon Fried (mellowcandle). It targets low-level developers such as kernel and device-driver programmers who frequently work across number bases.
