15 lines
298 B
C
15 lines
298 B
C
|
#include <stdio.h>
|
||
|
|
||
|
int main() {
|
||
|
unsigned int a = 0x60;
|
||
|
unsigned int b = 0x13;
|
||
|
unsigned int r;
|
||
|
|
||
|
r = a & b;
|
||
|
printf("bitwise AND of 0x60 and 0x13: 0x%02x\n", r);
|
||
|
r = a | b;
|
||
|
printf("bitwise OR of 0x60 and 0x13: 0x%02x\n", r);
|
||
|
r = a ^ b;
|
||
|
printf("bitwise XOR of 0x60 and 0x13: 0x%02x\n", r);
|
||
|
}
|