A guys how do you convert 2.2(dec) to binary number.

And how can I find a chart that I can check my results.

Thanks

## 4 Replies - 1898 Views - Last Post: 14 October 2007 - 05:34 PM

##
**Replies To:** binary number

### #2

## Re: binary number

Posted 13 October 2007 - 11:52 AM

There are a lot of ways to do so, a bunch of IEEE standards and so. You can use either fixed or floating point notation. Do you have any specific requirements?

Here is a Wiki kickstart

Here is a Wiki kickstart

### #3

## Re: binary number

Posted 13 October 2007 - 12:02 PM

1lacca, on 13 Oct, 2007 - 11:52 AM, said:

There are a lot of ways to do so, a bunch of IEEE standards and so. You can use either fixed or floating point notation. Do you have any specific requirements?

Here is a Wiki kickstart

Here is a Wiki kickstart

The requirements are: Write a conversion program for a decimal number to binary and vice versa. Binary numbers are of 16 bits: Write a conversion program for a decimal number to binary and vice versa. Binary numbers are of 16 bits: 8 bits for the whole number and 8 bits for the decimal part.

I have a program decimal to binary(only regular numbers).

I just need to add 16 bites and Write a conversion program for a decimal number to binary and vice versa. Binary numbers are of 16 bits: 8 bits for the whole number and 8 bits for the decimal part.

Thanks

### #4

## Re: binary number

Posted 13 October 2007 - 12:35 PM

Then use fix point notation, and simply multiply the rational number with 2^8 and take the integer part. Now you can use your program to convert it to binary.

Converting back is the same: use your program to convertthe binary form to decimal, and divide it with 2^8 converting the result to a float (some precision will be lost, and also, it won't be as efficient as the floating point notation, but it is simple)

Converting back is the same: use your program to convertthe binary form to decimal, and divide it with 2^8 converting the result to a float (some precision will be lost, and also, it won't be as efficient as the floating point notation, but it is simple)

Page 1 of 1