Convert hexadecimal in two's complement to binary $0x0A + 0xF6$

411 Views Asked by At

$0x0A + 0xF6$

Determine the 8 bit result (in hex) for each of the following 8-bit signed binary arithmetic problems. Assume all numbers are in S2C form.

For the first number, it's sign bit (most significant bit) is 0, so that means it's positive.

do I need to invert the 1's and add +1 to it?

For instance, I know for sure how to do the second number - $0xF6$

$1111 0110 -> 11110110 ->$ (invert) $0000 1001$ (add 1) $+ 1 $-> $0000 1010_2$

But I'm a bit confused about positive hexadecimal, because I saw on other site the solution, and in it, you first convert hex to binary as is, then invert only the 1s, then add +1, so the result is:

$0000 0110_2$

But why do you need to invert a positive number? aren't you supposed to leave it in s2c as it is?