Negative Binary Numbers PowerPoint PPT Presentation

presentation player overlay
1 / 7
About This Presentation
Transcript and Presenter's Notes

Title: Negative Binary Numbers


1
Negative Binary Numbers
2
Ummm...
  • Computers can only use 1s and 0s
  • How do we represent a negative number?

3
Sign Magnitude
  • Use the Most Significant Bit (MSB) as a sign bit
    to indicate the sign of a number
  • MSB is the bit on the farthest left
  • Commonly refered as Sign Magnitude
  • 0 (on far left) positive number
  • 1 (on far left) negative number
  • Example 00102 210 10102 -210
  • 0101012 21 1101012 -2110

4
Sign Magnitude Maximum Value
  • Maximum value is now different because we use one
    of the bits to indicate the sign!
  • Given N bits and using the sign magnitude system,
    what is the biggest possible number (maximum
    value)?

5
Sign Magnitude Minimum Value
  • Without the sign bit, our minimum value was 0
  • Minimum value is now different because we have
    negative numbers
  • Given N bits and using the sign magnitude system,
    what is the lowest possible number (minimum
    value)?

6
Minimum/Maximum Value Example
  • Given 4 bits in the sign magnitude system
  • Maximum 24 - 1 1 7
  • Minimum - (24 - 1 1) -7
  • How many different numbers can we represent with
    4 bits?

7
Oh, no!
  • There is an inherent problem with using a sign
    bit
  • HINT
  • What is 0000 in sign magnitude?
  • What is 1000?
Write a Comment
User Comments (0)
About PowerShow.com