• Home
  • About
  • Contact
  • Sitemap
  • Converter
  • Calculator
  • HowTos
  • Topics

Articles from October, 2009

Floating-Point Error in the NPR Media Player

By Rick Regan Contact e-mail icon (Published October 31st, 2009)

The NPR Media Player apparently uses floating-point numbers to represent timestamps, based on this image (click it to enlarge):

NaNs in NPR Media Player (thumbnail)

NaNs in NPR Media Player (click image to enlarge).

Continue reading …

My Custom Binary Themed Calendar for 2010

By Rick Regan Contact e-mail icon (Published October 26th, 2009)

I found twelve free stock images — all with binary themes — and made a custom calendar for 2010. Here’s May:

My Custom Binary-Themed Calendar For 2010

My Custom Binary-Themed Calendar For 2010

Continue reading …

How to Find the Last Digits of a Positive Power of Two

By Rick Regan Contact e-mail icon (Published October 14th, 2009)

A common exercise in number theory is to find the last digits of a large power, like 22009, without using a computer. 22009 is a 605-digit number, so evaluating it by hand is out of the question. So how do you find its last digits — efficiently?

Modular arithmetic, and in particular, modular exponentiation, comes to the rescue. It provides an efficient way to find the last m digits of a power, by hand, with perhaps only a little help from a pocket calculator. All you need to do is compute the power incrementally, modulo 10m.

In this article, I will discuss three methods — all based on modular exponentiation and the laws of exponents — for finding the ending digits of a positive power of two. The techniques I use are easily adapted to powers of any number.

Continue reading …


Subscribe

RSS feed icon
Get articles by RSS (What Is RSS?)
RSS e-mail icon
Get articles by e-mail

Featured Articles

  • Elements of Binary in the NCAA Basketball Tournament

    Is it basketball or binary?

  • What a Binary Counter Looks and Sounds Like

    See and hear the symmetry in binary counting.

  • Visualizing Consecutive Binary Integers

    Binary numbers in black and white.

  • Seeing Powers of Five in Powers of Two and Vice Versa

    2-3 = 0.125 and 53 = 125 -- why do they look similar?

Most Popular Articles

  • Java Hangs When Converting 2.2250738585072012e-308

    Java's decimal to floating-point conversion can lead to a DoS attack.

  • PHP Hangs On Numeric Value 2.2250738585072011e-308

    PHP's decimal to floating-point conversion can lead to a DoS attack.

Articles by Category

  • Powers of two
  • Binary numbers
  • Binary code
  • Binary logic
  • Numbers in computers
  • Background math

Articles by Tag

Algebra Binary-coded decimal Binary arithmetic Binary integers C Code Convert to binary Convert to decimal Convert to hexadecimal Decimals Education Exponents Floating-point Fractions Geekware Geometric series Java Modular arithmetic Pascal's triangle PHP Pop culture Proof

Articles by Date

  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008

Latest Articles

  • Binary Addition
  • Bigcomp: Deciding Truncated, Near Halfway Conversions
  • Exploring Binary: One Million Views
  • Using Integers to Check a Floating-Point Approximation
  • strtod()’s Initial Decimal to Floating-Point Approximation
  • Fast Path Decimal to Floating-Point Conversion
  • Why Powers of Ten Up to 1022 Are Exact As Doubles
  • Correct Decimal To Floating-Point Using Big Integers
  • Binary Numbers Haiku
  • How I Taught Third Graders Binary Numbers

Powered by WordPress

Copyright © 2008-2012 Exploring Binary