Ok, karnaugh maps are understandable, and I get my expressions based on the truth table. The thing is that I want it to be smaller.

Using Karnaugh map, I get approximetly 24-26 gates. Although I have heard that it is possible to get the circuit down to 16-17 gates. So my question is how I can simplify the circuit even more?

I tried using boolean algebra, but I think it demands some speciall skills or tricks to simplify this circuit even more. My book does not cover any tricks on handeling situations like the one I described. The book only covers the theorems and axioms.

I appriciate all the help I can get. I am looking for links, info, anything.