Skip to main content
Calculator Fractions

Fraction to Binary Calculator

Convert fractions to binary representation.

Decimals & Percents

Use the Fraction to Binary Calculator

Result
—

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.

  1. Enter the fraction

    Type the numerator and the denominator, for example 21 over 8.

  2. Find the decimal value

    The calculator divides 21 by 8 to get 2.625.

  3. Convert the whole part

    The whole part 2 becomes 10 in base 2 (1 × 2 + 0).

  4. 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

0.b1 b2 b3 ... = b1 × 1/2 + b2 × 1/4 + b3 × 1/8 + ...

Each place after the binary point is worth half of the place before. 0.011 = 1/4 + 1/8 = 3/8.

Repeated doubling

b_k = floor(2 × f_(k−1)), f_k = 2 × f_(k−1) − b_k

Double the fractional part f. The whole part of the product is the next binary digit. Stop when f reaches 0.

Terminating test

d = 2^m → at most m binary digits

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

  1. Find the decimal: 13 ÷ 16 = 0.8125.
  2. Double: 0.8125 × 2 = 1.625, so the 1st digit is 1 and 0.625 remains.
  3. Double: 0.625 × 2 = 1.25, so the 2nd digit is 1 and 0.25 remains.
  4. 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.
  5. 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.

FractionDecimalBinaryPattern
1/20.50.1Terminating
1/40.250.01Terminating
3/40.750.11Terminating
1/80.1250.001Terminating
3/80.3750.011Terminating
5/80.6250.101Terminating
7/80.8750.111Terminating
1/160.06250.0001Terminating
5/160.31250.0101Terminating
1/320.031250.00001Terminating
5/22.510.1Terminating
7/41.751.11Terminating
1/30.33330.010101...Repeating (01)
1/50.20.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/8 equals 0.101 in base 2 and connect each digit to a place value.

  • Writing fixed-point code

    Embedded developers store 3/8 as the 3-bit fraction 011 in a fixed-point register.

  • Explaining rounding errors

    Programmers show that 1/10 repeats 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/4 as 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.

Related Decimals & Percents Tools

View all 270 tools →