Playing with the mouse
#4
(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.  Wink

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  Big Grin It is the teacher in me that wants to understand the WHY  Blush

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...
Reply


Messages In This Thread
Playing with the mouse - by NasaCow - 12-11-2022, 07:59 AM
RE: Playing with the mouse - by Pete - 12-11-2022, 02:47 PM
RE: Playing with the mouse - by NasaCow - 12-11-2022, 03:03 PM
RE: Playing with the mouse - by SMcNeill - 12-11-2022, 02:51 PM
RE: Playing with the mouse - by TempodiBasic - 12-11-2022, 03:10 PM
RE: Playing with the mouse - by Pete - 12-11-2022, 04:50 PM
RE: Playing with the mouse - by mnrvovrfc - 12-11-2022, 06:36 PM
RE: Playing with the mouse - by Pete - 12-11-2022, 06:39 PM
RE: Playing with the mouse - by TempodiBasic - 12-11-2022, 05:39 PM
RE: Playing with the mouse - by SMcNeill - 12-11-2022, 08:21 PM
RE: Playing with the mouse - by NasaCow - 12-12-2022, 09:38 AM
RE: Playing with the mouse - by TempodiBasic - 12-11-2022, 06:24 PM
RE: Playing with the mouse - by Pete - 12-12-2022, 12:22 AM
RE: Playing with the mouse - by TempodiBasic - 12-13-2022, 02:45 PM



Users browsing this thread: 7 Guest(s)