Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

Bit wise Operation

int main() {
unsigned int a=240, b=170;
printf("a=%u, b=%u
", a, b);
printf("a&b=%u
", a & b);
printf("a|b=%u
", a | b);
printf("a^b=%u
", a ^ b);
printf("~a=%u
", ~a);
printf("a<<2=%u
", a << 2);
printf("a>>3=%u
", a >> 3);
return 0;
}
 
PREVIOUS NEXT
Tagged: #Bit #wise #Operation
ADD COMMENT
Topic
Name
2+3 =