Binary Calculator
Convert and calculate binary numbers.
Understanding Binary Calculator
The Binary Calculator converts whole numbers between the decimal (base-10) and binary (base-2) number systems. Decimal numbers use the digits 0 through 9, while binary numbers use only 0 and 1. Binary is the fundamental numeral system used by computers and digital electronics because two binary states can naturally represent two distinct electronic or logical states.
In a binary number, each position represents a power of 2. Starting from the rightmost position, the place values are 2°, 2¹, 2², 2³, and so on. A binary digit of 1 means that the corresponding power of 2 contributes to the value, while a digit of 0 means that it does not.
Using this calculator with your own numbers
To use Binary Calculator effectively, enter the values requested by the calculator and keep their units and meaning consistent. The main information requested on this page includes Decimal Number, Binary Number. If the calculator offers selectable methods or options, choose the one that matches the question you are trying to answer.
What can change the answer
The result is calculated from the inputs shown on this page, so it is most useful when you understand what each input represents. Before relying on the number, check the units, the scale of the result, and any assumptions described above the calculator.
About Binary Calculator
The Binary Calculator converts whole numbers between the decimal (base-10) and binary (base-2) number systems. Decimal numbers use the digits 0 through 9, while binary numbers use only 0 and 1. Binary is the fundamental numeral system used by computers and digital electronics because two binary states can naturally represent two distinct electronic or logical states.
In a binary number, each position represents a power of 2. Starting from the rightmost position, the place values are 2°, 2¹, 2², 2³, and so on. A binary digit of 1 means that the corresponding power of 2 contributes to the value, while a digit of 0 means that it does not.
For example, the binary number 1010 represents four binary positions: 1 × 2³, 0 × 2², 1 × 2¹, and 0 × 2°. Therefore, 1010₂ = 8 + 0 + 2 + 0 = 10₁₀. This positional system is the foundation of binary representation in computing and digital logic.
How Binary Numbers Work
Every binary digit is called a bit. A bit can have only one of two values: 0 or 1. The position of each bit determines its power-of-two value.
2° = 1
2¹ = 2
2² = 4
2³ = 8
2⁴ = 16
2⁵ = 32
2⁶ = 64
2⁷ = 128
Converting Binary to Decimal
To convert a binary number to decimal, multiply each bit by its corresponding power of 2 and add the resulting values.
For example, consider the binary number 1011:
= 1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2°
= 8 + 0 + 2 + 1
= 11₁₀
Converting Decimal to Binary
To convert a positive decimal integer to binary, repeatedly divide the number by 2. Record the remainder from every division. When the quotient reaches zero, read the remainders from bottom to top. This produces the binary representation.
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Reading the remainders from bottom to top:
1101₂
Therefore:
13₁₀ = 1101₂
Binary, Decimal, Octal, and Hexadecimal
The same numerical value can be represented using different number systems. Decimal uses base 10, binary uses base 2, octal uses base 8, and hexadecimal uses base 16.
Decimal: 10₁₀
Binary: 1010₂
Octal: 12₈
Hexadecimal: A₁₆
Hexadecimal is particularly useful in computing because one hexadecimal digit represents exactly four binary bits. This makes long binary values much shorter and easier to read.
Binary Place Values
The value represented by a binary number depends on the position of each bit. The rightmost bit is the least significant bit (LSB), while the leftmost bit is the most significant bit (MSB).
1 × 2⁴ = 16
1 × 2³ = 8
0 × 2² = 0
1 × 2¹ = 2
0 × 2° = 0
Total = 16 + 8 + 0 + 2 + 0 = 26
Bits and Binary Storage
A binary digit is called a bit. Eight bits form one byte. Larger groups of bits are commonly used to represent integers, characters, instructions, colors, memory addresses, and other types of digital information.
4 bits = 1 nibble
8 bits = 1 byte
With n bits, an unsigned binary representation can represent values from 0 through 2ⁿ − 1. For example, 8 unsigned bits can represent values from 0 to 255.
For 8 bits:
2⁸ − 1 = 256 − 1 = 255
Binary Arithmetic
Binary arithmetic follows the same general principles as decimal arithmetic but uses only two digits. The basic addition rules are:
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10
The result 10 in the last rule is binary and represents the decimal value 2. This is analogous to carrying in ordinary decimal addition.
Common Uses of Binary
Binary representation is used throughout computing and digital technology. It is fundamental to processor operations, computer memory, digital circuits, Boolean logic, machine instructions, network protocols, data encoding, and many other areas of computer science and electrical engineering.
Understanding binary also provides a foundation for learning hexadecimal notation, bitwise operations, Boolean algebra, digital logic, computer architecture, and programming concepts involving integers and bit manipulation.
Examples
1010₂ = 10₁₀
Decimal to Binary
10₁₀ = 1010₂
Another Example
1111₂ = 15₁₀
Hexadecimal Relationship
1111₂ = F₁₆
How to Use the Binary Calculator
Enter a decimal number in the Decimal Number field or a binary value containing only 0 and 1 in the Binary Number field, then select Calculate. The calculator converts the supplied value and displays the equivalent representation.
When a binary value is entered, the result also shows how each bit contributes to the decimal value and provides related octal and hexadecimal representations. When a decimal value is entered, the calculator shows the repeated-division-by-2 process used to obtain the binary representation.
Important Notes
Standard binary conversion represents non-negative whole numbers. Negative integers require a signed representation and a defined bit width, such as 8-bit, 16-bit, 32-bit, or 64-bit two's complement. This calculator does not assume a bit width when converting ordinary positive integers.
Binary fractions are a separate concept from integer binary conversion. A fractional binary value uses negative powers of 2 to the right of the binary point, just as decimal fractions use negative powers of 10. This calculator focuses on whole-number conversion.
Disclaimer
This calculator is intended for informational purposes only. While we strive for accuracy, we cannot guarantee that every result is correct for every situation.