I am able to Write 8 Byte of Hexadecimal data in 1st row of EEPROM but I am not able to understand how to read 8 Byte data from EEPROM and convert 8 Byte Hexadecimal into decimal and save that decimal value into any unsigned integer. Is there any easiest way to convert 8 Byte hexadecimal into decimal without using sprintf because sprintf convert value into character type and I want to store decimal value into unsigned integer?
Asked
Active
Viewed 388 times
0
-
Values stored in computer memory are binary. Hexadecimal and decimal are two ways those values can be presented to humans so that humans can more easily read and understand them. Hexadecimal or decimal representations are used when the values are printed to a display such as a terminal or debugger watch window. If you're asking about storing a value in memory, then it's binary and there is _no conversion needed_ between hexadecimal and decimal. If you're asking about a display then you need to clarify your question and be more specific about the value and display in question. – kkrambo Jul 05 '20 at 13:39
-
Hexadecimal, decimal and binary are different forms of representing numbers.Take one example and elaborate your question to help you better. – Babajan Jul 05 '20 at 16:28
1 Answers
0
I’m not sure about your use case, but why not write/read the 32 bit unsigned value as it is ? As 4 byte binary without any conversion needed. Endianess can be an issue, but not really when the same MCU write/reads to/from it’s locally connected EEPROM.

HS2
- 164
- 1
- 1
- 4