This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Question about write byte, short data to memeory

Hi,

I need to write char (byte) and short variable in C. I would like to know whether it is only the respective low byte, low short value in an integer output to the memory? The AND operation & 0x000000FF and 0x0000FFFF can mask the unnecessary bits in little endian. Because I find that the logic AND operation consumes pretty some cycles in the loop, it is better to remove these operation in my program if it is not necessary.

Thanks