About Bitwise Calculator
Bitwise Calculator is a free set of calculators and guides for bitwise operations: AND, OR, XOR, NOT, and bit shifts, in binary, decimal, and hexadecimal. It is built and maintained by Hamza.
Who Builds This Site
I'm Hamza, a software developer and the person behind Bitwise Calculator. I write the code, the calculators, and the guides on this site. You can find my work on GitHub.
I started this project because I kept doing the same thing by hand: writing two numbers out in binary, lining up the columns, and checking a mask one bit at a time. Most online calculators gave me an answer but not the reasoning, and few of them handled fixed widths, signed values, or shifts the way real code does. So I built the tool I wanted: one that shows every bit and explains why the answer is what it is.
What You'll Find Here
- Calculators for AND, OR, XOR, NOT, bit shifts, left shifts, right shifts, and binary and hex input. Each one shows a bit-by-bit diagram and supports 8, 16, 32, and 64-bit widths.
- Guides that explain the concepts behind the tools, from two's complement and bit masking to subnet masks and endianness, with code in C, Python, and JavaScript.
How the Calculators Work
Every calculation runs in your browser. The numbers you type are never sent to a server. Results are computed with fixed-width integer arithmetic so they match what C, C++, Java, JavaScript, and Python produce once you pick the same width and signedness. The site is a static Astro site hosted on Vercel, which keeps pages fast and lightweight.
How Content Is Checked
Accuracy matters more than anything on a calculator site, so every guide follows the same rules:
- Every worked example and every number in a table is checked against the calculator and, for code samples, by running the code.
- Language-specific behaviour (such as JavaScript's 32-bit conversion or C's undefined shifts) is checked against the language's documentation.
- Guides show a "last updated" date and are revised when something is found to be wrong or unclear.
If you spot a mistake, please tell me. Corrections are always welcome and are fixed quickly.
Who It's For
- Software developers working with flags, permissions, hashes, and packed data.
- Computer science students learning logic operations, shifts, and two's complement.
- Embedded and systems engineers checking register values and pin masks.
- Network engineers working out subnet masks and header fields.
Advertising and Independence
Bitwise Calculator is free to use and is supported by advertising. Ads never change calculator results or guide content, and no one pays to be mentioned on this site. See the Privacy Policy for details about cookies and ads.
Contact
Questions, bug reports, and ideas for new tools are welcome. Use the contact form or email hello@bitwisecalculator.com.