• are SFRs treated as unsigned or signed
    in the SiLabs forum someone showed SFR = -n I have never used such and became curuous. I searched the Keil documentation but could nof find it.
  • Treating a 9-bit binary in a 8-bit accumulator
    I am aware that during addition/subtraction in the accumulator, if a 9-bit value is resulted the carry bit is set, but what if this is used: mov A,-200 -200 is a 9-bit value in 2's compliment...
  • signed bit fields
    Does anybody knows, Keil C compiler V7.xx supports bit fields with signed types or not? The code always generated same as for unsigned types. This is compiler bug or feature? My code compiled with Keil...
  • comparing signed and unsigned variables
    In the following code:- char a = 0x80; unsigned char b = 0x80; if(a==0x80) printf("a==0x80\n"); if(b==0x80) printf("b==0x80\n"); The first printf isn't executed but the second is. Why is this...
  • Using unsigned with signed int
    I have a signed integer which I have to assign to an unsigned one after addition with unsigned one. Like int16_t x = -9; uint16_t y = 11; if(x < y) { y = y+x; } How to ensure that...