fixed typo.

 ~num would return the value -3 and not 2.