Well the question is that I have to perform an octal subtraction using 8's complement method. The question is like this: (611.21)base 8 - (304.42)base 8
. Subtraction part is fine but the problem comes when taking the 8's complement of the number. After you calculate the 7's complement i.e. (473.35)base 8, we add 1 to make it 8's complement. My doubt is that 1 is simply to be added or 1 is to be added to the rightmost digit.
Because according to the method by GeeksForGeeks,
To find b’s complement, just add 1 to the calculated (b-1)’s complement.
By doing so, the answer to my answer of subtraction is coming (474.35)base 8 , but if you do the subtraction in the normal way (without 8's complement method), the answer comes out to be (304.57)base 8.
I have looked for the solution at so many places but I am still in a dilemma of what's the correct one.
To summarise my points, I would like to ask that when finding 8's complement of a fractional octal value, we simply add 1 to the 7's complement or do we add 1 to the rightmost bit of the answer.