12-11-2022, 03:03 PM
(This post was last modified: 12-11-2022, 03:08 PM by NasaCow.
Edit Reason: Clarifying
)
(12-11-2022, 02:47 PM)Pete Wrote: ...
Just for fun, I also included the Boolean table from the wiki:
Code: (Select All)┌───────────────┬────────────────────────────────────────────────────────┐
│ Operands │ Logical operations │
├───────┬───────┼───────┬─────────┬────────┬─────────┬─────────┬─────────┤
│ A │ B │ NOT B │ A AND B │ A OR B │ A XOR B │ A EQV B │ A IMP B │
├───────┼───────┼───────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ true │ true │ false │ true │ true │ false │ true │ true │
├───────┼───────┼───────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ true │ false │ true │ false │ true │ true │ false │ false │
├───────┼───────┼───────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ false │ true │ false │ false │ true │ true │ false │ true │
├───────┼───────┼───────┼─────────┼────────┼─────────┼─────────┼─────────┤
│ false │ false │ true │ false │ false │ false │ true │ true │
└───────┴───────┴───────┴─────────┴────────┴─────────┴─────────┴─────────┘
Pete
Just for fun, I looked at that table and tried NOT and AND with () around the OR conditions to make it work before I said "What the hell, can't be worse than a strobing box..." Imagine my surprise when EQV just worked...
Thank you for teaching the teacher. the double up the ANDs with the ORs make some sense to me!
(12-11-2022, 02:51 PM)SMcNeill Wrote: https://staging.qb64phoenix.com/showthread.php?tid=1187 <-- Read this for EQV, and then see if you have any questions.
I did read it before the post. Just didn't really explain the difference between AND and EQV to me well. If I get from Pete, then AND only works on the nearest OR operator (?) and EQV will work on the whole string of operations (?) Kind of like AND with OR multiply first and EQV gets added in at the end if I may use 5th grade math PEMDAS as a way to understand It is the teacher in me that wants to understand the WHY
Edit: I guess it really is the order of operations... I read it left to right and assumed that the one false on one side with the AND would make it all false but I guess I am messing up my Boolean order of operations...