Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Computer Science · Glosario

¿Qué es Binary fraction?

Definition 4.1 High School Computer Science · Capítulo 4 — Floating-Point Numbers

A binary fraction is a number written in base 22 with digits after a binary point: 0.b1b2b3…0.b_1 b_2 b_3 \dots stands for b1⋅12+b2⋅14+b3⋅18+…b_1 \cdot \tfrac12 + b_2 \cdot \tfrac14 + b_3 \cdot \tfrac18 + \dots, each position worth half of the one on its left. A number has a binary fraction with finitely many digits exactly when it is a fraction whose denominator can be a power of two.

The doubling method on 0.1. The fraction 0.2 comes back after four steps, so 0.1 is 0.0\,0011\,0011\,0011… in base 2.
The doubling method on 0.10.1. The fraction 0.20.2 comes back after four steps, so 0.10.1 is 0.0 0011 0011 0011…0.0\,0011\,0011\,0011\dots in base 22.
Leer en el capítulo →