Binary Fraction Calculator
Convert a binary fraction to decimal or a decimal to a binary fraction, with step-by-step working, a place-value breakdown, and an adjustable bit precision for values like 0.1 that repeat forever.
https://hexacalculator.com/calculators/mathematics/arithmetic/binary-fraction-calculator
Mathematics
Arithmetic
Binary Fraction Calculator
Convert a binary fraction to decimal or a decimal to a binary fraction, with step-by-step working, a place-value breakdown, and an adjustable bit precision for values like 0.1 that repeat forever.
Binary Fraction Calculator
Enter your number
Results
(base 10)
(base 2)
Binary fraction: 1101.101
- Integer part
- Fractional part
- Approximation error
Step by step
Bit | Place value | Bit × place value |
|---|---|---|
| 1 | 2^3 = 8 | 1 × 8 = 8 |
| 1 | 2^2 = 4 | 1 × 4 = 4 |
| 0 | 2^1 = 2 | 0 × 2 = 0 |
| 1 | 2^0 = 1 | 1 × 1 = 1 |
| 1 | 2^-1 = 0.5 | 1 × 0.5 = 0.5 |
| 0 | 2^-2 = 0.25 | 0 × 0.25 = 0 |
| 1 | 2^-3 = 0.125 | 1 × 0.125 = 0.125 |
| Sum | = 13.625 |
The binary to decimal calculator tool converts numbers containing a binary fractional part (e.g. 1101.101) into their corresponding decimal value, and can also convert decimal numbers back to binary. After selecting the conversion direction and entering a number, the result as well as the full calculation process will be shown.
A binary decimal number extends the base of the binary system to the right of the radix point. Each digit to the left of the radix point has values corresponding to the familiar ones, twos, fours and eights while each digit to the right of the radix point has values corresponding to one half, one fourth and one eighth.
What is a binary decimal?
Each place in a decimal number represents a power of ten. Each place in a binary number represents a power of two. When you shift a digit to the left, it doubles its value. So one, two, four and eight. When you shift a digit to the right, it halves its value. So half, quarter, eighth and sixteenth.
Thus the binary number 1101.101 represents a whole part of 8 + 4 + 1 and a fractional part of one half plus one eighth. Adding these values together gives the decimal value 13.625.
Place | point | |||||||
|---|---|---|---|---|---|---|---|---|
Value | 8 | 4 | 2 | 1 | . | 0.5 | 0.25 | 0.125 |
1101.101 | 1 | 1 | 0 | 1 | . | 1 | 0 | 1 |
So, how do you convert a binary number to decimal?
Write powers of two over each digit and add them up, keeping the digit with value 1. As a bit can only have values 0 or 1, this conversion actually just adds up the values of all activated bits.
Let's take the example of .101 in binary. Each decimal place represents half, a quarter or an eighth. In this case there is a 1 in both the halves and eighths places so it would be worth .5 + .125 which equals .625. The calculator panel shows the same addition for each number you type in.
To convert a decimal number to binary-decimal, do the following:
Process the integer and fractional parts separately. The integer part is repeatedly divided by 2 with remainders read from bottom to top. The fractional part is instead repeatedly multiplied by 2, each time noting down the integer value of the result, i.e. either 0 or 1.
Convert 0.625. Since multiplying by 2 gives 1.25, the first bit is 1 followed by .25. Another multiplication gives us 0.5 so the next bit is 0. Another multiplication gives us 1.0 so the last bit is 1 and we are done. Reading these bits in order gives 0.101 which matches our example above.
Negative powers of two.
The key to binary decimals is negative powers of two. If you memorize a few of them, the conversion will be almost instantaneous.
Place | Power | Fraction | Decimal |
|---|---|---|---|
one half | 1/2 | 0.5 | |
one quarter | 1/4 | 0.25 | |
one eighth | 1/8 | 0.125 | |
one sixteenth | 1/16 | 0.0625 | |
one thirty-second | 1/32 | 0.03125 | |
one sixty-fourth | 1/64 | 0.015625 |
Why do some decimals have no finite representation in binary?
A rational number can be represented as a finite binary decimal only if the denominator, when reduced to its lowest terms, is a power of two. One-half, three-eighths and thirteen-sixteenths all have clean representations. Five-eighths is 0.625, and since eight is a power of two, it ends in 0.101.
One-tenth is different. Ten is two times five, and because of that extra factor of five, one-tenth cannot be represented exactly in binary. It produces a repeating pattern of 0.0001100110011, which goes on forever.
It's not a bug in the calculator. It is for the same reason that 1/3 in base 10 has an infinite repeating representation of 0.3333... If there is a repeating pattern, this tool will truncate the representation to the number of bits selected and report the difference between the truncated value and the actual value.
Bits, precision, floating point.
The number of decimal places retained determines the accuracy. For example, if we consider a tenth value, it will be rounded to 0.0625 when 4 decimals are kept and the error exceeds one third. If 8 decimals are kept, the result is 0.09765625 and the error is about 2%. With each additional digit, the remaining error roughly halves.
This is how computers store decimal numbers. Single-precision floating point numbers store 23 digits after the decimal point, while double-precision ones store 52 digits. Values like 0.1 can only be approximated in binary, so adding 0.1 and 0.2 on a computer often results in the familiar value of 0.30000000000000004 instead of simply 0.3.
Decimal | Binary fraction | Ends? |
|---|---|---|
0.5 | 0.1 | yes |
0.25 | 0.01 | yes |
0.375 | 0.011 | yes |
0.625 | 0.101 | yes |
0.8125 | 0.1101 | yes |
0.1 | 0.00011001100 (repeats) | no |
0.2 | 0.00110011001 (repeats) | no |
About negative numbers and two's complement:
This tool processes non-negative values. To process negative numbers, convert the absolute value here and then add a minus sign manually. In actual hardware, normal minuses are not used. Signed decimal numbers are stored in two's complement, where the most significant digit has a negative weight. This is different from the bitwise conversion shown here.
Frequently asked questions
- What are binary decimals?
These are numbers represented with a binary system and a binary point, such as 1101.101. Each digit after the point represents values of one half, quarter, etc., which is similar to how each digit after the decimal point represents tenths or hundredths.
- How do you convert a binary number with decimals to decimal?
Assign each position a value and add them up. The positions to the left of the decimal point have values of 1, 2, 4, 8, etc., while the positions after the decimal point have values 1/2, 1/4, 1/8, etc. Since each position can only be a 0 or a 1, you simply add up the values for the positions which contain a 1. So, for example, 0.101 would be equal to 0.5 + 0.125, or 0.625.
- How to convert a decimal number with decimals to binary?
Divide the number into its integer part and fractional part. The integer part is converted by repeatedly dividing by two and reading off the remainder from bottom to top. The fractional part is converted by repeatedly multiplying by two, noting each time the integer part of the result (so either 0 or 1), until the result is zero or the maximum number of places has been reached.
- Why can't 0.1 be represented exactly by a binary number?
Only if the denominator is a power of two, will a fraction terminate as a binary number. A tenth is the result of dividing 1 by 10. And 10 is the product of 2 and 5. Because of this factor of 5, the digits repeat infinitely in their binary representation, so computers can only store truncated approximations. That's why adding 0.1 and 0.2 in most programming languages does not get exactly 0.3.
- What role do the positions of decimal places play?
When a value is not finite, this setting determines the number of binary digits to retain after the decimal point. Numbers like 0.625 that are finite decimals will be completely accurate regardless of this setting. For repeating decimals like 0.1, more digits results in a closer approximation. Retaining 8 digits gives an error of about 2%, and retaining 16 or more digits improves accuracy further.
- How are binary fractions used in floating point numbers?
Floating point numbers store values as a sign, binary fraction and power of two. Single precision stores 23 bits for the fractional part while double precision stores 52 bits. Understanding binary fractions helps explain how small rounding errors can occur when working with decimal numbers on computers.
Related calculators






Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.
References
- Wikipedia: Binary number (fractions)
Positional binary notation, the radix point, and converting fractions between binary and decimal.
- Wikipedia: Dyadic rational
Why only fractions with a power-of-two denominator have a finite binary representation.
- Goldberg: What Every Computer Scientist Should Know About Floating-Point Arithmetic
How binary fractions underlie IEEE 754 floating-point storage and rounding error.