Hello everyone,
i am using renesas rx231 series microcontroller and E2 studio ide for code development,
i have written one small code in which i have taken one signed int whoes value is -3871,and another variable which is also same signed int with value of 61665 which its 2's compliment value -3871and another same variable i have taken signed int with hex value of -3871 which is 0xF0E1 ,with this i have written one if else statement but it is not working/not showing the same value.
signed int i = -3871;
signed int j = 0xf0e1;
signed int k = 61165;
_Bool m;
void main(void)
{
while(1)
{
R_Config_WDT_Restart();
if(j == k)
{
m = 1;
}
else if(j == i)
{
m = 1;
}
else if(k == i)
{
m = 1;
}
else
{
m = 0;
}
}
}
value of m remains 0 always.why this is happening??
please any can explain this?