标签: python
我想将Qword转换为Dword。通过程序员计算器,我可以轻松地将其转换,但是在python中找不到任何方式。
Qword = 562949953442333 Dword = 21021
答案 0 :(得分:4)
您可以使用按位AND运算符用0xffff屏蔽Qword:
0xffff
print(562949953442333 & 0xffff)
这将输出:
21021