I am trying to represent $(43.3)_7$ in base-8.
But in only one integer digit by truncating the rest and using the numerical unsigned representation.
I am trying to represent $(43.3)_7$ in base-8.
But in only one integer digit by truncating the rest and using the numerical unsigned representation.
Let's look at the definition of these things.
Interpreting
$43.3_7 = 4\cdot 7^1 + 3\cdot 7^0 + 3\cdot 7^{-1} \approx 31.4286_{10}.$
Now we change to base $8$. We have $8^2 = 64$ is too large, so the first digit we look at will be $8^1$. We have $31.4286/8 \approx 3.9285$ so the first digit will be a $3$.
Assuming by "one integer digit" you mean to truncate the result here, then the answer would be $3_8$.
Iām going to ignore the second paragraph, since it looks as if something has been omitted from it. The number in question, in elementary-school notation, is $31\frac{3}{7}$. Since the base-$8$ expansion of $1/7$ is $.1111\cdots$, in base-$8$, the number in question is $37.3333\cdots$. We leave it to OP to round.
As best I can read the second paragraph, you want one character (digit?) in the fractional part(beyond the decimal point?). $43_7=31_{10}=37_8$ for the integer part. For the fraction $\frac 37$ is closer to $\frac 38$ than $\frac 48$, so it would be $37.3_8$ is the closest.
$43.3_7 = 4*7 + 3 + \frac 37=$
$4(2*3 + 1) + 3 + \frac 37*\frac 88=$
$8*3 + (4+3) + \frac{\frac {24}7}8=$
$3*8 + 7 + \frac 38 + \frac 37\frac 18=$
$3*8 + 7*8^0 + 3*8^{-1} + \frac {24}7*8^{-2}=$
$3*8 + 7*8^0 + 3*8^{-1} + 3*8^{-2}+ \frac 37*8^{-2} =$
.... via induction....
$3*8 + 7*8^0 + 3*8^{-1} + 3*8^{-2} + 3*8^{-3} + ...... = $
$37.\overline 3_8$
....
It's worth noting that just like calculating in base 10.
$\frac 17 = $
$7 $ divided into $1$
or $7$ divided into $\frac 88 = \frac 18 + $ $7$ divided into $\frac 18$
or $\frac 18 + $ $7$ divided into $\frac 8{8^2} =\frac 18 + \frac 1{8^2} + $ $ 7$ divided into $ \frac 1 {8^3}$ and so on .... $=$
$\frac 18 + \frac 1{8^2} + \frac 1{8^3} + .... = $
$.111111...._7$ so
$\frac 37 = 0.\overline 3_8$.