• Accessing bytes of long data type
    I know that longs are stored MSB first in memory. I need to access individual bytes of a long in order to send them out the SPI port. There are a number of ways to do this, I'd like your opinion on which...
  • Efficiently splitting a long int into bytes
    Hi All, This is related to my previous post, "Efficiently combining bytes into a long int". I'd like to find an efficient way to do this. My current implementation (below) results in (unnecessary...
  • Efficiently combining bytes into a long int
    Hi, I'm having problems assembling a set of 4 bytes into a long int. My approach has been this: ulong temp; temp = (temp << SHIFT_BYTE) | getByte(); temp = (temp << SHIFT_BYTE) | getByte();...
  • Accessing individual bytes of an integer.
    This should be an easy question, but it's driving me nuts. I'm programming in C51. I need to access the high-byte and the low-byte of a unsigned short variable. How should I do it?
  • accessing bits from byte
    I want access bit from Byte array.for example consider array of 30 bytes in which I want to access 1 to 15 bits... How to access it. kindly help me.......