• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Absolute value of Binary numbers

Crusty

Lifer
I have a homework problem where I need to figure out which signed integer representation is the most complex for finding an absolute value.

I have narrowed it down to 2's Complement and excess biased by 2^(n-1)-1

Assuming that adding or subtracting two binary bits, including carrying and determining the carryout value has the same complexity, I have determined that both of the representations have the same complexity...I think.

2's Complement:
Check bit-n, if 1 flip all bits and add 1.

Excess Biased:
Check bit-n, if 0 flip all bits and subtract 1.

I must be missing something somewhere...does anyone see any mistakes in my logic?

The only other representations we have learned are 1's Complement and Signed Magnitude, both of which are less complex.
 
Back
Top