Page 1 of 1
How to simplify a group of Logic Blocks? - SOLVED
Posted: Fri May 22, 2020 12:36 pm
by DR White
Please see the attachment.
The Letters “A,B…” are either a 1 or a 0. Is the a simple way to write this function without a lot of “If” statements?
The result needs to be a 0 or a 1.
Thanks,
David
Re: How to simplify a group of Logic Blocks?
Posted: Fri May 22, 2020 1:26 pm
by Thierry
Well, if I understand the problem,
you could go this way:
I've replaced 0 and 1 with false and true,
much better for boolean operations.
Code: Select all
local A, B, C, D, E, F, G, H
put true into A
put false into B
put false into C
put false into D
put true into E
put true into F
put false into G
put false into H
put (A or B) and ( C or D) and ( E and F) and ( G or H)
Hope this give you some ideas...
Thierry
Re: How to simplify a group of Logic Blocks?
Posted: Fri May 22, 2020 1:44 pm
by DR White
Thierry,
That works BEAUTIFULLY!
THE LC FORUM IS THE BEST,
DAVID