# Board index » delphi » Base 10/Base 2 or Base 2/Base 10 conversion

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

On Wed, 29 Oct 1997 14:12:10 GMT, loja...@netvigator.com (Ching Tian)
wrote:

##### Quote
>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

The question is, do you know the mathematical procedure for
accomplishing the above?  You wouldn't be looking for someone to do
Dennis D. Powers
PC/POLL SYSTEMS
Dennis.removet...@pcpoll.com

Support the anti-Spam amendment
Join at http://www.cauce.org/

## Re: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