|
Abstract Is your computer fast? How quickly do you think it can do 100 million arithmetic problems? Do you think it could beat your friend’s computer or another one at school? Try this science project to discover an easy way to measure whether or not your computer is a math whiz.Objective Measure how long it takes your computer to perform mathematical operations (addition, subtraction, multiplication, and division) with different types of numerical data. Introduction Have you ever sat down at an old computer, turned it on, tried to open a program, and found yourself waiting...and waiting...and waiting... until finally the program opens? It probably doesn't even take that long! It takes maybe a couple of seconds or a minute, certainly not long enough to even eat an ice cream cone or listen to a new MP3, yet it feels like forever. Computer technology keeps advancing at an amazing pace, and today's computers run a lot faster than computers from ten or even five years ago. We've gotten used to the newer, faster computers, and it is hard to go back. How much faster are newer computers? Is your computer faster than your friend's? Is there a way to measure how fast a computer is? The answer is yes! Just like a sprint can tell you who is the fastest short-distance runner, a mathematical computer race can show you which computer is the fastest. In fact, manufacturers race computers all the time to test their computers and to advertise who has the fastest computer. They call this testing benchmarking. You can test your own computer, but before you do, it is a good idea to know a little more about how a computer works and what it takes to make one faster. Computers get instructions when you, the user, tell them to do something through clicks of the mouse, taps on the keyboard, or some less common input, like writing on a tablet, issuing voice commands, or using a joystick. These instructions, called inputs, tell the software (computer program) to do something. The exact instructions are usually processed (understood and acted on) by the central processing unit (CPU) which is part of the computer's hardware. The CPU, the "brain" of the computer, does the actual tasks and then stores the results in the computer's memory. For example, the software on your computer changes the task from something you understand in words, like "color this square green," to a logical or mathematical operation for the CPU to perform, like "increase the color by 50 units and store the new color value in the memory." Increasing the processing speed of the CPU or the amount of available memory are two common ways to make a computer faster. Modern computers can also multitask, meaning that the operating system (the software that runs the basics operations of the computer) splits the CPU's attention between many programs running at once. Just like you can eat a cookie, talk to a friend, reply to a text message, listen to your MP3 player, and window shop all at the same time, a computer can do a bunch of things at a time. The more things you ask it to do, however, the slower it might seem. In this science project, you will use a free program, called a Java timing applet, to measure how long it takes for your computer to perform four different mathematical operations: addition, subtraction, multiplication, and division. You will test the speed of your computer in each of these operations for four different ways of storing numbers, called data types: integers, long integers, floating-point numbers, and double-precision floating-point numbers. Both the integer and long-integer data types only store integers (counting numbers such as 1, 2, 3; no fractions) and can be either positive (+) or negative (-). The difference is that the long-integer data type can store larger numbers because it takes up more memory (64 bits) than the integer data type (32 bits). Floating-point numbers and double-precision floating-point numbers are both data types that store non-integers, such as numbers with decimals. Both of these data types can also store positive numbers (like 1.55) or negative numbers (like -1.55). The floating-point data type has a smaller range of numbers because it only uses 32 bits of memory. Because the double-precision floating point number data type uses 64 bits of memory, it has a larger range. Table 1 below gives examples of all four data types.
Measuring how long it takes your computer to solve different math problems and store answers provides useful information. Programmers use measurements to develop programs that will run quickly. Computer manufacturers use measurements as a benchmark comparison between two computers. However, you must keep in mind that with today's multitasking operating systems, measuring the execution time of any single process is difficult. The operating system splits CPU time between all of the programs that are running. No program has exclusive access to the CPU. Generally, your computer works so fast that you don't notice that it's doing multiple things at one time, especially if programs appear to respond instantly. Behind the scenes though, each program that is open or running is getting a slice of the computer's attention (CPU time), then waiting for its next turn before it can run again. In order for the applet to give you a best estimate of how long the math takes, you should close as many applications as possible, and make sure that any open applications are not performing tasks that require lots of CPU time (e.g., printing files or downloading content from the Internet) when you run your tests. Terms, Concepts, and Questions to Start Background Research To do this project, you should do research that enables you to understand the following terms and concepts:
Questions
Bibliography
Materials and Equipment
Shop for Supplies at Science Buddies Online Store
|
| Computer | Data Type | Mathematical Operation | Trial # | # of Calculations | Total Time To Perform Calculations, Milliseconds (ms) |
Note: If you see a gray box with a red "X" in the corner, you will need to update your Java Runtime Environment in order to run this applet. Go to http://www.java.com to get the latest version.
| Technical Note #1 |
|
The Java timing applet works through a series of commands:
|
Variations
Credits
Andrew Olson, Ph.D., Science Buddies
Sandra Slutz, Ph.D., Science Buddies
Last edit date: 2011-05-31 07:25:30
If you like this project, you might enjoy exploring related careers.
![]() |
Computer Programmer Computers are essential tools in the modern world, handling everything from traffic control, car welding, movie animation, shipping, aircraft design, and social networking to book publishing, business management, music mixing, health care, agriculture, and online shopping. Computer programmers are the people who write the instructions that tell computers what to do. |
![]() |
Computer Hardware Engineer Whether you are playing video games, surfing the Internet, or writing a term paper, computers are an integral part of our daily lives. Computer hardware engineers work to make computers faster, more robust, and more cost-effective. They design the microprocessor chips that make your computer function, along with the equipment that makes computing easy and fun to do. | |
|
Join Science Buddies
Become a Science Buddies member! It's free! As a member you will be the first to receive our new and innovative project ideas, news about upcoming science competitions, science fair tips, and information on other science related initiatives. |