1) convert Decimal to Octal:
6278/8 = 784(Quotient) and 6(Remainder)
784/8 = 98(Quotient) and 0(Remainder)
98/8 = 12(Quotient) and 2(Remainder)
12/8 = 1(Quotient) and 4(Remainder)
1/8 = 0(Quotient) and 1(Remainder)
X = 627810 = 142068
Y = 675810 = 151468
2) find 8's complement of the Y (8's complement of a number is 1 added to it's 7's complement number):
777778 - 151468 = 626318
626318 + 18 = 626328
3) now Add this 8's complement of Y to X:
142068 + 626328 = 770408
4) here there is no carry, then answer is the 8's complement of the sum obtained with a minus:
777778 - 770408 = 7378
7378 + 18 = 7408
result: -7408
5) convert Octal to Decimal:
-7408 = -(7*82+4*81+0*80) = -48010
6) check:
6278 - 6758 = -480
Answer: -480
Comments
Leave a comment