🛝Toolio
About Contact

🧮 Programmer Calculator

A programmer calculator handles hexadecimal, decimal, octal, and binary at the same time, with the bitwise operations and fixed word sizes that low-level programming needs. Enter a value in any base, apply AND, OR, XOR, NOT, shifts, or arithmetic at 8, 16, 32, or 64 bits, and read the result in all four bases at once — free, and entirely in your browser with nothing uploaded.

A programmer calculator is a free online tool that shows a number in hexadecimal, decimal, octal, and binary at the same time and computes bitwise operations (AND, OR, XOR, NOT, shifts) at a fixed 8, 16, 32, or 64-bit word size — entirely in your browser.

8 16 32 64
HEX0
DEC0
OCT0
BIN0
Bits — tap to flip
AND OR XOR NOT NAND NOR XNOR ± Lsh Rsh Mod
CE AC ÷ A B C × D E F 7 8 9 + 4 5 6 1 2 3 0 =

Tip: use your keyboard — digits, A–F, + − * /, & | ^ ~ for AND/OR/XOR/NOT, Enter for =.

Private by design. This tool runs entirely in your browser — nothing you enter is uploaded or stored, and it works offline.

About

A programmer calculator works the way developers actually think about numbers: in bits and bytes, across several bases at once. Type a value in hexadecimal, decimal, octal, or binary and the tool shows all four representations simultaneously, updating live as you type. Below the display, an interactive bit grid lets you see every individual bit of the current value and flip any of them with a single tap — invaluable for building bit masks, setting flags, or understanding how a register is laid out.

The calculator supports the full set of bitwise operations that everyday systems programming relies on: AND, OR, XOR, NOT, NAND, NOR, and XNOR, plus logical left and right shifts (Lsh and Rsh) and modulo. You can also do ordinary integer arithmetic — add, subtract, multiply, and divide — and take the two's-complement negation of any value. Every result is computed at your chosen word size: 8, 16, 32, or 64 bits. Overflow wraps exactly the way it does in real fixed-width hardware, so what you see matches what your C, Rust, or Go program will actually produce.

A Signed toggle switches the decimal readout between unsigned and two's-complement interpretation, and it also changes how division, modulo, and right shift behave — signed division truncates toward zero and signed right shift preserves the sign bit, just like your compiler. Internally everything is computed with JavaScript BigInt and masked to the word width, which means 64-bit operations are exact; the native 32-bit bitwise operators that quietly break many other web calculators are never used here.

The tool is handy well beyond professional programming, too. Students learning computer architecture can watch two's complement, sign extension, and overflow happen bit by bit; electronics and embedded hobbyists can compose the exact byte to send to a device register; and anyone debugging a hex dump, a file format, or a network packet can pull individual fields out without reaching for a scratch script. Because every base and every bit stay visible together, the relationship between a value's hex, its bits, and its decimal meaning is always in front of you.

Because the tool is aimed at low-level work, common tasks it speeds up include converting a color from hex to its RGB decimal channels, decoding Unix file-permission bits, extracting fields from a packed status register, checking the result of a bitmask, and sanity-checking shift-and-mask expressions before you commit them to code. Everything runs entirely in your browser — no server, no account, and nothing you enter ever leaves your device. Your word size, sign mode, and current value are saved locally, so the calculator is exactly as you left it next time.

How to use

  1. Pick your word size — 8, 16, 32, or 64 bits — and toggle Signed if you want two's-complement decimal, division, and shifts.
  2. Choose the input base by clicking the HEX, DEC, OCT, or BIN row, then type your number using the keypad or your physical keyboard.
  3. Apply an operation: tap a bitwise button (AND, OR, XOR, NOT, NAND, NOR, XNOR), a shift (Lsh, Rsh), Mod, or ordinary + − × ÷.
  4. Enter the second operand and press = to compute; the result appears simultaneously in hexadecimal, decimal, octal, and binary.
  5. Tap any bit in the bit grid to flip it directly, or use the copy button on any base row to copy that representation to your clipboard.

FAQ

Is this programmer calculator free, private, and offline?
Yes. It is completely free with no account or sign-up, and every calculation runs locally in your browser using JavaScript — nothing you type is uploaded. Once the page has loaded, it works fully offline.
How is this different from a number base converter?
A base converter only changes how a number is written. A programmer calculator also computes: it performs bitwise logic (AND, OR, XOR, NOT), bit shifts, modulo, and arithmetic at a fixed word size, and it lets you inspect and flip individual bits — while still showing all four bases at once.
What do the 8/16/32/64-bit word sizes do?
The word size sets how many bits the value occupies, exactly like an integer type in C, Rust, or Go. Results are masked to that width, so overflow wraps and operations like NOT produce the same value your program would. Use 8-bit for a byte, 32-bit for a typical int, or 64-bit for a long.
What is the Signed toggle and two's complement?
Signed mode interprets the top bit as a sign using two's complement, the representation almost all CPUs use. It changes the decimal readout — so 0xFF in 8-bit shows as −1 — and makes division, modulo, and right shift behave as signed operations. Leave it off for unsigned values like addresses or bit flags.
Which bitwise operations are supported?
AND, OR, XOR, NOT, NAND, NOR, XNOR, logical left shift (Lsh), a right shift (Rsh) that is logical when unsigned and arithmetic when signed, modulo, two's-complement negate (±), and standard add, subtract, multiply, and divide.
Does it handle 64-bit values correctly?
Yes. All math uses JavaScript BigInt and is masked to the selected word size, so 64-bit operations are exact. This avoids the bug in many web calculators that rely on JavaScript's native bitwise operators, which silently truncate to 32 bits.
Can I use my keyboard?
Yes. Type digits and A–F directly, use + − * / for arithmetic, & | ^ ~ for AND/OR/XOR/NOT, < and > for shifts, Enter for =, Backspace to delete, and Esc to clear.
Can you give a concrete example?
Sure. To read the red channel of the hex color #3A7BD5, choose 32-bit unsigned, enter 3A7BD5 in the HEX row, then compute the value Rsh 16 and AND with FF — the calculator shows 58 in decimal, which is the red value (green and blue come out the same way with different shifts). As another example, to check whether the owner-execute bit is set on the Unix permission 0o755, enter 755 in the OCT row and AND with 100; the result 100 is non-zero, so the bit is set. Working through cases like these across all four bases at once is exactly what a base converter alone cannot do.