Bitwise & integer math
Binary Calculator
Binary calculator with bitwise operations (AND, OR, XOR, NOT, NAND), bit shifting, 2's complement, and real-time decimal/hex/octal conversions. Perfect for computer science and digital logic.
By Jeff Beem
Updated
Binary Inputs & Operations
Decimal: 11
Hex: 0xB
Decimal: 13
Hex: 0xD
Enter binary numbers to see result
Results update automatically as you type
1011 + 1101 = 11000
1011 plus 1101 is 11000 in binary, which is 24 if you convert it. You keep writing 0 and carrying 1 left until the answer needs five bits, not four. You can also subtract, multiply, and divide in the same two boxes, and decimal and hex show up under each field as you type.
Where people get surprised
Subtraction flips bits, then adds
Multiplication is a pile of shifted adds
The binary answer can outgrow the decimal label
Binary calculator: add, subtract, multiply, and divide in base 2
1011 + 1101 = 11000 (24 in decimal). Subtraction flips bits and adds; division gives the quotient only, not the remainder. Decimal and hex under the boxes are reliable for normal homework, not for absurdly long bit strings.
What this calculator does
- Outputs:Binary result plus decimal and hex when the value fits safe integer parsing. Operand fields show the same conversions live.
- Limits:No fixed-width signed mode (8/16/32-bit two's complement with overflow discard). No floating-point binary, shifts, or bitwise AND/OR/XOR. Division returns the integer quotient only, not remainder. Decimal/hex side labels lose accuracy past ~53 bits even if the binary operation still completes.
The math
- Addition:Column sums from the right; carry 1 when a column totals 2 or 3. 1011 + 1101 โ 11000 (24).
- Subtraction:Pad to equal length, 2's complement the subtrahend (invert, +1), add. 1011 โ 1101 โ 1110 as bits; decimal under the result reads 14 unless you interpret a specific width.
- Multiplication:Shift-and-add: 1011 ร 1101 โ 10001111 (143). Uses big integers internally.
- Division:Integer quotient in binary. 1101 รท 101 โ 10 (13 รท 5 = 2). Remainder 11 (3) exists on paper but is not listed in the UI.
- Hex grouping:1011 1101 โ BD. Pad the leftmost group to four bits if needed.
Using the calculator
- Operands:Only 0 and 1. Leading zeros are fine; subtraction trims leading zeros on the result.
- Operations:+ addition, โ subtraction (2's complement add), ร multiplication, รท integer division (quotient only).
- Errors:Divide by zero shows an error. Bad characters are filtered with a short message.
- History:Last ten lines in the session; not saved to a server.
- Privacy:Runs in the browser; nothing is uploaded.
FAQ
How do I add binary numbers?
How does subtraction work here?
How do I multiply binary numbers?
How does division work?
How do I convert binary to decimal?
How do I convert binary to hexadecimal?
What happens if I type something other than 0 or 1?
How long can the binary strings be?
Mathematical Reference Note
Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.
Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.
Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.