It depends a lot on what you are trying to do, what data you are working with.
for i in range(-5,6):
print(i, "->", ~i)
will show you the basic basics. Beyond that there are many tutorials about working with bit arrays, bit fields, etc in Python out there. Be specific and you can...