top | item 45760893 (no title) listeria | 4 months ago in the b=2 case, you get: 1 / 1 = 1 = b - 1 1 % 1 = 0 = b - 2 they are the other way around, see for example the b=3 case: 21 (base 3) = 7 12 (base 3) = 5 7 / 5 = 1 = b - 2 7 % 5 = 2 = b - 1 discuss order hn newest gowld|4 months ago In the b=2 case, 1/1 = 1 = (b-2) + (b-1)/denom(b) = (b-2) + (b-1)/1 = 2b - 3 = (b-1)*b^1 -1 (b-1)In base 2 (and only base 2), denom(b) >= b-1, so the "fractional part" (b-1)/denom(b) carries into the 1's (units) place, which then carries into the 2's (b's) place, flipping both bits.
gowld|4 months ago In the b=2 case, 1/1 = 1 = (b-2) + (b-1)/denom(b) = (b-2) + (b-1)/1 = 2b - 3 = (b-1)*b^1 -1 (b-1)In base 2 (and only base 2), denom(b) >= b-1, so the "fractional part" (b-1)/denom(b) carries into the 1's (units) place, which then carries into the 2's (b's) place, flipping both bits.
gowld|4 months ago
In base 2 (and only base 2), denom(b) >= b-1, so the "fractional part" (b-1)/denom(b) carries into the 1's (units) place, which then carries into the 2's (b's) place, flipping both bits.