MIPI_BaseC_WebinarFRTK/04_Lecture04/16_invert_p34.c
2024-11-13 09:22:28 +03:00

15 lines
267 B
C

#include <stdio.h>
#include <inttypes.h>
int main()
{
unsigned int mask, n=0xAB; // n = 1010 1011
printf("n = %x\n", n);
mask = (1<<5)-1;
//~ mask = 0x1F;
//~ mask = 0b11111;
n = n ^ mask;
printf("n = %x\n", n);
// n = b4 1011 0100
}