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.
C will let you just type in the equasion just like you have it. The compiler generates all the assembly to do the 32 bit computations. Just cast your variables into longs.
You should also check that a,b, and c don't all equal 0 at the same time or it will generate an error.
Code:
unsigned char a,b;
unsigned int c;
unsigned long d;
a = something;
b = something_else;
c = a_third_thing;
d = (55299539) / ((((long)a*100 + ((long)b)*61375 +((long)c);
the casts ((long)a) arn't really nessesary but I like to put them in to avoid any confusion.
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.