Binary Calculator / Converter
Use this tool in binary calculator mode to perform algebraic operations with binary numbers (add, subtract, multiply and divide binaries). Use it in binary converter mode to easily convert a binary number to a decimal notation real number, a decimal number to a binary number (decimal to binary and binary to decimal converter), as well as binary to hex and hex to binary.
What is a binary number?
A binary number is a number expressed in the binary system which is a positional numeral system with a base of 2 which uses just 2 symbols: 0 and 1 to represent all possible numerical values. For example, 10 in decimal is 1010 in binary, 100 in decimal is 1100100 in binary, while 1,000 in decimal is 1111101000 in binary. Binary numbers have signs, just like decimal ones, for example -101 is equal to -5 in decimal. Negative numbers are, for the time being, not supported in the binary calculator / binary converter above.
While binary numerals were used historically in Egypt, China, India and other cultures, since the 20-th century they are predominantly used mostly in computing: computer system designers, software engineers and programmers etc. since the underlying computer systems encode everything with the presence or absence of an electrical charge. Thus, at the lowest level of abstraction everything in a computer system is represented by ones and zeroes. Most of us, thankfully, do not need to do any arithmetic or counting in binary, but a calculator or converter may often come into play in computer programming.
Using our binary calculator you can perform arithmetic operations (addition, subtraction, multiplication and division of binary numbers) as well as use it as a binary converter for binary to decimal, decimal to binary, hex to binary and binary to hex conversions.
Here is a table of some numbers represented in the decimal, hex and binary systems (base 10, base 2 and base 16).
Converting to and from binary numbers
Converting numbers to and from binary does not change the number itself, it just changes its form. Using our binary converter above, you can do both types of conversions quickly and easily or you can read how to do it manually below. Note that binary calculation and conversion are separate operations: you do not need to perform one in order to do the other.
Binary to decimal
Each position in a binary numeral represents a power of 2 the same way each position in a decimal number represents a power of 10. For example, the number 20 in decimal is 2 · 101 + 0 · 100 = 20. The binary number 101 is then 1 · 22 + 0 · 21 + 1 · 20 = 4 + 0 + 1 = 5 in decimal.
The process of binary to decimal conversion is therefore to take each position and multiply its value by 2 to the power of the position number, counting from right to left and starting at zero. If you need to calculate large exponents like 216 you might find our exponent calculator useful.
Decimal to binary
This process is a bit more complex as we are going from a higher base to a lower base. This is where you'd really appreciate having a tool like our binary converter handy. Let us say the number we want to convert from decimal to binary is X. Begin by finding the largest power of 2 ≤ X and denote it by E. Then determine how many times the power of 16 found above goes into X and make not of that. Denote the remainder by Y1.
Repeat the above steps using Yn as a starting value until 2 is larger than the remaining value and assing the remainder to the 20 position, then assign each of the values Y1...n to its respective position and you will have your hex value.
Example decimal to binary conversion: Convert 100 in decimal to hex.
1.) Largest power E = 6 (26 = 64 ≤ 100, 27 = 128 ≥ 100)
2.) 100 / 26 = 1 (36 remainder); Y1 = 1
3.) Largest power E = 5 (25 = 32 ≤ 36, 26 = 64 ≥ 36)
4.) 32 / 25 = 1 (4 remainder); Y2 = 1
5.) Largest power E = 2 (22 = 4 ≤ 4, 23 = 8 ≥ 4)
6.) 4 / 22 = 0 (0 remainder); Y3 = 0
7.) 0 < 2; end.
For each power you have used place in its position. For the remainder place zeroes. In this case we've used powers of 2, 5 and 6, therefore the result is: 1100100 (1 · 26 + 1 · 25 + 0 · 24 + 0 · 23 + 1 · 22 + 0 · 21 + 0 · 20).
Hex to binary and binary to hex conversion follows the same principles, but with base 16 instead of base 10.
Algebraic operations with binary numbers
Using our tool in binary calculator mode you can perform the four basic arithmetic operations on binary numbers: addition, subtraction, multiplication and division. In order to do the binary calculations yourself most would prefer using a table for smaller numbers and a calculator for larger ones. Subtraction works the same way as any other number system, except when borrowing a number you need to borrow a group of 210 instead of 1010 as you would with decimals.
Cite this calculator & page
If you'd like to cite this online calculator resource and information as provided on the page, you can use the following citation:
Georgiev G.Z., "Binary Calculator", [online] Available at: https://www.gigacalculator.com/calculators/binary-calculator.php URL [Accessed Date: 21 May, 2022].