Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
uint16 a1 = 0x1234; // a1 is an unsigned int value, not hexa
uint16 a2 = 4660; // a2 is an unsigned int value, not decimal either. And a1 = a2
uint16 a3 = 0x4660; // a3 is the bcd (binary coded decimal) value of a1 or a2
char * str1 = "0x1234"; // str1 is a string, that can represent a1 or a2 in hexadecimal
char * str2 = "4660"; // str2 is a string, that can represent a1 or a2 in decimal
There is no decimal nor hexa in an MCU, only binary. Decimal and hex a are
only representations for humans.
That said, what do you want to convert? Something like str1 to str2?
a1 or a2 to str2?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.