Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ascii to dec/binary conversion require

Status
Not open for further replies.

Mr RB

Well-Known Member
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.

Latest threads

EE World Online Articles

Loading
Top