Here's the code of a list of objects containing 6 sides and a reference (by ID) to the object next to each side (like a beehive). This chunk of code extract the 6 neighbor IDs (which are of type unsigned int) from each object and output each ID to a binary file (using char elements). So basically it's purpose is to translate each byte of each unsigned int to a char and put all the chars together in a memblock to output to the file. The second block of code does the opposite; extract each neighbor ID from the file and copy them to each object in the list.
My question is, since I'm interested in the bitwise information of each byte in the unsigned int's, are the bytes going to be modified during the conversions from unsigned int to char and from char to unsigned int, or are all the bits going to stay the same?