运行 ❯
获取你自己的
Python
服务器
×
更改方向
更改主题,深色/浅色
转至 Spaces
print(~3) """ The ~ operator inverts each bit (0 becomes 1 and 1 becomes 0). Inverted 3 becomes -4: 3 = 0000000000000011 -4 = 1111111111111100 Decimal numbers and their binary values: 4 = 0000000000000100 3 = 0000000000000011 2 = 0000000000000010 1 = 0000000000000001 0 = 0000000000000000 -1 = 1111111111111111 -2 = 1111111111111110 -3 = 1111111111111101 -4 = 1111111111111100 """
-4