Question

In: Computer Science

How do you represent 5.1 (5 + 1/10) in binary? I know that it is 0101....

How do you represent 5.1 (5 + 1/10) in binary? I know that it is 0101. (point something)

Solutions

Expert Solution

The decimal value 5.1 equivalent binary representation is 101.000110011

Explanation:

1) Convert Decimal to Binary first. Convert the decimal 5 into binary that is 101. Below diagram shows how to do that.

2   |   5
--------
2  | 2 - 1
-------
| 1 - 0
------

2) Convert the fraction 0.1 into binary that is . Below steps help to do that.

Binary of 0.1 is .000110011

Step 1
----------
0.1 x 2 = 0.2

Integer = 0
Fraction = 0.2

Since fraction is not equal to 0 so continue doing the same.

Step 2
----------
0.2 x 2 = 0.4
Integer = 0
Fraction = 0.4

Since fraction is not equal to 0 so continue doing the same.

Step 3
----------
0.4 x 2 = 0.8
Integer = 0
Fractional = 0.8

Since fraction is not equal to 0 so continue doing the same.

Step 4
----------
0.8 x 2 = 1.6
Integer = 1
Fractional = 0.6

Since fraction is not equal to 0 so continue doing the same.

Step 5
----------
0.6 x 2 = 1.2
Integer = 1
Fractional = 0.2

Since fraction is not equal to 0 so continue doing the same.

Step 6
----------
0.2 x 2 = 0.4
Integer = 0
Fractional = 0.4

Since fraction is not equal to 0 so continue doing the same.

Step 7
----------
0.4 x 2 = 0.8
Integer = 0
Fractional = 0.8

Since fraction is not equal to 0 so continue doing the same.

Step 8
----------
0.8 x 2 = 1.6
Integer = 1
Fraction = 0.6

Since fraction is not equal to 0 so continue doing the same.

Step 9
----------
0.6 x 2 = 1.2
Integer = 1
Fraction = 0.2

Since fraction is not equal to 0 so continue doing the same.


As this is repeating it will not end, so we can stop here and have the answer as 0.000110011


Related Solutions

How do I do  independent t test on the data set below and how do I know...
How do I do  independent t test on the data set below and how do I know if its pooled t test or unrolled t test? Health question for reference: to what extend does the age of MI patients vary by gender Standard deviation: male = 13.944 female= 13.939 mean: male 65.353 female=73.628 Male female 65   88 77   81 78   82 76   66 40   81 83   73 58   64 43   53 39   69 66   67 61   89 49   85 85   81...
How do I find a good short term stock to invest in? How do I know...
How do I find a good short term stock to invest in? How do I know if a penny stock will go up? A good long term stock to invest in? What do I need to look at?
Do I need to know where on the dart board the 3, 1, 5 cm darts...
Do I need to know where on the dart board the 3, 1, 5 cm darts landed to obtain precision and accuracy? For the data and calculation for this lab report assume that a dart was thrown at bullseye 3 times with the aim of hitting the middle, the 3 distance from the middle obtain where 3cm, 1cm, and 5cm. Calculate the average, the percent error and discuss in your lab report and emphasize on the accuracy vs precision part
How do I know that steam distillation finished?
How do I know that steam distillation finished?
i have an array of strings, how do i sort them into a binary tree? C...
i have an array of strings, how do i sort them into a binary tree? C Program
How do you know if a currency is overvalued or undervalued I have 2 questions with...
How do you know if a currency is overvalued or undervalued I have 2 questions with answers that don't seem to be matching: If real exchange rate qUS/qforeign is more than 1, then US currency is said to be undervalued correct? Question 1: You are given the following information. The current dollar-pound exchange rate is $2 per pound. A U.S basket that costs $100 would cost $120 in the United Kingdom. For the next year, the Fed is predicted to...
How do I calculate finding I/Y manually, I know how to BAII Plus it?
How do I calculate finding I/Y manually, I know how to BAII Plus it? •Debt: •1 million bonds outstanding •$1000.00 face value •Current price = $1100.00 •Coupon rate = 9%, semiannual coupons •15 years to maturity Tax Rate is 40% I know the set up and answer is -1100 = 45(PVIFA, I/Y, 30) + 1000(PVIF, I/Y, 30) I/Y = 3.9268 x 2 = 7.85%
​​​​​​Variable Identification: how do i know if they have 1 or 2 variables? A study was...
​​​​​​Variable Identification: how do i know if they have 1 or 2 variables? A study was conducted to investigate the possible link between vaccination in children and autism. Individual: a single child Variable 1: QN or CL :    Variable 2 : QN or CL: An employee at a supermarket samples shoppers to determine if a majority of them are wearing face masks. Individual: a single shopper Variable 1: QN or CL :    Variable 2 : QN or CL: Does the...
3. How do you gather competitive information? Why do you want to know about competition? (5...
3. How do you gather competitive information? Why do you want to know about competition?
I do not know how to answer part b. Can you show me how to conduct...
I do not know how to answer part b. Can you show me how to conduct a hypothesis test for this problem? As I know the answer for part a is 0.4 Let X be the weight of flour (in g) contained in a 1kg bag of flour made by a certain company and assume X~U(980,1030). a) What is the probability that the bag of flour has less than 1kg of flour in it? b) The owner of this factory...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT