ascii to dec/binary conversion require

Status
Not open for further replies.
The C conversion functions are really wasteful for single bytes.

Code:
// To convert single ascii bytes (if ascii is '0' to '9') you can do this;
dec_digit = (ascii_digit - '0');

// in reverse, to convert a number 0-9 to an ascii character number;
ascii_digit = (dec_digit + '0');
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…