cube is a grpahical algorithm or reducing boolean functions. The allocations of boolean functions (000,001, etc.) are so arranged on the corners of a cube(boolean function with 3 variables) or a square (2 variables) that, if one marks the allocations which are equal to 1, one could merge edges or sides of the cube.
I will demonstrate this for a boolean function with 2 variables at is not very illustrative to draw a cube in ascii art
The plain square
looks like this:
01 O-----O 11
00 O-----O 10
Assume we have a function f(x1,x2)= !x1^!x2 v !x1^x2. We mark the corresponding corners (00 and 01):
01 *-----O 11
00 *-----O 10
As you can see we can merge the both conjunction
s as they lie on the !x1 edge and can write f(x1,x2) = !x1.
(This example even shows how useful this can be, as we saved a large amount of transistor
s. A NOT
needs only two. The prevous function needs for one AND
six. I do not remember exactly how many a OR
needed, but I guess at least six, too. This means we reduced the costs of realizing such a function to one ninth.)
You can never merge three conjunctions. You can only merge edges (no diagonals), sides or the complete cube.
If you want to use a boolean function with three variables, just add one dimension. You could also work with one variable, but this does not make any sense, because reducing a function with one variable is trivial. As long as you have no problems (I have) with visualizing 4-dimensional
cubes, you can use this method for function
s with four variables, too. But you could also use Quine-McClusky
or Karnaugh map