
A binary calculator performs arithmetic and bitwise operations on integers written in base two. Enter two numbers, choose an operation such as add, subtract, multiply, divide, AND, OR, XOR, or a bit shift, and the tool returns the answer with every step shown in binary, octal, decimal, and hexadecimal at once. You are not limited to base two either: switch the input base and you can add a hex value to another hex value, or XOR two decimal numbers, without converting anything by hand first.
Two families of operations behave differently, and the tool keeps them separate. Arithmetic (add, subtract, multiply, divide, modulo) works on the true mathematical value, so it is exact no matter how many digits you enter and division reports the integer quotient along with any remainder. Bitwise operations (AND, OR, XOR, NAND, NOR, XNOR, NOT, and left and right shifts) act on the raw bit pattern inside a fixed register, so they depend on a chosen width. That is why the tool lets you pick 8, 16, 32, or 64 bits: NOT of a number, or a shift that pushes bits off the end, only has a defined answer once you know how wide the register is, exactly as in C, Java, Go, or Rust.
Fixed-width bitwise results are shown using two's-complement, the representation nearly every processor uses for signed integers. When a bitwise result has its top bit set, the tool reports both the unsigned reading and the signed reading, so you can see why ~5 becomes 250 in eight unsigned bits but −6 when the same bits are read as signed. Everything runs in your browser using JavaScript BigInt, so values never overflow silently and nothing you enter is uploaded, logged, or stored. The calculator keeps working with your network disconnected once the page has loaded.
Pick binary, octal, decimal, or hex for the numbers you are entering. Both operands are read in the base you select, and prefixes like 0b, 0o, and 0x are accepted and ignored.
Type the first value, choose add, subtract, multiply, divide, modulo, or a bitwise operation such as AND, OR, XOR, NOT, or a shift, then type the second value. NOT and shifts use only the first operand and the amount.
For AND, OR, XOR, NOT, NAND, NOR, XNOR, and shifts, select 8, 16, 32, or 64 bits. Arithmetic ignores the width and stays exact at any size, while bitwise results are computed inside that register.
The result appears in binary, octal, decimal, and hex together, with a signed reading for bitwise answers and a remainder for division. Copy any representation with one click.
Add, subtract, multiply, divide, and take modulo, or switch to AND, OR, XOR, NAND, NOR, XNOR, NOT, and left and right shifts, without leaving the page or converting bases by hand.
Each operand and the result are displayed in binary, octal, decimal, and hexadecimal together, so you never run a separate base conversion to check an answer.
Choose an 8, 16, 32, or 64-bit register for bitwise operations so NOT and shifts behave exactly as they would in a fixed-width integer type in C, Java, or Rust.
When a bitwise result has its top bit set, the tool shows both the unsigned value and the signed two's-complement value, making sign behaviour visible instead of surprising.
Full ASCII and extended Latin-1 table with decimal, hex, octal, binary, HTML entity, and character name for every code 0–255, plus a text-to-ASCII-code encoder.
Translate text to binary and binary to text, plus hexadecimal, decimal, and octal, with full UTF-8 support
Convert a decimal number to its IEEE 754 floating-point bits, or decode hex and binary back to a value. Single and double precision, with sign, exponent, and mantissa broken out.
Translate text to Morse code and Morse code to text using the International (ITU) standard, with audio playback and full punctuation support
0 comments
No comments yet. Be the first to share your thoughts!