Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/09/04 13:34
Read: times


 
#72180 - RE: 8051 class - Signed Numbers
Responding to: ???'s previous message
Gary Burt said:
If any one wants to see the web pages for the course, check it out at:
http://www.csee.umbc.edu/courses/u...er04/burt/
Any comments appreciated, since you are source of good information.


Well, I looked at the page on negative numbers, and I'm afraid I'd find it more confusing than helpful if I were a student again:

"We have looked at unsigned numbers so far. In the computer, unsigned numbers start at zero and go to 2n-1. So, 216 goes from 0 to 65535."

Whoa there!
You've just suddenly thrown in this 'n' from nowhere - what does it mean?

"216 goes from 0 to 65535."

No, it doesn't.
216 is exactly equal to 65536 - for all values of 2 and 16!

"To do that, we reserved the left-most bit to represent the sign of the number. Zero is a positive number and one is a negative number."

You could be clearer there; my first reaction was, No! one is not a negative number! - then I read it again (a couple of times) and realised that you mean "A zero in the sign bit indicates a positive number, and a one in the sign bit indicates a negative number."

"Example:
   1011  decimal value is 11
   0100  1's complement
   0101  1's complement with 1 added = 2's complement = -11"
But you just said that a zero (in the left-most bit) indicates a positive number - so how can 01012 be negative?!

I think what you mean is::
   01011  decimal value is +11 (sign bit is zero)
   10100  1's complement
   10101  1's complement with 1 added = 2's complement = -11"
and then the example addition becomes:
     01011   decimal value +11
     10101+  decimal value -11
   ------- 
   1 00000



List of 61 messages in thread
TopicAuthorDate
8051 programming class            01/01/70 00:00      
   RE: 8051 programming class            01/01/70 00:00      
   RE: 8051 programming class            01/01/70 00:00      
      Seriously, now...            01/01/70 00:00      
      RE: 8051 programming class            01/01/70 00:00      
         Teaching or Studying?            01/01/70 00:00      
   RE: 8051 programming class            01/01/70 00:00      
      RE: 8051 programming class            01/01/70 00:00      
         Two Cents            01/01/70 00:00      
            RE: Two Cents            01/01/70 00:00      
               RE: Two Cents            01/01/70 00:00      
   RE: 8051 programming class            01/01/70 00:00      
      RE: 8051 programming class            01/01/70 00:00      
         RE: 8051 programming class            01/01/70 00:00      
            RE: 8051 programming class            01/01/70 00:00      
               RE: 8051 programming class            01/01/70 00:00      
         RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
            RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
               RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                  RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                     RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                        RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                           RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                              RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                                 RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                                    RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                                    RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                           Devil\'s advocate            01/01/70 00:00      
                              RE: Devil\\\\\\\'s advocate            01/01/70 00:00      
                              RE: Devil\\\'s advocate            01/01/70 00:00      
                                 Valves? Yes please!            01/01/70 00:00      
                                    RE: Valves? Yes please!            01/01/70 00:00      
                                       RE: Valves? Yes please!            01/01/70 00:00      
                                 RE: Devils advocate            01/01/70 00:00      
                           RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                              RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                              RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
                                 RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
               Echo            01/01/70 00:00      
                  RE: Echo            01/01/70 00:00      
            RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
               RE: 8051 programming class MAJOR mistake            01/01/70 00:00      
         RE: Course Notes - Memory            01/01/70 00:00      
            RE: Course Notes - Memory expanded            01/01/70 00:00      
               RE: Course Notes - Memory expanded            01/01/70 00:00      
               RE: Course Notes - Memory expanded            01/01/70 00:00      
                  Why I said four instead of five            01/01/70 00:00      
                  RE: Course Notes - Memory expanded            01/01/70 00:00      
                     RE: Course Notes - Memory expanded            01/01/70 00:00      
                     RE: Course Notes - Memory expanded            01/01/70 00:00      
                        RE: Course Notes - Memory expanded            01/01/70 00:00      
                           RE: Course Notes - Memory expanded            01/01/70 00:00      
                              RE: Course Notes - Memory expanded            01/01/70 00:00      
                           RE: Course Notes - Memory expanded            01/01/70 00:00      
                              RE: Course Notes - Memory expanded            01/01/70 00:00      
                                 Memory Areas and Addressing Modes            01/01/70 00:00      
                                    RE: Memory Areas and Addressing Modes            01/01/70 00:00      
                                       RE: Memory Areas and Addressing Modes            01/01/70 00:00      
         RE: 8051 class - Signed Numbers            01/01/70 00:00      
   RE: 8051 programming class            01/01/70 00:00      
      RE: 8051 programming class            01/01/70 00:00      

Back to Subject List