There's an exercise which states that depending on certain rules a led(of different colour) shall turn on or not. There are four leds, so I've made four functions (One each led, through Karnaugh Map of 4 variables). Each of these function are meant to control the workflow of the circuit and end up with the led, so far so good. Then, the doubt lies within the simplification part because the circuit function has many elements and it seems unlikely to be possible.
Red LED:
$F = ABD + BCD + ABC + ACD$
Green LED:
$F = A'B'CD + A'BC'D + A'BCD' + ABC'D' + AB'C'D + AB'CD'$
Blue LED:
$F = A'B'C'D + A'B'CD' + A'BC'D' + AB'C'D'$
No LED:
$F = A'B'C'D'$
As far as I've learned, now I need to put them together as one function but I need to look for those elements to be simplified. Therefore, regarding to the Red LED I'd do this:
$ F = B( AD + CD ) + A ( BC + CD)$
I personally would continue doing the same with the others functions, but it doesn't seem to be so helpful after all. What shall I do then? Leave it the way it is (but together) or try to group them and simplify as shown above.
The truthtable of your problem looks as follows:
Only one LED is on for every given input combination.
The LEDs indicate how many inputs are 1:
The terms in your expressions are already minimal in the sense that they cannot be reduced to fewer terms via Karnaugh Map block merge.
A full implementation as digital circuit created with Logic Friday 1:
An alternative implementation would be a counter/adder composed of three bit-slice stages:
First stage calculates the number of 1 bits in inputs A and B:
Second stage adds input C:
Final stage adds input D:
Drawn as circuit using Qucs: