Fraction Place Value Method Simulation
written by Teresa Carrigan
- What is it?
- How it works
- How to use it
- Things to notice
- Things to try
- Extending the model
- NetLogo features
- Related models
- Credits and References
- For more information
- Download the model
WHAT IS IT?
This model demonstrates the Place Value method of converting a floating point number from any base to decimal. You may choose any base in the range of two to sixteen, with a maximum of five digits to the right of the radix point.
HOW IT WORKS
The Place Value method first determines the powers by counting the digits starting with zero on the right. Next, the place value of each digit is determined. The place value is the base to the power determined in the first step. The third step is to multiply each digit by its place-value. The last step is to add all the products calculated in the third step. This gives us the decimal equivalent of an unsigned representation in another base.
HOW TO USE IT
If you want examples from a specific base: Use the to-right slider to set the number of digits to the right of the radix point. Use the base slider to set the base. Now press the setup button. This will generate a six digit random number in that base, with the specified number of digits to the right of the radix point. Note that it is possible to have leading zeroes.If you do not care which base is used, click the random button to generate an arbitrary base, to-right, 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.5 is a good setting for most purposes.
The step button demonstrates the next step of the place value method, and then stops so you can take notes. This is useful when you are first learning the method.
The go button does every remaining step, at a speed 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 base and number-of-digits sliders, and ask you to convert it to decimal. If your answer is within 0.001 decimal of the correct answer, it will be considered close enough.
THINGS TO NOTICE
When the base is 2 (binary) the digits are only 0 and 1. In this case, you don't really need the third step (multiplying); just add the place values for the digits that are 1, dropping the digits that are 0.Some floating point numbers that have only one or two digits past the radix point in one base will have an infinite number when converted to decimal. Which bases do this?
THINGS TO TRY
Set slow-motion to 0.5, 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.
Set the base to 3, and to-right to 1. Click setup until a problem appears that does not have a 0 to the right of the radix point. How many digits past the decimal point will the base ten equivalent have?
EXTENDING THE MODEL
Allow the user to input a starting digit pattern.Allow the user to input a decimal number, and then display the corresponding digit pattern.
NETLOGO FEATURES
Extensive use is made of "patch-at" and "BREED-at".It was awkward when it should be impossible to have more than one turtle at a given location to be required to say "random-one-of" in order to return a single turtle instead of an agent set.
RELATED MODELS
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:
Contact Teresa Carrigan for appropriate licenses for redistribution for profit.
- this copyright notice is included.
- this model will not be redistributed for profit without permission from Teresa Carrigan.
To refer to this model in academic publications, please use: Carrigan, T. (2004). Fraction Place Value Method Simulation Blackburn College, Carlinville IL.
In other publications, please use: Copyright 2004 by Teresa W. Carrigan. All rights reserved.
FOR MORE INFORMATION
For more information converting from another number base to decimal, see one of these textbooks:
- Null, L. and Lobur, J. Essentials of Computer Organization and Architecture, First Edition, Jones & Bartlett, pages 38, 41-44.
- Dale, N. and Lewis, J. Computer Science Illuminated Second Edition, Jones and Bartlett, pages 35-39.
HomeApplets 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.