Convert between Binary, Decimal, Octal and Hexadecimal. Perform binary arithmetic with step-by-step results.
Enter a value in any base below โ all others update automatically.
| Dec | Binary | Octal | Hex | Dec | Binary | Octal | Hex |
|---|---|---|---|---|---|---|---|
| 0 | 0000 | 0 | 0 | 8 | 1000 | 10 | 8 |
| 1 | 0001 | 1 | 1 | 9 | 1001 | 11 | 9 |
| 2 | 0010 | 2 | 2 | 10 | 1010 | 12 | A |
| 3 | 0011 | 3 | 3 | 11 | 1011 | 13 | B |
| 4 | 0100 | 4 | 4 | 12 | 1100 | 14 | C |
| 5 | 0101 | 5 | 5 | 13 | 1101 | 15 | D |
| 6 | 0110 | 6 | 6 | 14 | 1110 | 16 | E |
| 7 | 0111 | 7 | 7 | 15 | 1111 | 17 | F |
A binary calculator is a tool that performs mathematical operations and number base conversions using the binary (base-2) number system โ the foundational language of all digital computers. Binary uses only two digits: 0 and 1. Every piece of data stored in a computer โ text, images, video, programs โ is ultimately represented as sequences of binary digits called bits.
Calculator Expert's Binary Calculator offers three modes: Number Base Conversion (between binary, decimal, octal and hexadecimal), Binary Arithmetic (addition, subtraction, multiplication, division), and Bitwise Operations (AND, OR, XOR, NOT and logical shifts).
2โฐ=1, 2ยน=2, 2ยฒ=4, 2ยณ=8, 2โด=16, 2โต=32, 2โถ=64, 2โท=128, 2โธ=256, 2โน=512, 2ยนโฐ=1024 (1K), 2ยนโถ=65536, 2ยฒโฐ=1,048,576 (1M), 2ยณยฒ=4,294,967,296 (4G). These values are memorized by programmers and engineers because they correspond to memory sizes, port numbers, register widths, and data type limits in computing.
Computer science students learning digital logic and number systems. Embedded systems engineers working with microcontrollers and hardware registers. Network engineers calculating subnet masks and IP address ranges (subnetting uses binary extensively). Cybersecurity professionals analyzing binary data and memory dumps. Game developers working with bit flags for game state management. Database engineers working with bitwise indexing. Electronics engineers designing digital circuits and logic gates.
Binary โ Decimal: Divide by 2 (to binary) or multiply by positional powers (to decimal). Binary โ Octal: Group binary digits in threes from right (each group = one octal digit). Binary โ Hexadecimal: Group binary digits in fours from right (each group = one hex digit). This makes binary-to-hex conversion very fast โ no division needed. Memorize: 0000=0, 0001=1, ... 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F.
AND (&): Returns 1 only if both bits are 1 โ used for masking. OR (|): Returns 1 if either bit is 1 โ used for setting flags. XOR (^): Returns 1 if bits differ โ used for toggling and encryption. NOT (~): Flips all bits โ used for complement operations. Left Shift (<<): Multiplies by powers of 2. Right Shift (>>): Divides by powers of 2. These operations are faster than multiplication/division at the CPU level and are used heavily in graphics, cryptography, compression, and embedded systems.
Convert Tab: Type any number in any base field (decimal, binary, octal, or hex) โ all other fields update automatically. The bit visualizer shows each bit as a green (1) or dark (0) block. Arithmetic Tab: Select your input base, enter two numbers, choose an operation (+, โ, ร, รท, mod), and click Calculate โ results appear in all four bases. Bitwise Tab: Enter two decimal numbers and click Calculate to see AND, OR, XOR, NOT, and shift results with binary representations.
This calculator uses JavaScript's 32-bit integer representation for bitwise operations, which limits values to the range โ2,147,483,648 to 2,147,483,647 for signed operations. Very large numbers (over 53-bit integers) may lose precision due to JavaScript floating-point limits. Binary fractions (e.g., 0.1 in binary) are not supported โ this tool handles integers only. Division results are shown as both quotient and remainder for exact integer division.