Continue to Site

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.
can any one tell how to convert ascii to binary or dec using assembly /C/ MIKROC

einton always check the help out
 

Attachments

  • this first.png
    this first.png
    120.3 KB · Views: 322
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

New Articles From Microcontroller Tips

Back
Top