1

I have to make a truth table with 5 inputs and 3 outputs, something like this:

A B C D E red green blue
0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 1
0 0 0 1 0 0 0 1 . . . . 1 1 0 1 0 0 1 1
. . . 1 1 1 1 1 1 0 1

etc. (in total 32 rows, the numbers in the rgb table represents the number of 1's in each row in binary i.e in row 1 1 0 1 0 there are three 1's, so three in binary is 0 1 1).

I would like to present the result of it in the Atanua (http://sol.gfxile.net/atanua/index.html) tool (so fore example when I press button E, the blue light will shine, when pressing A B D the green and blue light will shine and so on). But there is a requirement that I can only use AND, OR, NOT operands, and each operand can only have two inputs. Although I'm using Karnaugh map to minimize it, still for so many records the results for each output are very long (especially for the last one).

I tried to simplify it more by adding all of the three output boolean functions into one, and the minimization process ended pretty well:

A + B + C + D

It seems to work fine (but as there is only one output light, it works only in red green blue column separately). My concern is the fact that I would like to have three outputs (three lights, not one), and is that even possible after this kind of minimization? Is there a good solution to do it in Atanua? Or do I have to make 3 separate boolean functions, no matter how long they will be (and there is a lot of them even after minimization)?

EDIT: the whole truth table :)

A B C D E R G B

0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 1
0 0 0 1 0 0 0 1
0 0 0 1 1 0 1 0
0 0 1 0 0 0 0 1
0 0 1 0 1 0 1 0
0 0 1 1 0 0 1 0
0 0 1 1 1 0 1 1
0 1 0 0 0 0 0 1
0 1 0 0 1 0 1 0
0 1 0 1 0 0 1 0
0 1 0 1 1 0 1 1
0 1 1 0 0 0 1 0
0 1 1 0 1 0 1 1
0 1 1 1 0 0 1 1
0 1 1 1 1 1 0 0
1 0 0 0 0 0 0 1
1 0 0 0 1 0 1 0
1 0 0 1 0 0 1 0
1 0 0 1 1 0 1 1
1 0 1 0 0 0 1 0
1 0 1 0 1 0 1 1
1 0 1 1 0 0 1 1
1 0 1 1 1 1 0 0
1 1 0 0 0 0 1 0
1 1 0 0 1 0 1 1
1 1 0 1 0 0 1 1
1 1 0 1 1 1 0 0
1 1 1 0 0 0 1 1
1 1 1 0 1 1 0 0
1 1 1 1 0 1 0 0
1 1 1 1 1 1 0 1
And the karnaugh map for each color (~is the gate NOT, * is AND, + OR):
RED:
BCDE+ACDE+ABDE+ABCE+ABCD
GREEN:
~A~BDE+~AC~DE+~ACD~E+~BCD~E+~AB~CE+B~CD~E+BC~D~E+A~B~CE+A~B~CD+A~BC~D+AB~C~D

BLUE:
~A~B~C~DE+~A~B~CD~E+~A~BC~D~E+~A~BCDE+~AB~C~D~E+~AB~CDE+~ABC~DE+~ABCD~E+A~B~C~D~E+A~B~CDE+A~BC~DE+A~BCD~E+AB~C~DE+AB~CD~E+ABC~D~E+ABCDE

lepsztyk
  • 53
  • 2
  • 6
  • Can you post the rest of the values? Maybe there is a pattern. I think you are right that you need to create 3 boolean functions, but they don't have to be completely seperate, some parts might be reused. – maraca Apr 07 '17 at 13:29
  • I've added Edit with the whole truth table as well as the Karnaugh map for each light color. – lepsztyk Apr 07 '17 at 16:51
  • I don't think RED is correct, on the last line the red lamp wouls be lighted. You have to add the ~A to BCDE. Maybe there are mistakes in the other colors too and then the simplification gets better? – maraca Apr 07 '17 at 18:35
  • You were right, the last line was wrong, I already edited it. But the rest is good and it doesn't get close to simplification :( – lepsztyk Apr 07 '17 at 20:25

1 Answers1

0

Have to admit that the formulas are somewhat ugly, but it's not too complicated to implement with logic gatters, because you can reuse parts.

A -----+------+------------- - - -
      NOT     |
       +------|--AND- ~AB
       |      |   |
      AND-----|---|-- ~A~B
       +--AND-+   |
       |   +--|---|-- A~B
      NOT    AND--|-- AB
B -----+------+---+---------- - - -

Here as an example I created all combinations of [not]A and [not]B. You can do the same for C and D. So you can get any combination of [not]A and [not]B and [not]C and [not]D by combining a wire from each "box" with an and gatter (e.g. for ABCD we would take the AB wire AND the CD wire).

maraca
  • 8,468
  • 3
  • 23
  • 45