As an additional note, two's compliment involves inverting and adding 1.
So if we look at the table below for 0100 which is 4, the two's compliment representation of -4 would be 1100
How do we get there, well we first invert from 0100 to 1011 and then add 1 to give 1100
To go the other way;
If we have -3 which is 1101 we invert to give 0010 and add 1 to give 0011 which is of course 3
No comments:
Post a Comment
Note: only a member of this blog may post a comment.