External data loading in DES
All standard literature on DES, including FIPS&nbsp;46-3, number data bits starting from 1 for the most significant bit of the first word in reading order, incrementing by 1 as we go to lower-order bit, and moving to the next word after each multiple of the word size in bit. Here word can be 8-bit (for data and key), 32-bit (state formed by L/R), 28-bit (internal key formed by C/D).

For an implementer manipulating an array of 8 bytes at indexes 0 to 7 as input of IP, bit $i$ is for byte at index $\left\lfloor(i-1)/8\right\rfloor$ and has weight $2^{(-i)\bmod 8}$. In C, it might be testable as

Buffer[(i-1)&gt;&gt;3] &amp; (128&gt;&gt;((i-1)&amp;7))


Bit 58 belongs to the last of 8 bytes, Buffer[7], with weight 64 ( 0x40 ).