i want to know how to write exclusive OR function in Arduino for my assignment. i attached the assignment file. if u don't mind, somebody help me plz..
ArduinoIntroduction.pdf (272 KB)
i want to know how to write exclusive OR function in Arduino for my assignment. i attached the assignment file. if u don't mind, somebody help me plz..
ArduinoIntroduction.pdf (272 KB)
The exclusive or operator is ^
So
a = b ^ c;
Or, you could look at the reference.
Please don't expect people to do your assignments for you - I think you're expected to show some initiative.
And now a little song entitled "She was only a logicitions daughter but she wasn't an exclusive or"
I thank you.
Boom boom.
mhkyaw-7:
Re: Is there anybody who know how to write exclusive OR function(02 inputs, 01 out)?
There are lots of ways to do it, and lots of people who know the options. By the time you're finished your assignment you'll be one of them. If you do the assignment yourself, hopefully you will have thought about it enough to understand and remember the answer.
Look like the person setting the assignment is not very knowledgeable
{bitToggle = !bitToggle;}
The ! operator is not a bit operator and while in this case it will function it is not the way that can possibly be extended, so it is very poor code to give students.