This repository has been archived on 2023-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
VSMechatronics/Exercises/C6/ex3.c

15 lines
298 B
C
Raw Permalink Normal View History

2023-10-06 12:21:32 +00:00
#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);
}