丫灼
Lv 4
丫灼 asked in 教育與參考其他:教育 · 1 decade ago

one's complement如何算?

畢業太久了

忘了如何算

如果我要求 0xab 的 one's complement 要如何算

1 Answer

Rating
  • 1 decade ago
    Favorite Answer

    1's complement is a way to represent negative integer by NOT each bit individually. In your case, 0xab is 1010 1011

    becasue the MSb is 1 - so it is a negative number.

    So, 0xab is the 1's complement representation of -84(10).

    I hope this will make you young again.

    Prisoner.

Still have questions? Get your answers by asking now.