A bicycle's speedometer is a simple counting device coupled with a stopwatch. The speedometer measures how long it takes to make one full rotation of the tire. This is also the amount of time it has taken the bike to move forward the equivalent distance of the wheel's circumference. Since speed = displacement/time, the computer quickly divides the wheel circumference (which you input when setting up the speedometer) by the time it took for that one revolution.