# IntMath Newsletter: Binary scientific notation, math game

By Murray Bourne, 31 Aug 2015

31 Aug 2015

In this Newsletter:

1. Binary numbers in scientific notation

2. Math game: Antiderivative Block

3. Math puzzles

4. Math movie: Math is forever

5. Final thought: When the last fish...

You may have noticed the frequency of Newsletters has dropped lately. This is normal over the Northern hemisphere summer period, but also I've been very busy with multiple projects. Thank you for your patience!

## 1. Binary numbers in scientific notation

Binary numbers are interesting because they're used in computers and many other electronic devices (since they represent 1 = "on" and 0 = "off").

Ever wondered how to write very small (or large) binary numbers?

First, a reminder.

### Scientific notation - decimal numbers

We write the (large-ish) number 472,800 in scientific notation as follows:

4.728 × 10^{5}

The digits in our number are in decreasing powers of 10:

4.728 = 4 × 10^{0} + 7 × 10^{−1} + 2 × 10^{−2} + 8 × 10^{−3}

Multiplying each of those terms by 10^{5} gives us:

4.723 × 10^{5} = 4 × 10^{5} + 7 × 10^{4} + 2 × 10^{3 }+ 8 × 10^{2} = 472,800.

### Scientific notation - binary numbers

In the **binary system**, we work in base 2, and we can only use two digits, 0 and 1.

An example of a binary number in scientific notation looks like this: 1.011001 × 2^{5}. (Yes, the number and power at the end are written in base 10 numbers.) The value of this number is:

1.011001 × 2^{5 }

= (1 × 2^{0} + 0 × 2^{−1} + 1 × 2^{−2} + 1 × 2^{−3} + 0 × 2^{−4} + 0 × 2^{−5} + 1 × 2^{−6}) × 2^{5}.

Multiplying the part in brackets by 2^{5} gives:

1 × 2^{5} + 0 × 2^{4} + 1 × 2^{3} + 1 × 2^{2} + 0 × 2^{1} + 0 × 2^{0} + 1 × 2^{−1}

= 32_{10} + 8_{10} + 4_{10} + 1/2 = 44.5_{10}

(I've used the subscript "10" to indicate they are base 10 numbers.)

### As fractions

In fractions, the part in brackets is equivalent to:

Multiplying each term by 2^{5} = 32 gives us:

= 44.5_{10}

### Floating point numbers aren't real

The above concept is relevant to the problem I mentioned in the last Newsletter, about YouTube's large number issue involving Psy's Gangnam Style video.

I came across an interesting related article recently by Chuck Allison, in the series *97 Things Every Programmer Should Know.*

In the article Floating Point Numbers Aren't Real, we learn that:

IEEE floating-point numbers are fixed-precision numbers based on base-two scientific notation: 1.

d_{1}d_{2}...d_{p−1}× 2^{e}

where *p* is the precision (24 for float or 32-bit, 53 for double, or 64-bit). You can see my example above is in this format.

The article explains why there is a problem with very large (and very small) numbers on computers ("floating-point numbers are approximations of real numbers"), and how **precision** of the number affects the outcome.

The author gives some warnings about coding without being aware of the limitations of floating point numbers, especially when financial matters are involved.

## 2. Resource: Antiderivative Block math game

Many math classes are really dry, but it doesn't have to be that way. There are plenty of good "serious" math games that can help students learn math in novel ways.

Maria H. Andersen of *Teaching College Math* (now *Busynessgirl*) has developed and collected an interesting set of math games. Many of them are low-tech (paper-based), while others are for tablets or other mobile devices.

In Antiderivative Block, students are encouraged to "(1) learn their derivative rules well (2) begin thinking about derivatives backwards, and (3) to learn to be careful not to mix up derivatives and antiderivatives". |

Here's the PDF for the Antiderivative Block activity.

There's also:

- Some algebra game suggestions;
- Trigonometry learning games; and
- Finally, a collection of calculus-related games.

## 3. Math puzzles

The puzzle in the last IntMath Newsletter asked about integers in geometric progression.

Correct answers with explanation were given by: Paul G, Don Miller, Henry, Tom Barrett, Rutwink Tank, and Toma Garza. Some of these solutions included a check step, which is always a good idea.

Some of the other responses included the answer only. I've had several students during my teaching career that just "see" a solution, and have trouble explaining how they derived it. I think that's perfectly reasonable, except:

- It doesn't help other people learn how to find the answer.
- Such an approach often cannot be generalised for similar, but more difficult questions (or ones where the numbers are not "nice").

### New math puzzle

There are cards numbered 1, 2, 3, ... , 2000 face down on a table. If I choose one at random, what is the probability the number on it will contain a 5?

**Bonus point: **If the cards use Roman numerals instead, what is the probability the card we choose contains a "V"?

You can leave your responses here.

## 4. Math movie - de Cabezón: Math is forever

The opening lines of the video:

Imagine you're in a bar, or a club,

and you start talking, and after a while, the question comes up,

"So, what do you do for work?"

And since you think your job is interesting,

you say, "I'm a mathematician."

Eduardo Sáenz de Cabezón s discusses the utility of mathematics in this interesting TED talk. It's in Spanish, with English subtitles. |

## 5. Final thought: When the last fish...

First Nations Canadian filmmaker and singer-songwriter Alanis Obomsawin has a great quote about money.

When the last tree is cut, the last fish is caught, and the last river is polluted; when to breathe the air is sickening, you will realize, too late, that wealth is not in bank accounts and that you can’t eat money. [Alanis Obomsawin]

Until next time, enjoy whatever you learn.

See the 10 Comments below.

31 Aug 2015 at 10:19 pm [Comment permalink]

There are 295 cards containing a 5 in their assigned numbers

making the odds of finding one, 2000 /295 or 6.77966

1 Sep 2015 at 1:56 am [Comment permalink]

There is 10% probablity that you get 5 on card out of 200 card face down on the table. (There are 10 5's in 100; 200 in 2000).

There is 50% probability that you get 5 'v' in roman numberican system. (There are 5 'v's in 10; So, there is 50 'v's in 100; 1000 'v' in 2000. 1000/2000=50; Hence, 50%)

Prit Patel

1 Sep 2015 at 1:58 am [Comment permalink]

Prit Patel, Bensalem, PA. I'm a fan.

1 Sep 2015 at 2:32 am [Comment permalink]

Page interval | Number of pages with 5

=======================

0000 - 0009 | 0001

=======================

0000 - 0049 | 0005 = 5 * 1

0050 - 0059 | 0010

0060 - 0099 | 0004 = 4 * 1

-----------------------------------------

0000 - 0099 | 0019

=======================

0000 - 0499 | 0095 = 5*19

0500 - 0599 | 0100

0600 - 0999 | 0076 = 4*19

-----------------------------------------

0000 - 0999 | 0271

=======================

0000 - 1999 | 0542 = 2*271

2000 - 2000 | 0000

-----------------------------------------

0000 - 2000 | 0542

1 Sep 2015 at 1:04 pm [Comment permalink]

The probility of a "5", is the ratio of the number of cards with a "5" to 2000. With the help of BASIC my count is 542.

P(5) = 542/2000 =.274

BASIC CODE: CC=0: FOR X=1 TO 2000: X$ =STR$(X):

S=INSTR(X$,"5"

IF S>0 THEN CC=CC+1:END IF

NEXT

PRINT CC (CC= 542

don miller

2 Sep 2015 at 3:41 am [Comment permalink]

The solution is straightforward using Mathematica's capabilities to handle lists.

1. Use Range[2000] to produce the list of integers from 1 to 2000

2. Convert each of these into a string, and then obtain its separate digits, using the functions ToString and Characters. Each of the 2000 integers is thus transformed into a sublist containing each of its digits as a string.

3. Use the test MemberQ to determine which of the sublists contain the character "5", using the function Select. See how many there are, using the function Length.

The number of cases is 542, so that the desired probability is 542/2000 = 0.271, i.e., about one in every four numbers contains the digit 5.

Bonus question: Apply the function RomanNumeral to each of the 2000 integers and repeat the procedure above, using the test MemberQ to determine which sublists contains the character "V". The number of cases is 1000, so that the desired probability is 0.5, i.e., half of the roman representations contains a "V".

Both answers were checked using simulation, with 100,000 replications, and the results agree closely .

2 Sep 2015 at 9:54 am [Comment permalink]

BONUS solution:

Probability of a "V" is (200 x 5)/2000 = 0.5

The count of 5 "V" for each 10 integers yields 1000 "V"

for the 2000 cards. For example 231,232,233,234,235,236,237,238,239,240

CCXXX1,CCXXX11,CCXXX111,CCXXX1V,CCXXXV,CCXXXV1,CCXXXV11

CCXXXV111,CCXXX1X,CCXL

NOTE: THERE ARE 5 V

DON MILLER

2 Sep 2015 at 6:04 pm [Comment permalink]

Rewrite each of the cards as a three digit number, adding leading zeroes to numbers with fewer digits and removing the leading 4th digit from numbers over 999 (this does not affect the problem as we are not changing whether any card has a 5 on it or not and are not removing any cards.)

Now break the cards into 2 sets, each of which contains each of the numbers from 000 to 999. Within each of these sets you have the same probability of choosing a card with a five in it as you do within the whole set, so we can just deal with one of them.

Now, within each set the number of cards which do not contain a 5 is 9x9x9=729 as there are 9 choices for each digit for a 3-digit number and all possible 3-digit numbers are in the set. So, there must be 1000-729=271 cards with at least one 5 on them. (all cards which don't have no 5s have at least one 5.)

So the chance of the randomly chosen card having a 5 on it is 271/1000=0.271.

Bonus: A Roman numeral can be split into sections, each of which represent one "digit" of the number, in the same way that our numbers can be split into digits, except that unlike with our numbers in this case each "digit" may be represented by more than one character. If we do this to a Roman numeral, the V character can only appear within the ones-digit section as only power-of-ten symbols (such as M, C and I) can be used as subtractors in higher "digits" than the one in which they would be written in base 10.

Now, ones-digit numbers are represented in the following way in Roman numerals:

1=I

2=II

3=III

4=IV

5=V

6=VI

7=VII

8=VIII

9=IX

0=nothing.

5 of these contain a V, so 5 out of every 10 consecutive numbers contain a V. We have 2000 cards, which is divisible by 10, so the chance of a randomly-chosen card having a V on it is 5/10=0.5.

4 Sep 2015 at 10:06 pm [Comment permalink]

the probability of drawing a card with a 5 on it is 19/100 or 19%. I still working on the roman numeral bonus question.

6 Sep 2015 at 7:06 pm [Comment permalink]

Probability = 0.271. There are 9 numbers with a '5' in up to 100 PLUS 10 more from 50 -59 = 19. Up to 1000 we have 9 lots of 19 PLUS 100 for 500 -599. Up to 2000, we have 18 lots of 19 PLUS 200 ALTOGETHER so total 'fives' = 542/2000 = 0.271. Now...for the letter 'V', we have IV,V, VI, VII, and VIII in every block of ten thus, in 2000, we have 1000/2000 = 0.5 probability. I'm assuming we do not consider 'four' as IIII which is acceptable e.g. on some clocks!(That would make the probability only 0.4 i.e. 800/2000)