Base 10/Base 2 or Base 2/Base 10 conversion

Hi !

Is there any one know how to write pascal code to convert :

1. base 10 to base 2 number (e.g. 5 (base 10) = 101 (base 2)

2. base 2 to base 10 (e.g. 101 (base 2) = 5 (base 10))

3. real number (base 10) to real number (base 2) (e.g. 2.50 (base 10)

= ????? (base 2))

4. real number (base 2) to real number (base 10)

base on input criteria:

1 = 8 bit

2 = 16 bit