Boolean function calculator

For my honors project in Computer Architecture, I opted to program a calculator in Java that simplifies two-, three-, and four-term Boolean functions using K-map techniques. The calculator works by first reading each expression term as a four-term binary number and then using those numbers to insert each term into an array representing a K-map. Once in the K-map array, the program scans each possible grouping twice to check for unique and overlapping groups. Finally, the calculator scans the found groups backward and removes redundancies. Please click on the title of this post for a more detailed explanation on Github!

Removing redundancies proved challenging— under a tight deadline, I first attempted to brute force the problem by coding each case separately. When debugging, there was no way to decipher which case was causing overlap or redundancies. My solution occurred when I shifted my mindset toward building the most efficient code instead of finishing the project quickly. Taking a step back allowed me to cut the number of lines needed in half and devise the solution of scanning backward.