How can I find the hexadecimal value of negative number? I was studying from a slide that shows these values and there hexa's...!
-3 = FDH
-12 = F4H
-48 = D0H
-200 = 38H
How?
How can I find the hexadecimal value of negative number? I was studying from a slide that shows these values and there hexa's...!
-3 = FDH
-12 = F4H
-48 = D0H
-200 = 38H
How?
They are using two's complement notation to represent negative numbers. To get it, you start with your value, express it in binary, change all the 0's to 1's and vice versa, then add 1. You can do it directly in hex, subtracting each digit from 15, then adding 1. It would be clearer what is going on if you convert the numbers on the left (which are in decimal) to hex, so $200_{10}=C8H$ and $C8H+38H=0H$. It has the advantage that you can add, subtract, and multiply without worrying about the signs. There are other notations.