How to simplifying boolean algebra expression?

R

Regardt

Hi all

I need do the following based on Boolean Algebra
ex 1. (M271/M272/M651)+(450/965)/M642/M646

All possible result
M271 + 450
M271 + 965
M272 + 450
M272 + 965
M651 + 450
M651 + 965
M642
M646

ex 2 M271/M646+M006/M651+M013
M271 + M006 + M013
M646 + M006 + M013
M271 + M651 + M013
M646 + M651 + M013

Do somebody no where I can find a code library or code to help
me to break up any Boolean Algebra expression into all possible result

Thanks in advance

PS. I also have more complex expression
 
T

tommaso.gastaldi

IMvHO if operation as as simple as thos you listed you don't need any
library.
Just put the

M271/M272/M651
450/965)/M642/M646

in different list a make nested cicles doing the operations.

If the dimensions of the problem (number of lists) is passed as a
parameter
you can use recursion to make the nested cicles.

If espression are more complicated, you can pass then preliminarly to
the VB compiler
(compile in memory) for appropriate reduction...

-tom
 
R

Regardt

Hi Tom

Thanks for the reply.

Quick Boolean background

The basic rules is as follows
/ (=OR),
+ (=AND),
- (=NOT)
The BRACKET is evaluated first, as is also the case in mathematics.
The AND is always evaluated before the OR.
The NOT is shown by the '-' sign which always refers directly to the
code or bracketed expression that it precedes.

If the I were looking to resolve a specific result the nest loops would
work, but I am trying to break the
expression in to all possible simplified expression

I hope the above makes a bit more sense
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top