1) connect a piece of magnet to bicycle tyre
2) add a reed switch to bicycle ( adjust reed switch so that magnet comes near to reead switch once during 1 rotation )
3) connect reed switch to any 8052 input port
4) count pulses at 8052 input port and display on lcd / 7 segment ( using formulla s= 2 * pi * r )
s= distance covered in 1 pulse
pi = 3.14
r = radius of tyre ( upto where magnet is connected )