Implement the function Z = AB’C’D’ + A’B’CD’ + BD + A’C’D + ACD using the PLA provided below.
Extra credit: Implement the function yet again using the 3:8 decoder provided below and as few extra gates as possible.