MIPI_BaseC_WebinarFRTK/04_Lecture04/13_bit operations_4_p32.c

15 lines
263 B
C
Raw Normal View History

2024-11-13 09:22:28 +03:00
#include <stdio.h>
#include <inttypes.h>
int main()
{
unsigned int n=0xaabbccdd;
unsigned char a,b,c,d;
d = n;
c = n>>8;
b = n>>16;
a = n>>24;
printf("a = %x, b = %x, c = %x, d = %x", a,b,c,d);
// a = aa, b = bb, c = cc, d = dd
}