I have been trying to solve the following questions.
- What is the following is the 3-digit 16’s complement representation of -12810.
- What is the following is the 3-digit 15’s complement representation of -25110?
I got a result of 80H for the first question. But the answer sheet says the answer is F80H instead. I took the twos complement of 128 and convert it to hex accordingly.
What is the correct method/steps required to convert a negative decimal to an N complement's form?
I managed to dig out a StackExchange post which had an algorithm for such problems.
$$-(Number) \equiv Complement^N- Number = Complement's \: representation.$$ Hence $$-128 \equiv 16^3 - 128 = 3968 \: or \: F80H $$ Where N is the number of digits.