Menu

[Solved]-Q6 Fractional Binary Numbers 0djd2ds 2 Amount D D 0 1 0101 2 0625 Consider Following Ite Q37211310

Please use R programming language to solve.
Q6. Fractional binary numbers (0.djd2d.s...)2 amount to d++..., with each d, 0 or 1 . So (0.101 )2 = + + 흙 =-0.625. ConsiderQ6. Fractional binary numbers (0.djd2d.s…)2 amount to d++…, with each d, 0 or 1 . So (0.101 )2 = + + 흙 =-0.625. Consider the following iterative procedure to convert the fractional part of a decimal to its binary equivalent (0.didzd3…)2: 1. Multiply the fractional part of a decimal number by 2 2. The integral part of the result will be di 3. Repeat step 1 using only the fractional part of the result, and then step 2. For example: Convert 0.625 (or to its equivalent fractional binary 1) 0.625 x 2 1.25, so di 2) 0.25 x 2-0.5, so d2-0 3) 0.5 x 2-1.0, so ds-1 4) 0.0 × 2 = 0.0, so d4 = 0. Clearly the iteration shall go forever, but all the di 0, i 4,5, Therefore, 0.625 (0.101)2 Now Construct your own function dec2bin(x, e) to convert r to a fractional binary with a desirable precision e and apply your function to covert 0.1 and to a fractional binary with precision 2-20 Show transcribed image text Q6. Fractional binary numbers (0.djd2d.s…)2 amount to d++…, with each d, 0 or 1 . So (0.101 )2 = + + 흙 =-0.625. Consider the following iterative procedure to convert the fractional part of a decimal to its binary equivalent (0.didzd3…)2: 1. Multiply the fractional part of a decimal number by 2 2. The integral part of the result will be di 3. Repeat step 1 using only the fractional part of the result, and then step 2. For example: Convert 0.625 (or to its equivalent fractional binary 1) 0.625 x 2 1.25, so di 2) 0.25 x 2-0.5, so d2-0 3) 0.5 x 2-1.0, so ds-1 4) 0.0 × 2 = 0.0, so d4 = 0. Clearly the iteration shall go forever, but all the di 0, i 4,5, Therefore, 0.625 (0.101)2 Now Construct your own function dec2bin(x, e) to convert r to a fractional binary with a desirable precision e and apply your function to covert 0.1 and to a fractional binary with precision 2-20

Expert Answer


Answer to Q6. Fractional binary numbers (0.djd2d.s…)2 amount to d++…, with each d, 0 or 1 . So (0.101 )2 = + + 흙 =-0.625. Co… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *