I need a code for a calculator in C that does binary operations like AND, OR, XOR, NOT
-Armando
Hello,
Please explain more in detail what you need and more important what you have done yourselves.
Also please do mind your language.
Best regards
Johi.
Your post was MOVED to its current location as it is more suitable.
AND &
OR |
XOR ^
NOT ~
The forum is not a homework for free place. We, gladly, help people that are having trouble writing their code. So if you give it a try and get stuck we will help.
Post your code. Read the forum guidelines to see how to properly post code.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
Explain what the code actually does. Tell us how that is different from what you want. The phrase "It does not work" is not helpful.
Try a search for "arduino code for a calculator" to see what others have done.
Are you sure it's not the other way around, i.e.
My code sucks. I need a teacher.
There is only one way to know for sure... mind posting your code together with a description of what it is supposed to do exactly?
Is this calculator supposed to work through the serial monitor or with buttons?
You'll likely need to understand how to parse data and identify the difference between a number and a non-number.
Should only take a few hours to learn if you put the time in and make a solid attempt.
If you are going to use profanity, please leave.
What grade level is this project for? High school, college, other?
I would start with one of the readily available Arduino calculator programs that does the usual +-/* and change the operations to suit.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.