Binary Calculator Conversion Tool
Binary Calculator
Binary Operations & Conversions
Example: 1010 (10) + 1100 (12) = 10110 (22)
Binary is the base-2 number system used by computers, where every number is represented using only 0s and 1s. This calculator converts between binary, decimal, hexadecimal, and octal, and performs binary arithmetic (add, subtract, multiply, divide). Understanding binary is fundamental to computer science and digital electronics.
See also:
Binary Conversion
To convert decimal to binary, repeatedly divide by 2 and collect the remainders in reverse order. To convert binary to decimal, multiply each bit by its positional power of 2 and sum.
Decimal to binary (13): 13 ÷ 2 = 6 r1 6 ÷ 2 = 3 r0 3 ÷ 2 = 1 r1 1 ÷ 2 = 0 r1 Binary: 1101 (read remainders bottom to top) Binary to decimal (1101): 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8+4+0+1 = 13
Number System Bases
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 5 | 101 | 5 | 5 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
Frequently Asked Questions
Why do computers use binary?⌄
Digital computers use electronic circuits that have two distinct states: on and off (high and low voltage). Binary maps perfectly to these two states: 1 = on, 0 = off. Using more states would require circuits to distinguish finer voltage differences, making them less reliable. Binary makes hardware simple, fast, and reliable.
What is a bit, byte, and kilobyte?⌄
A bit (binary digit) is a single 0 or 1. A byte is 8 bits, representing values 0-255. A kilobyte (KB) is 1,024 bytes (2¹⁰). A megabyte (MB) is 1,024 KB. A gigabyte (GB) is 1,024 MB. Note: storage manufacturers use decimal prefixes (1 KB = 1,000 bytes), which is why a "500 GB" hard drive shows as less in your operating system.
What is hexadecimal and why is it used?⌄
Hexadecimal (base 16) uses digits 0-9 and letters A-F. Each hex digit represents exactly 4 bits (a nibble), and two hex digits represent a byte. This makes hex a compact human-readable format for binary data. Memory addresses, color codes (#FF5733), and raw data in debuggers are commonly displayed in hexadecimal.
How does binary addition work?⌄
Binary addition follows the same rules as decimal: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (write 0, carry 1), 1+1+1=11 (write 1, carry 1). Example: 1011 + 0110 = 10001. Carry the 1 just as in decimal addition whenever the sum is 2 or greater.