Successive Mulitiplication Simulation

written by Teresa Carrigan



Top

WHAT IS IT?

This model demonstrates the successive multiplication method of converting a decimal fraction to another base. You may choose any base in the range of two to sixteen.

Top

HOW IT WORKS

Multiply the decimal fraction by the base to which you are converting. The integer part of the product will be the first digit after the radix point when we are finished. Now multiply the new fraction by the base, again storing the integer part, even if it is zero. Continue until the product is zero or you have enough digits after the radix point. This model assumes seven digits after the radix point is enough. If the base is larger than 10, then some integer parts will be larger than nine; they will have to be converted to their equivalent single digit character.

Top

HOW TO USE IT

If you want examples from a specific base: Use the number-of-digits slider to set the number of digits for the decimal number. Use the base slider to set the base. Now press the setup button. This will generate a random number with that many decimal digits past the decimal point.

If you do not care which base is used, click the random button to generate an arbitrary base, number-of-digits, and number.

The slow-motion slider is an easy way to adjust the speed of the display. Set it to zero if you want to show the final result as quickly as possible. 0.25 is a good setting for most purposes.

The step button does a single multiplication, and moves the integer part to the display at the bottom. It then stops so you can take notes. This is useful when you are first learning the method.

The go button continues multiplying until the product is zero or until there are seven digits past the radix point. The speed is determined by the slow-motion slider. This is useful when you do not need to take notes between each step.

The show-again button starts the exact problem from the beginning. You may then click either the step button or the go button to see the same demonstration.

The quiz button will generate a random number using the number-of-digits slider, and ask you to convert it to the base on the base slider. If you want to drill conversion to hexadecimal, set the base to 16 and the number-of-digits to a small number.

Top

THINGS TO NOTICE

In the successive division method, the first remainder is the rightmost digit of the answer. In this successive multiplication method however, the first digit stored is the leftmost digit of the answer (after the radix point). In either case, the first digit stored is the one closest to the radix point.

When the integer part stored is greater than nine, it must be converted to a single digit in the base.

What happens when the decimal number is something easy such as 0.1 or 0.5? Do you always get an exact answer in any base?

When there is an exact answer in base two, would there always be an exact answer for the same starting number in base 4, 8, and 16?

Top

THINGS TO TRY

Set slow-motion to 0.25, click random, and then click go.

Set the sliders to a problem type you want to drill, then click setup. Attempt one step at a time on paper, and then click the step button to check that you did that step correctly.

Top

EXTENDING THE MODEL

Allow the user to specify digits to right and left of the decimal point, and convert both sides to the base. Note: the integer part would be treated separately from the fraction part.

Allow the user to specify the precision of the answer in the new base. The current model assumes that seven places past the radix point is sufficient, and the quiz only checks for the first four places past the radix point matching.

Allow the user to input a decimal fraction, and then display the corresponding digit pattern.

Top

NETLOGO FEATURES

"ask max-one-of stack with [stack-name = "done" ] [ xcor]" was very useful in finding the right-most turtle of breed stack. The stack-name was used to indicate the state of the turtle.

"set heading towardsxy-nowrap to-x to-y" was used to guide the remainder to the correct place in the stack at the bottom.

Top

RELATED MODELS

Top

CREDITS AND REFERENCES

This model was written by Teresa W. Carrigan, 2004.

Permission to use, modify or redistribute this model is hereby granted, provided that both of the following requirements are followed:

  1. this copyright notice is included.
  2. this model will not be redistributed for profit without permission from Teresa Carrigan.
Contact Teresa Carrigan for appropriate licenses for redistribution for profit.

To refer to this model in academic publications, please use: Carrigan, T. (2004). Successive Mulitiplication Simulation model. Blackburn College, Carlinville, IL.

In other publications, please use: Copyright 2004 by Teresa W. Carrigan. All rights reserved.

Top

FOR MORE INFORMATION

For more information about conversion of fractions using successive multiplication, see:
  1. Null, L. and Lobur, J. Essentials of Computer Organization and Architecture, First Edition, Jones and Bartlett, pages 41-43.


Home

Applets on this website were written by Teresa Carrigan in 2004, for use in computer science courses at Blackburn College, with the exception of the Fireworks applet. The applets made with NetLogo require Java 1.4.1 or higher to run. The applets made with NetBeans require Java 1.4.2 or higher to run. Applets might not run on Windows 95 or Mac OS 8 or 9. You may obtain the latest Java plugin from Sun's Java site.