Convert the following numbers to their floating point binary equivalent.

In summary, for the numbers 18.25 and 1027.375, the floating point binary equivalents are 10010.01 and 100000011.011, respectively. These conversions were done using the IEEE 754 standard, which involves converting the numbers to binary, rounding to a certain number of bits, and then rearranging the bits to fit the format. Online calculators can also be used to compute these conversions.
  • #1
shamieh
539
0
Convert the following numbers to their floating point binary equivalent.

Can someone check my work?

a) 18.25

so I got 10010.01

I couldn't find an online conversion calculator anywhere.

can you also check my answer for this one?

b) 1027.375

I got

10000000011.010
 
Last edited:
Technology news on Phys.org
  • #2
shamieh said:
Convert the following numbers to their floating point binary equivalent.

Can someone check my work?

a) 18.25

so I got 10010.01

0.25= 1/4 which is "0 times 1/2+ 1 times 1/2^2.
that is, .25= 0.01.
18= 16+ 2= 1(2^4)+ 0(2^3)+ 1(2^2)+ 1(2)+ 0(1)
so 18 is 10110.
Yes, 18.25 is 10110.01 in base 2.

]I couldn't find an online conversion calculator anywhere.

can you also check my answer for this one?

b) 1027.375

I got

10000000011.010
0.375 is 3/8= (2+ 1)/8= 1/4+ 1/8= 0(1/2)+ 1(1/4) + 1(1/8) so that is 0.011
What you have is 0.010= 0(1/2)+ 1(1/4)+ 0(1/8).

1027= 1024+ 3= 2^{10}+ 2+ 1 so that is 10000000011
so 1027.375 is 100000011.011. What you have is the binary expression of 1027.25.
 
  • #3
Concerning the floating point, if you mean the IEEE 754 standard, the result depends whether you need single or double precision. I'll quote my response to a similar question from a different forum.

"Understanding IEEE 754 floating-point specification requires some time and effort. You should read your textbook or lecture notes, or at least Wikipedia pages about floating point and single-precision floating-point format.

First you need to convert 176.2058 to binary: 10110000.00110100101011110100111100001100...2. Next you round it to 24 bits: 10110000.0011010010101111. In the final representation, the decimal point should be after the first bit: 1.01100000011010010101111 * 27. The exponent is stored as the sum of 7 (or whatever it is for a given number) and 127, i.e., 134 in this case. In binary, 134 = 100001102. The first bit of significand is always 1, so it is not recorded, which leaves 23 bits. The final representation consists of the sign bit (0 means +1), the exponent and the significand. Thus, it is

0 10000110 01100000011010010101111.

Here are a couple of online calculators that can compute floating-point representation."
 

Related to Convert the following numbers to their floating point binary equivalent.

1. What is a floating point binary number?

A floating point binary number is a way of representing numbers in binary form using a scientific notation format. It consists of three components: a sign bit (1 bit), an exponent (usually 8 bits), and a mantissa (usually 23 bits).

2. How do you convert a number to its floating point binary equivalent?

To convert a number to its floating point binary equivalent, you need to first convert the number to binary form. Then, you need to determine the sign bit, exponent, and mantissa based on the binary representation of the number. Finally, you combine these components to create the floating point binary number.

3. What is the purpose of using floating point binary numbers?

Floating point binary numbers are used to represent numbers that are too large or too small to be represented accurately in standard binary form. This allows for a wider range of numbers to be represented and more precise calculations to be performed in scientific and technical fields.

4. Can any number be represented in floating point binary form?

No, not all numbers can be represented accurately in floating point binary form. There are limitations to the number of bits that can be used for the exponent and mantissa, which means that some numbers may be rounded or approximated in the conversion process.

5. Are there any disadvantages to using floating point binary numbers?

One potential disadvantage of using floating point binary numbers is the potential for round-off errors in calculations. This can occur when performing operations on numbers with a large difference in magnitude. Additionally, not all numbers can be represented accurately in floating point binary form, which can lead to inaccuracies in calculations.

Similar threads

  • Programming and Computer Science
Replies
8
Views
289
Replies
4
Views
1K
  • Programming and Computer Science
Replies
2
Views
2K
Replies
13
Views
2K
  • Computing and Technology
Replies
4
Views
1K
  • Programming and Computer Science
Replies
2
Views
38K
  • Programming and Computer Science
Replies
30
Views
4K
  • Programming and Computer Science
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
1K
  • Programming and Computer Science
Replies
34
Views
20K
Back
Top