What is a Binary Calculator?
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.
Because every operand and result is displayed in all four bases, the same page is a binary math calculator and a base converter. Set the input base to decimal and add 200 and 55: the answer 255 appears as 11111111 in binary and FF in hex. That covers the decimal to binary calculator and binary to hexadecimal calculator jobs without opening a separate tool, and to convert a single number you can simply add 0 to it.
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.
How to use the Binary Calculator?
Choose the input base
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.
Enter the numbers and pick an operation
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.
Set the bit width for bitwise work
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.
Read every base and copy
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.
Key Features
Arithmetic and bitwise in one tool
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.
Every base at once
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.
Selectable bit width
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.
Signed and unsigned readings
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.
Frequently Asked Questions
Related Tools
ASCII Table
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.
Binary Translator
Translate text to binary and binary to text, plus hexadecimal, decimal, and octal, with full UTF-8 support
IEEE 754 Converter
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.
Morse Code Translator
Translate text to Morse code and Morse code to text using the International (ITU) standard, with audio playback and full punctuation support
Comments
0 comments
No comments yet. Be the first to share your thoughts!