Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么编译器在按位非运算中进行 2 的补码?
例子 : ~5 = -6
~5 = -6
~5 = 1010这实际上是十进制的 10
~5 = 1010
但编译器采用 2 的 1010 的补码,即 -6。