In the C18 compiler I have the following:
unsigned int sector;
unsigned long arg;
sector = 129;
arg = (sector << 9);
I would expect arg to be equal to 66,048 after this call but it is equal to 512.
It seems to be treating arg like an unsinged int.
What am I doing wrong?
unsigned int sector;
unsigned long arg;
sector = 129;
arg = (sector << 9);
I would expect arg to be equal to 66,048 after this call but it is equal to 512.
It seems to be treating arg like an unsinged int.
What am I doing wrong?