运行 ❯
获取您的
自己的 Python
服务器
×
更改方向
更改主题,暗色/浅色
转到 Spaces
print(6 & 3) """ The & operator compares each bit and set it to 1 if both are 1, otherwise it is set to 0: 6 = 0000000000000110 3 = 0000000000000011 -------------------- 2 = 0000000000000010 ==================== Decimal numbers and their binary values: 0 = 0000000000000000 1 = 0000000000000001 2 = 0000000000000010 3 = 0000000000000011 4 = 0000000000000100 5 = 0000000000000101 6 = 0000000000000110 7 = 0000000000000111 """
2