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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/28/09 05:19
Read: times


 
#171265 - Integer promotion
Responding to: ???'s previous message
Because C has something called "integer promotion", where numbers smaller than an int gets upgraded to an int (or unsigned int) before calculations are made. And an int must be >= 16 bit so the smallest value at least 16 bit large has been selected as the size of an int for the 8051 chips.

I suggest that you get a good C book, and preferably also the C language reference.

List of 9 messages in thread
TopicAuthorDate
Unsigned Long Roll-over at 65535?            01/01/70 00:00      
   Typecast before the shift.            01/01/70 00:00      
      oh..my mistake.....            01/01/70 00:00      
         Integer promotion            01/01/70 00:00      
            Note on Integer Promotion and Keil            01/01/70 00:00      
               Not much of a choice, really            01/01/70 00:00      
                  Probably            01/01/70 00:00      
                     Design decisions            01/01/70 00:00      
                        Oh yes they can!            01/01/70 00:00      

Back to Subject List