The binary representation of the number has two parts The MSB is used to denote

The binary representation of the number has two parts

This preview shows page 6 - 9 out of 16 pages.

The binary representation of the number has two parts The MSB is used to denote the sign (+ve or -ve) of the number The remaining bits signify the magnitude of the number (+ 123) 10 = (01101) 2 (- 123) 10 = (11101) 2 Reference: Principles of Digital Design, Gajski 6
Image of page 6
Representation of negative numbers 2/3 Suppose we want to add two numbers in this representation <s 1 ,m 1 > and <s 2 ,m 2 > First check the sign bits s 1 and s 2 If both are the same, then add the magnitudes and the result has the same sign as s 1 and s 2 If both bits are different and The magnitude is the same, then the result is zero Otherwise, subtract the smaller magnitude from the larger and the result has the sign of the larger magnitude Reference: Principles of Digital Design, Gajski 7
Image of page 7
Representation of negative numbers 3/3 Suppose we use 8 bits for each number Reference: Principles of Digital Design, Gajski 8 (11111011) 2 + (00000011) 2 = ? Both sign bits are different, so the magnitude of the result is: 1111011 – 0000011 = 1111000 We keep the sign of the larger magnitude Ans: (11111000) 2 = (- 120) 10
Image of page 8
Image of page 9

You've reached the end of your free preview.

Want to read all 16 pages?

  • Fall '18
  • Eric Swartz

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes