signed

signed - Signed Integer Representation 0/1 in the high bit...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Signed Integer Representation 0/1 in the high bit position indicates +/- Sign-Magnitude Form High bit stores 0/1 to represent +/- Low n-1 bits store the magnitude of the integer Example (1 Byte): 59 : 0011 1011b : x3B -59 : 1011 1011b : xBB One's Complement Representation 1C n (X) = (2 n - 1) - X Equivalent to complementing all bits of X Example (1 Byte): 59 : 0011 1011 : x3B -59 : 1100 0100 : xC4 Two's Complement Representation 2C n (X) = 2 n - X Equivalent to 1C n (X) + 1, i.e., complement and add 1 Example (1 Byte) 59 : 0011 1011 : x3B -59 : 1100 0101 : xC5 In practice, Sign-Magnitude representation is never used. One’s Complement was used in some older machines, but has lost favor to the two’s-complement representation. The difficulty with 1’s complement results form having two representations of 0 (what is 1111 1111b as a signed byte integer?) 2’s Complement Arithmetic Evaluate 30 – 59 (byte arithmetic) 30 0001 1110b x1E -59 1100 0101b xC5 ==== ========== === -29 1110 0011 xE3 Note:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

signed - Signed Integer Representation 0/1 in the high bit...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online