bit-ops/bit-ops.c
2020-10-31 12:49:18 +01:00

18 lines
295 B
C

#include <stdio.h>
void do_bit_ops() {
unsigned char PTAD = 0x10;
printf("PTAD = %#010x\n", PTAD);
PTAD |= 0x01;
printf("PTAD |= 0x01\t %#010x\n", PTAD);
PTAD &= 0xfe;
printf("PTAD &= 0xfe\t %#010x\n", PTAD);
}
int main() {
printf("*** bit-ops pls ***\n");
do_bit_ops();
return 0;
}