This project was developed as part of my coursework for the “Basics of Mathematical Science” course at IAU SRB. Inspired by the fundamental concepts of logic and Boolean algebra, I created this truth table generator from scratch, without relying on any external modules or libraries. The goal was to deepen my understanding of logical operations, truth values, and the systematic representation of logical expressions. This is a simple yet powerful Truth Table Generator that can handle complex logical expressions. It supports various logical operators such as → (implication), ↔ (equivalence), ∧ (conjunction), ∨ (disjunction), and ~ (negation). The tool also automatically detects and handles parentheses in the input expression.
Follow these steps to set up the project:
git clone https://github.com/Parsalimi/Truth-Table.git
cd Truth-Table
pip install -r requirements.txt
python main.py
Suppose you want to generate a truth table for the expression (p∧q)→p. Here's how you can do it:
p | q | p∧q | (p∧q)→p |
---|---|---|---|
T | T | T | T |
T | F | F | F |
F | T | F | T |
F | F | F | T |
This project is licensed under the MIT License