Binary Fraction Converter (2024)

Converting integers to binary is easy; what about converting the decimal part? Learn how to do it with our binary fraction converter.

Get a better understanding of your computer with us. Here, we will teach you:

  • What a binary fraction is.
  • Where we use binary fractions.
  • The limitations of a computer and the effect on rounding.
  • How to convert from decimal fraction to binary fraction and vice-versa.
  • How to use our binary fraction converter โ€” it's simple, trust us!

Binary representation

Computers think in terms of ones and zeros โ€” that's binary code, and it is everywhere. Peek behind this converter, and you'll see a lot of those numbers!

Converting integers numbers from base 10 (decimal) to base 2 (binary) is easy and doesn't introduce errors. The same holds when you consider a number written in positional notation (when you specify the position of a digit in a number). We can't say the same of decimal numbers as you would write them on a sheet of paper, like 0.420.420.42 and 0.33333333...0.33333333...0.33333333....

๐Ÿ’ก If you want to learn how to convert integers from base 101010 to base 222, go to our decimal to binary calculator! Are you asking for other bases? We got you: try the binary to hexadecimal converter or the binary to octal converter. Omni is omni!

What is a binary fraction?

Take the decimal part of a non-integer number. That is a proper fraction โ€” its value is smaller than one. When the denominator is a power of ten (101010, 100100100, 100010001000,...), we talk of decimal fractions.

1371000=0.137\frac{137}{1000}=0.1371000137โ€‹=0.137

Representing such values in base 2 brings us the binary fractions!

How to convert fractions to binary

Converting a decimal fraction to binary is not that hard. Take any decimal fraction: we chose 0.29120.29120.2912. Make sure that the integer part is 000.

Now, multiply it by two, and see what happens.

0.2912ร—2=0.58240.2912\times 2 = 0.58240.2912ร—2=0.5824

The integer part remained 000: this is the first element of the binary fraction, 0.0...0.0...0.0.... Repeat the step; we will see something different this time.

0.5824ร—2=1.16480.5824\times 2 =1.16480.5824ร—2=1.1648

The integer part is now 111: the second element of our binary fraction will be 111: 0.01...0.01...0.01....

Remove the integer part (subtract 111), and repeat the steps again and again; your binary fraction will grow!

0.1684ร—2=0.3368โ†’0.0100.3368ร—2=0.6736โ†’0.01000.6736ร—2=1.3472โ†’0.01001โˆ’10.3472ร—2=0.6944โ†’0.0100100.6944ร—2=1.3888โ†’0.0100101\footnotesize 0.1684\times 2=0.3368 \rightarrow \textcolor{red}{0.010}\\\footnotesize 0.3368\times 2=0.6736 \rightarrow \textcolor{red}{0.0100}\\\footnotesize 0.6736\times 2=1.3472 \rightarrow \textcolor{red}{0.01001} \\\textcolor{blue}{-1}\\\footnotesize 0.3472\times 2 = 0.6944 \rightarrow \textcolor{red}{0.010010} \\\footnotesize 0.6944\times 2 = 1.3888 \rightarrow \textcolor{red}{0.0100101} \\0.1684ร—2=0.3368โ†’0.0100.3368ร—2=0.6736โ†’0.01000.6736ร—2=1.3472โ†’0.01001โˆ’10.3472ร—2=0.6944โ†’0.0100100.6944ร—2=1.3888โ†’0.0100101

Wait!

0.3888ร—2=0.7776โ†’0.010010100.7776ร—2=1.5552โ†’0.010010101โˆ’10.5552ร—2=1.1104โ†’0.0100101011โˆ’10.1104ร—2=0.2208โ†’0.01001010110\footnotesize 0.3888\times 2=0.7776 \rightarrow \textcolor{red}{0.01001010}\\\footnotesize 0.7776\times 2=1.5552 \rightarrow \textcolor{red}{0.010010101}\\\textcolor{blue}{-1}\\\footnotesize 0.5552\times 2=1.1104 \rightarrow \textcolor{red}{0.0100101011} \\\textcolor{blue}{-1}\\\footnotesize 0.1104\times 2 = 0.2208 \rightarrow \textcolor{red}{0.01001010110} \\0.3888ร—2=0.7776โ†’0.010010100.7776ร—2=1.5552โ†’0.010010101โˆ’10.5552ร—2=1.1104โ†’0.0100101011โˆ’10.1104ร—2=0.2208โ†’0.01001010110

It doesn't stop! Why is the binary fraction still growing? Let's take a look at the reason in the next section.

The conversion from binary fraction to decimal fraction

Now that you know how to convert from a decimal fraction to a binary let's learn the other way round. Take a binary fraction, any binary fraction! Did you think of 0.01101010.01101010.0110101? Great โ€” so did we. ๐Ÿ˜†

The rule behind this conversion is that every digit's position corresponds to a negative power of two.

1โ†’20=110.1โ†’2โˆ’1=121=120.01โ†’2โˆ’2=122=140.001โ†’2โˆ’3=123=180.0001โ†’2โˆ’4=124=1160.00001โ†’2โˆ’5=125=1321\rightarrow 2^0=\tfrac{1}{1}\\[0.5em]0.1\rightarrow 2^{-1}=\tfrac{1}{2^1}=\tfrac{1}{2}\\[0.5em]0.01\rightarrow 2^{-2}=\tfrac{1}{2^2}=\tfrac{1}{4}\\[0.5em]0.001\rightarrow 2^{-3}=\tfrac{1}{2^3}=\tfrac{1}{8}\\[0.5em]0.0001\rightarrow 2^{-4}=\tfrac{1}{2^4}=\tfrac{1}{16}\\[0.5em]0.00001\rightarrow 2^{-5}=\tfrac{1}{2^5}=\tfrac{1}{32}1โ†’20=11โ€‹0.1โ†’2โˆ’1=211โ€‹=21โ€‹0.01โ†’2โˆ’2=221โ€‹=41โ€‹0.001โ†’2โˆ’3=231โ€‹=81โ€‹0.0001โ†’2โˆ’4=241โ€‹=161โ€‹0.00001โ†’2โˆ’5=251โ€‹=321โ€‹

๐Ÿ™‹ We included the 0th power of two, which equals 111, only to give a better understanding of this positional conversion. Remember to limit your conversions to numbers smaller than 111!

Take your binary fraction and rewrite it, multiplying each digit by the respective power of 2. Then sum them together.

0.0110101โ†’0ร—120+0ร—121+1ร—122+1ร—123+0ร—124+1ร—125+0ร—126+1ร—1270.0110101 \rightarrow\\[0.5em]\begin{align*}\footnotesize 0\!\times\! \frac{1}{2^{0}}+0\!\times\!\frac{1}{2^1}+& \footnotesize1\!\times\!\frac{1}{2^2}+1\!\times\!\frac{1}{2^3} \\[0.5em]\footnotesize +\ 0\!\times\!\frac{1}{2^4}+1\!\times\!\frac{1}{2^5}+&\footnotesize 0\!\times\!\frac{1}{2^6}+1\!\times\!\frac{1}{2^7}\end{align*}0.0110101โ†’0ร—201โ€‹+0ร—211โ€‹++0ร—241โ€‹+1ร—251โ€‹+โ€‹1ร—221โ€‹+1ร—231โ€‹0ร—261โ€‹+1ร—271โ€‹โ€‹

Convert the fractions to their decimal equivalents:

0ร—1+0ร—0.5+1ร—0.25++1ร—0.125+0ร—0.0625++1ร—0.03125+0ร—0.015625++1ร—0.0078125=0.4140625\footnotesize 0\!\times\! 1+0\!\times\! 0.5+1\!\times\! 0.25+\\\footnotesize +1\!\times\! 0.125+0\!\times\! 0.0625+\\\footnotesize +1\!\times\! 0.03125+0\!\times\! 0.015625+\\\footnotesize +1\!\times\! 0.0078125 = 0.41406250ร—1+0ร—0.5+1ร—0.25++1ร—0.125+0ร—0.0625++1ร—0.03125+0ร—0.015625++1ร—0.0078125=0.4140625

And that's it โ€” we've converted a decimal fraction to a binary fraction!

0.01101012=0.4140625100.0110101_{2}=0.4140625_{10}0.01101012โ€‹=0.414062510โ€‹

The limitations of binary fractions

Binary fractions can't represent every decimal fraction perfectly. It's entirely possible for decimal fractions with a finite number of decimal digits (rational) to have an infinitely long binary representation. Such a conversion results in an error, with the magnitude of the error depending on the number of digits of the representation.

Take a look at the conversion from decimal fraction to binary fraction. It is possible to build every decimal number with a sum of the negative powers of 222.

โˆ‘n=1โˆž12n=1\sum_{n=1}^{\infty}\frac{1}{2^n}=1n=1โˆ‘โˆžโ€‹2n1โ€‹=1

This is a geometric series that converges to 111. By removing elements ad hoc, you can obtain every number between 000 and 111; however, the real issue here is to decide which contributions we must erase.

Since computers have a limited amount of memory โ€” they can compute only up to a certain number of digits โ€” some contributions that allow for the exact representation of a decimal fraction may be left out.

Consider the fraction 15\frac{1}{5}51โ€‹, in an 888 digits representation.

(15)10=0.2010\left(\tfrac{1}{5}\right)_{10}=0.20_{10}(51โ€‹)10โ€‹=0.2010โ€‹

This is a finite fraction: the error in the 8-digit representation is zero.

Find its binary representation, you know how to do it, but we will help you this time!

0.2000ร—2=0.4000โ†’00.4000ร—2=0.8000โ†’00.8000ร—2=1.6000โ†’1โˆ’10.6000ร—2=1.2000โ†’1โˆ’10.2000ร—2=0.4000โ†’00.2000\times 2=0.4000\rightarrow \textcolor{red}{0}\\0.4000\times 2=0.8000\rightarrow \textcolor{red}{0}\\0.8000\times 2=1.6000\rightarrow \textcolor{red}{1}\\\textcolor{blue}{-1}\\0.6000\times 2=1.2000\rightarrow \textcolor{red}{1}\\\textcolor{blue}{-1}\\0.2000\times 2 = 0.4000\rightarrow \textcolor{red}{0}0.2000ร—2=0.4000โ†’00.4000ร—2=0.8000โ†’00.8000ร—2=1.6000โ†’1โˆ’10.6000ร—2=1.2000โ†’1โˆ’10.2000ร—2=0.4000โ†’0

The last step is the same as the first, and so if we keep going, we'll end up with a repeating sequence of 001100110011s:

0.210=0.001100110011โ€ฆ20.2_{10}=0.001100110011\ldots_{\ 2}0.210โ€‹=0.001100110011โ€ฆ2โ€‹

Let's truncate it at the eighth digit:

0.210โ‰ƒ0.0011001120.2_{10}\simeq0.00110011_{2}0.210โ€‹โ‰ƒ0.001100112โ€‹

This truncated binary fraction is not equal to 0.20.20.2, even though we started there:

0.001100112=0.19921875100.00110011_{2}=0.19921875_{10}0.001100112โ€‹=0.1992187510โ€‹

The conversion resulted in an error of 0.2โˆ’0.19921875=0.0007810.2-0.19921875=0.0007810.2โˆ’0.19921875=0.000781: small, but not negligible.

๐Ÿ”Ž In modern computers, the truncation happens at 232323-th or 525252-th digit, the precision of single and double float variables. A 232323 digits truncation in the example before has an error equal to 7.15โ‹…10โˆ’87.15\cdot 10^{-8}7.15โ‹…10โˆ’8: extremely small, but still present.

The binary representation of a decimal fraction is exact only if 222 is the sole prime factor of the denominator: 1/21/21/2, 3/83/83/8, and 1013/10241013/10241013/1024 all have exact representations, on the other hand, 1/51/51/5 or 1/101/101/10 always have an error.

How to use our binary fraction converter?

You can use our binary fraction converters to convert from decimal fraction to binary and from binary fraction to decimal. Remember to pick the right one!

Select the number of digits you need in your representation. You won't be able to insert more than that number. The result will be truncated and not rounded!

Here's an example: select from binary to decimal, choose 4 digits, and input 0.10100.10100.1010. The result is 0.6250.6250.625, or 5/85/85/8.

Did you notice that its denominator has a single prime factor, 222? By inputting the number like that, we implicitly assumed that it was a finite binary fraction!

๐Ÿ™‹ If you need a different number of digits than the one provided by our defaults, go in advanced mode and insert the desired value. Remember to refresh the calculator if you want to use the default values again! ๐Ÿ˜€

Beyond 0s and 1s

We hope our binary fraction converter helped you in learning this not-so-straightforward topic. ๐Ÿคž

We have many other binary calculators: try our binary arithmetic calculator, or the dedicated tools:

  • Binary multiplication calculator;
  • Binary addition calculator.

FAQ

Can all fractions be converted to binary?

Not all fractions can be exactly converted to binary: only if the denominator is a power of 2, the binary fraction will be finite. In every other case, there will be an error in the representation. The error's magnitude depends on the number of digits used to represent it.

How to convert fractions to binary?

Take a decimal fraction and start multiplying by two the decimal part. Every time the result is smaller than 1, add a 0 to the binary representation. If the result is greater or equal to 1, add a 1 to the binary representation and subtract 1 from the multiplication result. Proceed with multiplications until the result is 0 or you reach the desired amount of digits.

Learn more on how to represent fractions in binary on omnicalculator.com.

How do you represent 0.5 in binary?

Multiply the 0.5 by 2: 0.5 ร— 2 = 1.0. Since the result is 1, add 1 to the binary fraction: 0.1.

The remaining decimal part of the number is zero; thus, the representation is complete!

What is 0.1101 in decimal?

To convert from decimal to binary, you have to sum the negative powers of two corresponding to the positions of the 1s in the binary fraction.

In the case of 0.1101, you need to sum: (1/2 ร— 1) + (1/4 ร— 1) + (1/8 ร— 0) + (1/16 ร— 1) = 13/16 = 0.8125.

Binary Fraction Converter (2024)
Top Articles
Keshav Bedi on LinkedIn: When Steve Jobs accused Bill Gates and Microsoft of copying Appleโ€™s GUIโ€ฆ
Crypto a threat to financial, economic stability | Investment Executive
11 beste sites voor Word-labelsjablonen (2024) [GRATIS]
Antisis City/Antisis City Gym
Jefferey Dahmer Autopsy Photos
Best Transmission Service Margate
Tap Tap Run Coupon Codes
Optimal Perks Rs3
Craigslist Cars And Trucks Buffalo Ny
Cosentyxยฎ 75 mg Injektionslรถsung in einer Fertigspritze - PatientenInfo-Service
Aktuelle Fahrzeuge von Autohaus Schlรถgl GmbH & Co. KG in Traunreut
2024 U-Haul ยฎ Truck Rental Review
Huge Boobs Images
Used Drum Kits Ebay
Telegram Scat
Icommerce Agent
Sprinkler Lv2
Mikayla Campinos Laek: The Rising Star Of Social Media
Hennens Chattanooga Dress Code
Td Small Business Banking Login
Decosmo Industrial Auctions
Hannaford To-Go: Grocery Curbside Pickup
2021 Volleyball Roster
Jordan Poyer Wiki
Apartments / Housing For Rent near Lake Placid, FL - craigslist
Craigslist Apartments In Philly
Cornedbeefapproved
Black Panther 2 Showtimes Near Epic Theatres Of Palm Coast
Usa Massage Reviews
HP PARTSURFER - spare part search portal
30+ useful Dutch apps for new expats in the Netherlands
Schooology Fcps
Pioneer Library Overdrive
Planned re-opening of Interchange welcomed - but questions still remain
Warn Notice Va
Restaurants Near Calvary Cemetery
Rock Salt Font Free by Sideshow ยป Font Squirrel
Suspect may have staked out Trump's golf course for 12 hours before the apparent assassination attempt
Tamil Play.com
Peter Vigilante Biography, Net Worth, Age, Height, Family, Girlfriend
When His Eyes Opened Chapter 2048
Babbychula
Pepsi Collaboration
Myanswers Com Abc Resources
Pokemon Reborn Locations
Gopher Hockey Forum
SF bay area cars & trucks "chevrolet 50" - craigslist
Does Target Have Slime Lickers
Strange World Showtimes Near Century Stadium 25 And Xd
Westport gun shops close after confusion over governor's 'essential' business list
Where To Find Mega Ring In Pokemon Radical Red
King Fields Mortuary
Latest Posts
Article information

Author: Fr. Dewey Fisher

Last Updated:

Views: 6010

Rating: 4.1 / 5 (42 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Fr. Dewey Fisher

Birthday: 1993-03-26

Address: 917 Hyun Views, Rogahnmouth, KY 91013-8827

Phone: +5938540192553

Job: Administration Developer

Hobby: Embroidery, Horseback riding, Juggling, Urban exploration, Skiing, Cycling, Handball

Introduction: My name is Fr. Dewey Fisher, I am a powerful, open, faithful, combative, spotless, faithful, fair person who loves writing and wants to share my knowledge and understanding with you.