Sign-Magnitude definition
Sign-magnitude is a signed integer representation that stores a sign separately from the digits of the absolute value.
Sign-Magnitude in a picture
How it works
In a common n-bit binary version, the leftmost bit is 0 for a nonnegative sign or 1 for a negative sign. The remaining n − 1 bits represent the unsigned magnitude. This produces separate bit patterns for positive and negative zero.
Worked examples
Decode 0101 in four-bit sign-magnitude.
Sign 0 and magnitude 101 give +5.
Encode −6 with four bits.
Use sign 1 and magnitude 110, giving 1110.
Which two patterns represent zero with four bits?
0000 and 1000.
Common mistake
Check the signed representation before decoding. The same bit pattern can mean a different number in two’s complement.
Quick check
What is the largest magnitude in four bits?
Show answer
7.
Which bit sets the sign in the common layout?
Show answer
The leftmost bit.
Sources
Flashcard
Sign-Magnitude
Reveal the definition
Sign-magnitude is a signed integer representation that stores a sign separately from the digits of the absolute value.
Effortless Math. “Sign-Magnitude.” Math Dictionary.



