Lost Interrupt
just random carefree notes
Wednesday, February 16, 2011
negation without multiplying
To negate an integer
x
one can simply do
~x+1
. To see why this works consider
~x = -1U - x
which is equivalent to
~x+1 = -x
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment