Reputation: 45
I want to convert Qword to Dword. By Programmer calculator, I easily convert it but not found any way in python.
Qword = 562949953442333
Dword = 21021
Upvotes: 1
Views: 1742
Reputation: 106553
You can use bit-wise AND operator to mask the Qword with 0xffff
:
print(562949953442333 & 0xffff)
This outputs:
21021
Upvotes: 4