Logic problem: need better logic for desired thruth table.

Michael Torrie torriem at gmail.com
Thu May 28 18:16:44 EDT 2015


On 05/28/2015 03:58 PM, sohcahtoa82 at gmail.com wrote:
> I think the logic you're really looking for is:
> 
> return BotWaitForCooldown or (not (BotWaitForCooldown or CooldownDetected))

Yes this is the simplest form.  For more complicated truth tables you
can create a K map and then apply a reduction algorithm to it.  This is
commonly done in logic circuits to reduce the number of gates to the
minimum.  While not faster, it can be expressed as:

return BotWaitForCooldown or not BotWaitForCooldown and not
CooldownDectected

Order of operations puts the ands above the ors.





More information about the Python-list mailing list