When do I apply R / R-1 complement?

67 Views Asked by At

Given the following question:

  • What is the following is the 3-digit 15’s complement representation of -25110?

How would I know if I should apply R's complement or R-1's complement?

  • 15’s complement of base 15 = (15n)10 – N
  • 15’s complement of hexadecimal number = {(16n)10-1)} – N

The same question extends to other bases such as 9, would I use 9th complement or 10-1th complement?