refactored twos comp to be more intuitive