Why is it that ~2 is equal to -3? How does ~ operator work?

Edit
Report