Outline ·
[ Standard ] ·
Linear+
C How does C/C++ store integer in binary file?, Endianness in x86
|
flashang
|
May 24 2023, 08:52 AM
|
|
QUOTE(Tullamarine @ May 24 2023, 08:40 AM) It is good to ask questions, not only sharing my limited knowledge. There are many teachers / sifu here who know better than me. Without asking, I won't know so many know answer to difficult question. Thanks all. IMHO, most of the info should be able to find from computer architecture theories.
|
|
|
|
|
|
flashang
|
Jun 14 2023, 10:02 PM
|
|
QUOTE(KLKS @ Jun 14 2023, 06:04 PM) an unsigned long long is 8 bytes, where did the 0xC2 come from? This is the result from @tboxmy code : demointeger.bin (16 bytes) 90 78 56 34 12 00 00 00 90 78 56 34 12 00 00 00 Don't know why (and how) to get the different result.
|
|
|
|
|
|
flashang
|
Jun 17 2023, 09:53 AM
|
|
QUOTE(tboxmy @ Jun 16 2023, 06:25 PM)  Using the online hex viewer, https://www.scadacore.com/tools/programming...-hex-converter/Attached is the output, and how that would have shown 0x0000001234567890 in its utf-8 instead of ansi. Hope that helps. after read carefully, is the format-hex add additional characters. The first line should be the "original hex" and follow by formatted hex / text. The demointeger.bin should be 16 bytes. This online hex viewer show the file content : HexEd.it - Browser-based Online and Offline Hex Editing https://hexed.it/
|
|
|
|
|