Thread
:
Math Puzzles
View Single Post
08-01-2022, 11:19 AM
#
129
psyang
Powerplay Quarterback
Join Date: Jan 2010
Exp:
Quote:
Originally Posted by
GGG
Spoiler!
isn’t that just Twos compliment for creating negative binary numbers
Spoiler!
No, 2's complement is the inverse of the binary representation plus 1. That way, a + 2's complement a = 0 (ignoring overflow bit)
f is reversing the order of the bits.
As an example:
f(1011) = 1101
f(1011) + 1011 = 1101 + 1011 = 1 1000
if g is the 2's complement function, then
g(1011) = 0101
g(1011) + 1011 = 0101 + 1011 = 1 0000
psyang
View Public Profile
Send a private message to psyang
Find More Posts by psyang