This calculator performs bitwise operations on two whole numbers and shows the result in decimal, hexadecimal, binary and octal at once, so you can work fluently across the number bases that programmers use every day. Computers store everything as bits, and bitwise operations act on those bits directly, which makes them fast and indispensable for low-level work: setting and clearing flags, building bitmasks, packing several small values into one number, manipulating colours and pixels, and handling permissions and hardware registers. The core operations are AND, which keeps only the bits set in both numbers; OR, which sets a bit if it is in either; XOR, the exclusive or, which sets a bit where the two differ; and NOT, which flips every bit of a single number. The two shift operations slide the bits left or right, which is the quick way to multiply or divide by powers of two. You enter your two values, in plain decimal or in hexadecimal with a leading 0x, choose the operation, and the calculator shows the answer in all four bases together with the conversions you need. Seeing decimal, hex, binary and octal side by side is the fastest way to understand what an operation actually did to the bits. Use it to debug a bitmask, to check a hex value, to learn how the operations behave, or to convert a number between bases on the fly. The hexadecimal and binary outputs are shown as unsigned 32-bit values, the usual convention for bitwise work, while the decimal result keeps its sign so a NOT result reads naturally.
Accepts decimal or 0x-prefixed hex. NOT and shifts use Value A. Hex, binary and octal show the unsigned 32-bit form. Decimal keeps its sign.
Each value is read as a whole number, in decimal or hexadecimal. The chosen operation acts on the binary bits: AND, OR and XOR combine the two numbers bit by bit, NOT flips every bit of A, and the shifts move A's bits left or right by B places. The result is then converted to decimal, hexadecimal, binary and octal.
With A = 60 (binary 111100) and B = 13 (binary 001101), the AND operation keeps only the bits set in both, giving 001100, which is 12 in decimal, 0xC in hexadecimal, 1100 in binary and 014 in octal. Choosing XOR instead would give 49, the bits where the two numbers differ.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-06-14 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.