This project implements the Tabular Method for finding the Minimal Sum of Products (MSOP) of a Boolean function. The method is used to identify Prime Implicants and Essential Prime Implicants for simplification.
main.py
- The main entry point of the program.utils/funcs.py
- Contains all functions used in the Tabular Method.
git clone https://github.com/5y3b/Tabular-Method.git
cd Tabular-Method
python main.py
The program will prompt you to enter minterms and don't-care terms for simplification.
Validates and filters minterms, ensuring they are unique non-negative integers.
Prompts the user to input minterms and returns them as a list of integers.
Prompts the user to input don't-care terms and returns them as a list of integers.
Groups minterms by the number of 1s in their binary representation.
Combines terms that differ by a single bit.
Combines two binary terms if they differ by one bit.
Finds Prime Implicants by iteratively combining terms.
find_essential_prime_implicants(minterms: list[int], prime_implicants: set[str], dont_care: list[int]=[]) -> set[str]
Identifies Essential Prime Implicants from the Prime Implicant Chart.
Generates all possible minterms covered by a prime implicant.
Converts essential prime implicants to a human-readable format.
Implements the Tabular Method and returns the minimized Boolean function.
This project is licensed under the MIT License.
Feel free to fork the project, submit issues, or contribute via pull requests!
Enjoy simplifying Boolean functions! 🎯