this is the problem i'm running into. I want
a b c
1 1 1
1 0 1
0 1 1
0 0 0
but, when a and b are 0, c must be able to be 0 or 1 on it's own, independant of a and b.
The story goes:
i turn on either button A or button B and it turn on C. When i turn off button A or B then button C turns off. Now, if I ONLY turn on button C it stays on and I can turn button C off as well.
I think you need a fourth variable.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
how would i do that?
d = ( !c && ( a || b ) ) || c;
If c is off, you get a or b
If c is on, then a and b don't matter.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
what is the 4th variable?
cause i've got button A, B, and C...
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
the output of D is the button C.
can I just define D as the button C ?
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
they would be the same.
When D is ON then C is ON
when D is OFF then C is OFF