hi roomz
i am writing program to do bit manipulation in DEV C++ for my project. actually i am supposed to implement in avr studio and before that i would like to watch my syntax errors and the output.
here is the code:
Code:
#include <stdio.h>
#include <stdlib.h>
int main ()
{
unsigned receive_buffer1=00011111,receive_buffer2=00011111;
unsigned m, n;
unsigned twi_address;
//receive_buffer1 &=00000001;
receive_buffer1 &= 00011110;
m= receive_buffer1 >> 1;
//receive_buffer2 &= 00000001;
receive_buffer2 &= 00011110;
n= receive_buffer2<<3;
twi_address= n|m;
printf("%d", twi_address);
//return 0;
}
the output should be 11111111 but i am getting something else.
plz help