how to convert 4 bits in hexadecimal to decimal ?
example :
result :Code:11A2A311
ThanksCode:295874833
how to convert 4 bits in hexadecimal to decimal ?
example :
result :Code:11A2A311
ThanksCode:295874833
what do you mean "4bits in hexadecimal"?
0x11A2A311 in decimal is 295871249, not 295874833, so I don't really understand your question.
yes,0x11A2A311 in decimal is 295871249, not 295874833
what do you mean "4bits in hexadecimal"?ThanksCode:HEX(11A2A311) equal 295871249 in DECIMAL
So, you still haven't clarified what you mean by "4 bits in hexadecimal"?
Do you just want to convert a hexadecimal string to decimal? I'm going to assume that. If so, the easiest way is to use sscanf with a %x format specifier into an int then printf the int with %d.
FYI, 0x11A2A311 won't fit in 4 bits. 0xF is the largest number you can fit into 4 bits. Maybe you meant 4 bytes?
If you understand what you're doing, you're not learning anything.