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.
那么当你 OR 两个负数时会发生什么?是否曾经保证,无论何时您将一个正面与一个负面进行或,结果都会是正面的?
假设二进制补码:
每当您将任何数字与负数进行或运算时,结果都是负数。这是因为符号位设置为负数,因此将设置为结果数。