Bitwise Calculator
Calculate AND, OR, XOR, NOT and shifts on 8, 16, 32 or 64-bit values with decimal, hex and binary output.
Inputs accept decimal, 0x hex or 0b binary. Values are treated as unsigned integers of the chosen width.
What are bitwise operations for?
Bitwise operators work on the individual bits of integers. They're used for flags, permission masks, hardware registers, network protocols, encryption algorithms and game development.
Supported operations
- AND (&), OR (|), XOR (^)
- NOT (~)
- Left shift (<<) and right shift (>>)
Flexible input and output
Enter values in decimal, hexadecimal with 0x or binary with 0b. Results are shown in decimal, hex and binary together. Choose an 8, 16, 32 or 64-bit width to simulate real hardware behaviour.
How to use Bitwise Calculator
- Enter the first and, if needed, the second value.
- Choose the operation and bit width.
- Review the result in decimal, hex and binary.
- Copy the format you need.
Why use this tool?
Quickly verify bit masks when working on embedded systems and low-level code.
FAQ
Why does NOT 0 give 4294967295?
NOT flips every bit at the chosen width. In an unsigned 32-bit value all 32 bits become 1, which is 4,294,967,295.
What is XOR used for?
Finding differing bits, toggling bits and simple encryption tricks.
What does shifting left by 1 do?
It multiplies the value by 2; bits that overflow the chosen width are discarded.
Related tools
Number Base Converter
Convert between binary, octal, decimal, hexadecimal and any base from 2 to 36; e.g. 255 = FF.
Open toolIP to Binary Converter
Convert IPv4 addresses to dotted binary and back, with hex and 32-bit integer forms.
Open toolIPv4 Subnet Calculator
Get the network, broadcast, host range, subnet and wildcard mask for any IPv4 address and prefix.
Open toolASCII Converter and Table
Convert text to decimal, hex, binary or octal ASCII codes and back, with a searchable ASCII table.
Open tool