Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the numbers having a binary representation consisting of an infinite st

ID: 1715220 • Letter: C

Question

Consider the numbers having a binary representation consisting of an infinite string of the form O.yyyyyy..., where y is a k-bit sequence. For example, the binary representation of 1 /3 is 0.0101010101... (that is, y = 01, and k = 2), while the representation of 1/5 is 0.001100110011... (that is, y = 0011, and k = 4). Give a formula in terms of y and k for the value represented by the infinite string. What is the numeric value of the string for the following values of y? Note that the value of k is implied; e.g., for case i, k = 3, etc.

Explanation / Answer

A: We let x as the loop sequence, get following formula

x << k = x + Y, so easy to infer x = Y / (2^k - 1).

Verify:

x = Y/2^k + Y/2^2k + Y/2^3k + ... + Y/2^nk

= Y(1/2^k + 1/2^2k + 1/2^3k + ... + 1/2^nk)

include math formula: Y(1/2k * (1 -(1/2^k)^n)

Since (1/2^k)^n -->> 0

So that x = Y/(2^k-1)

B. i). 1/7

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote