How Fraction to Binary Calculator Works?
The Fraction to Binary Calculator works in 4 steps: it reads the fraction, divides the numerator by the denominator, converts the whole part to base 2, and converts the fractional part to base 2. The result line shows the binary, octal, and hexadecimal (hex) values together.
Enter the fraction
Type the numerator and the denominator, for example
21over8.Find the decimal value
The calculator divides 21 by 8 to get 2.625.
Convert the whole part
The whole part 2 becomes 10 in base 2 (1 × 2 + 0).
Convert the fractional part
The fractional part 0.625 equals 1/2 + 1/8, which is 0.101 in base 2. The result line shows Bin: 10.101 | Oct: 2.5 | Hex: 2.A.
Fraction to Binary Calculator Formula
The fraction to binary formula is n/d = Σ b_k × 2^-k, where each binary digit b_k is 0 or 1 and comes from repeated doubling of the fractional part.
Place values
Each place after the binary point is worth half of the place before. 0.011 = 1/4 + 1/8 = 3/8.
Repeated doubling
Double the fractional part f. The whole part of the product is the next binary digit. Stop when f reaches 0.
Terminating test
A reduced fraction terminates in binary if the denominator is a power of 2. 5/16 needs 4 digits, and 1/5 repeats.
Worked example: 13/16 to binary
- Find the decimal: 13 ÷ 16 = 0.8125.
- Double: 0.8125 × 2 = 1.625, so the 1st digit is 1 and 0.625 remains.
- Double: 0.625 × 2 = 1.25, so the 2nd digit is 1 and 0.25 remains.
- Double: 0.25 × 2 = 0.5, so the 3rd digit is 0. Double: 0.5 × 2 = 1.0, so the 4th digit is 1 and 0 remains.
- Read the digits top to bottom:
13/16= 0.1101 in base 2.
Fraction to Binary Calculator Conversion Table
The fraction to binary conversion table lists 14 fractions with the decimal value, the binary value, and the digit pattern.
| Fraction | Decimal | Binary | Pattern |
|---|---|---|---|
| 1/2 | 0.5 | 0.1 | Terminating |
| 1/4 | 0.25 | 0.01 | Terminating |
| 3/4 | 0.75 | 0.11 | Terminating |
| 1/8 | 0.125 | 0.001 | Terminating |
| 3/8 | 0.375 | 0.011 | Terminating |
| 5/8 | 0.625 | 0.101 | Terminating |
| 7/8 | 0.875 | 0.111 | Terminating |
| 1/16 | 0.0625 | 0.0001 | Terminating |
| 5/16 | 0.3125 | 0.0101 | Terminating |
| 1/32 | 0.03125 | 0.00001 | Terminating |
| 5/2 | 2.5 | 10.1 | Terminating |
| 7/4 | 1.75 | 1.11 | Terminating |
| 1/3 | 0.3333 | 0.010101... | Repeating (01) |
| 1/5 | 0.2 | 0.00110011... | Repeating (0011) |
What is Fraction to Binary Calculator?
A Fraction to Binary Calculator is a tool that writes the value of a fraction in base 2, using only the digits 0 and 1 on both sides of the binary point. 3/4 returns 0.11.
Binary fractions have 2 patterns. Fractions with a power-of-2 denominator, such as 9/16, end after a fixed number of digits. Fractions with any other prime factor in the denominator, such as 1/3 or 1/10, repeat forever. Computers store repeating values with a fixed number of bits, so 1/10 is stored as a close approximation.
The calculator shows the binary result next to the octal and hex results. Repeating values display up to the precision of a standard 64-bit floating-point number, so 1/3 shows a long string of 01 pairs.
What are the uses of Fraction to Binary Calculator?
The Fraction to Binary Calculator has 6 main uses, including computer science lessons, fixed-point coding, and rounding error checks.
Learning number systems
Computer science students see that
5/8equals 0.101 in base 2 and connect each digit to a place value.Writing fixed-point code
Embedded developers store
3/8as the 3-bit fraction 011 in a fixed-point register.Explaining rounding errors
Programmers show that
1/10repeats in binary, which explains why 0.1 + 0.2 does not equal 0.3 exactly in floating point.Designing digital audio levels
Audio engineers express gain steps such as
1/4as 0.01 in binary when setting bit-shift volume controls.Checking exam answers
Students confirm repeated-doubling answers such as
13/16 = 0.1101.Preparing lesson material
Teachers build tables that compare terminating and repeating binary fractions.