I want to read 4 byte of a binary file until it ends and want to display the result as a hex string e.g.
First 4 Bytes of my file are:
4D 5A 90 00
Result should be:
0x00905A4D
And I also want to be able to do different operations on the result for example:
result = 0x00905A4D
tmp = result & 0xFF
tmp should then be 0x4D
What's the most elegant way for doing this?