Yes, Richard is correct. I forgot to mention you have to adjust the value to the byte, word or whatever width you have.
So the sign is the left most bit but the rest should also be 1. Remember we reverse the bits to get the absolute value disregarding the left most, sign bit.
Seems confusing at first, but has its logic.
Ioannis
Bookmarks