Bitwise Calculator
LiveBitwise Calculator shows AND, OR, XOR, NAND, NOR, XNOR, NOT, shifts and rotations of two numbers at a chosen bit width.
Runs in your browser: what you enter is processed on your device and not uploaded to MyToolDock.
Bitwise Calculator shows AND, OR, XOR, NAND, NOR, XNOR, NOT, shifts and rotations of two numbers at a chosen bit width.
Runs in your browser: what you enter is processed on your device and not uploaded to MyToolDock.
Bitwise Calculator shows AND, OR, XOR, NAND, NOR, XNOR, NOT, shifts and rotations of two numbers at a chosen bit width. Values use two’s complement, so -1 is all ones. A number must fit the chosen width. Arithmetic right shift keeps the sign bit and logical right shift fills with zeros.
Pick the bit width first. NOT and rotations give different answers at 8, 16, 32 and 64 bits.
Pick a bit width, enter A and B in decimal, hex (0x), binary (0b) or octal (0o), and set a shift amount. The table shows every operation as unsigned and signed values, hex and binary.
Negative numbers are accepted and shown in two's complement.
All thirteen operations were compared with Python integers on 400 random cases at 8, 16, 32 and 64 bits (negatives, boundary values, mixed number bases, shifts from 0 to over twice the width), along with the signed values, hex, binary and bit counts.
Values must fit the chosen width, from the lowest signed value to the highest unsigned value. Shifts and rotations use the amount you enter; rotations wrap around by that amount modulo the width. Shifts up to 100,000 are accepted.
>> copies the sign bit into the new left bits, while >>> always fills with zeros.
Computers store negative numbers in two's complement, where -1 sets every bit.
No. They are processed in your browser.
Bitwise Calculator shows AND, OR, XOR, NAND, NOR, XNOR, NOT, shifts and rotations of two numbers at a chosen bit width. Values use two’s complement, so -1 is all ones. A number must fit the chosen width. Arithmetic right shift keeps the sign bit and logical right shift fills with zeros.
Two numbers in decimal, hex (0x), binary (0b) or octal (0o), a bit width and a shift amount.
Your numbers stay in your browser and are not uploaded.
Yes, MyToolDock Bitwise Calculator is 100% free with no registration, subscriptions, or limits. All features are fully unlocked.
More in Developer Tools · Browse all tools