# Topics

Copyright © 2008-2014 Exploring Binary

http://www.exploringbinary.com/topics/

Many of my articles address common topics; I’ve grouped them here for your convenience.

## Properties of the Powers of Two

Binary numbers are made of powers of two; these articles discuss their properties:

- How to Find the Last Digits of a Positive Power of Two
- Patterns in the Last Digits of the Positive Powers of Two
- Cycle Length of Powers of Two Mod Powers of Ten
- Seeing Powers of Five in Powers of Two and Vice Versa
- Patterns in the Last Digits of the Positive Powers of Five
- Cycle Length of Powers of Five Mod Powers of Ten
- Ending Digits of Powers of Five Form a Binary Tree

## Properties of Binary Numbers

These articles discuss properties of binary numerals:

## Binary Arithmetic

These articles discuss binary arithmetic:

## Bicimals

These articles discuss bicimals, the binary equivalent of decimals:

- Bicimals
- Converting a Bicimal to a Fraction (Subtraction Method)
- Converting a Bicimal to a Fraction (Direct Method)
- Converting a Bicimal to a Fraction (Series Method)
- “0.1 Repeating” In Binary Equals 1

## Binary Palindromes

These articles discuss binary palindromes (numbers like 1001001):

- Finding Numbers That Are Palindromic In Multiple Bases
- Counting Binary and Hexadecimal Palindromes
- The Structure of Binary/Hexadecimal Palindromes
- Counting Binary/Hexadecimal Palindromes
- In Search of Decimal/Binary/Hexadecimal Palindromes

## Visualizing Binary Numbers

These articles discuss ways to visualize binary numbers:

## Correctly Rounded Decimal to Floating-Point Conversion

These articles discuss conversion of decimal strings to floating-point binary numbers:

- Quick and Dirty Decimal to Floating-Point Conversion
- Decimal to Floating-Point Needs Arbitrary Precision
- Incorrectly Rounded Conversions in Visual C++
- Incorrectly Rounded Conversions in GCC and GLIBC
- Correctly Rounded Conversions in GCC and GLIBC
- GCC Conversions Are Incorrect, Architecture or Otherwise
- real.c Rounding Is Perfect (GCC Now Converts Correctly)
- GLIBC strtod() Incorrectly Converts 2^-1075
- Visual C++ and GLIBC strtod() Ignore Rounding Mode
- Correct Decimal To Floating-Point Using Big Integers
- How strtod() Works (and Sometimes Doesn’t)
- How GLIBC’s strtod() Works
- How GCC Converts Decimal Literals to Floating-Point
- Fast Path Decimal to Floating-Point Conversion
- strtod()’s Initial Decimal to Floating-Point Approximation
- Using Integers to Check a Floating-Point Approximation
- Adjusting the Floating-Point Approximation in strtod()
- Bigcomp: Deciding Truncated, Near Halfway Conversions
- Properties of the Correction Loop in David Gay’s strtod()
- Incorrect Directed Conversions in David Gay’s strtod()
- A Bug in the Bigcomp Function of David Gay’s strtod()
- Gay’s strtod() Returns Zero For Inputs Just Above 2^-1075
- A Better Way to Convert Integers in David Gay’s strtod()
- Double Rounding Errors in Floating-Point Conversions
- GCC Avoids Double Rounding Errors With Round-To-Odd
- Incorrect Decimal to Floating-Point Conversion In SQLite
- PHP Hangs On Numeric Value 2.2250738585072011e-308
- Why “Volatile” Fixes the 2.2250738585072011e-308 Bug
- A Better Fix for the PHP 2.2250738585072011e-308 Bug
- Java Hangs When Converting 2.2250738585072012e-308
- A Closer Look at the Java 2.2250738585072012e-308 Bug
- Incorrectly Rounded Subnormal Conversions in Java
- Nondeterministic Floating-Point Conversions in Java

## Correctly Rounded Floating-Point to Decimal Conversion

These articles discuss conversion of floating-point binary numbers to decimal strings:

- Quick and Dirty Floating-Point to Decimal Conversion
- Incorrect Floating-Point to Decimal Conversions
- Inconsistent Rounding of Printed Floating-Point Numbers
- Fifteen Digits Don’t Round-Trip Through SQLite Reals
- 15-Digit Quick and Dirty Conversions Don’t Round-Trip
- The Shortest Decimal String That Round-Trips: Examples
- Incorrect Round-Trip Conversions in Visual C++

## Printing the Contents of a Floating-Point Variable

These articles show different ways to display the exact contents of an IEEE 754 floating-point variable:

October 6th, 2013 at 10:18 am

Thx for interesting informations. Can you add :

* finding repeating paterns in binary ( for example :

1/6 = 0.0(01)= 0.00101010101010101010…

where () show repeating pattern

* expand converter to use also such notation. For example 0.((001)^{88}010)

see for more info :

http://www.hindawi.com/journals/mpe/2013/105283/ref/

TIA

October 6th, 2013 at 12:01 pm

@Adam,

These two online converters handle repeating binary; they may be helpful to you:

http://www.knowledgedoor.com/2/calculators/convert_a_number_with_a_repeating_fractional_part.html

http://www.knowledgedoor.com/2/calculators/convert_a_number_with_a_mixed_fractional_part.html

October 10th, 2014 at 2:58 pm

Thanks Rick for this helpful website. I am a teacher of Maths in Zambia, and presently my challenge is how to teach Grade 8s conversions of decimals to bicimals. For example what would be the easiest way to convert 19.525 to bicimal? Step by step please, HELP!

Thanks once more.

October 10th, 2014 at 5:00 pm

@Joe,

The best way is to do it in two steps, first converting the integer part, and then converting the fractional part. For the algorithms, take a look at my article Base Conversion in PHP Using BCMath, in particular the sections labeled “dec2bin_i()” and “dec2bin_f()”.