CalcBits

CalcBits Icon

Learn how doubles work

Download on the App Store

CalcBits is an iOS app that I wrote to help me learn how doubles ("double-precision floating-point numbers") work. It's a calculator that helps you learn how doubles work as you use them.

Enter and manipulate numbers like you would with any calculator. As you go, CalcBits shows you how each number is stored in memory, as 64 binary bits. And because each calculation is done using double-precision floating-point arithmetic, you can see how the same calculation would work (including rounding) in your own code.

Features

  • Perform double-precision floating-point calculations, seeing the result and its binary and hexadecimal representations in memory.
  • See how the 64 bits are divided up into 1 sign bit (shown in yellow), 11 exponent bits (shown in magenta), and 52 fraction bits (shown in cyan).
  • Divide by zero or take the square root of a negative number to see how NaN (not a number) and inf (infinity) are represented.
  • Press the shift (up arrow) button to reveal the functions you would expect on a scientific calculator, such as trigonometric and hyperbolic trigonometric functions, and built-in constants for π and e.
  • Use the copy button to copy the current value or its binary or hexadecimal representation. Paste numbers copied from inside the app or from another program.
  • You can even paste binary or hexadecimal double-precision representations copied from another app, as long as they begin with 0x (hex) or 0b (binary).
  • Rotate into landscape mode for a larger, read-only view of a number's binary and hexadecimal representations.

Price and Availability

CalcBits is now available on the App Store for $0.99 USD.

Support

If you have questions or encounter any issues using CalcBits, or questions about CalcBits' privacy policy (the App Store requires you to have a privacy policy, even though CalcBits doesn't collect any personal information at all), please contact me at help@geoffrey-lovelace.com.

CalcBits Screenshot