Hello
what is meaning of Extract each byte into a character variable (integer = hexadecimal value). does it means extract bytes from an integer (hexadecimal) value I don't understand logic behind to implement this program ?
0x000000FF is a bit mask which is used to set all the upper bytes to zero "just in case". '&' is the bit-operator "AND".
byte0 = (char)(0x12345678 & 0x000000FF); /* The intermediate result of this is... */
byte0 = (char)(0x00000078); /* And after casting... */
byte0 = 0x78;
I think it is good habit to use the bit mask, but not necessary.