Two’s Complement

Explanation of two’s complement: https://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html

Idea:

Take binary digits, flip them all, then add 1

To undo two’s complement: -1 from binary digit, flip all digits, convert

Leave a Reply

Your email address will not be published. Required fields are marked *