The Logic Gate Simulator is a Python-based project utilizing the Pygame module to create a graphical interface for simulating logic gates. This simulator allows users to design and simulate digital circuits by combining various logic gates in a user-friendly environment.
-
Interactive Interface: The simulator provides an intuitive and easy-to-use graphical interface for designing digital circuits.
-
Real-time Simulation: The simulator provides real-time simulation of the circuit, allowing users to observe the output dynamically as inputs change.
-
Multiple Logic Gates: Supports a variety of logic gates, including AND, OR, NOT, NAND, NOR, XOR, and more.
-
Deleting Gates: Users can delete the specific gates using right-click menu.
-
Remove all Connection: Users can remove all the connections from and to the gate in single-click.
-
Customizable Gates: Users can change the type of the gate in single-click.
-
Customizable Inputs: Users can customize input values to simulate different scenarios and test the behavior of their circuits and also can change the type of buttons to push or switch.
-
Customizable Inout button type: Users can change the input button type in single-click.
-
Clone the Repository:
git clone https://github.com/your-username/logic-gate-simulator.git
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Simulator:
python logic_gate_simulator.py
-
Design Circuit:
- Drag and drop logic gates onto the stage.
- Connect the gates by dragging wires between them.
-
Set Inputs:
- In switch mode -> click on input nodes to toggle their values (0 or 1).
- In push mode -> Hold the left-mouse-button on input nodes to turn on (1).
-
Simulation:
- Observe the real-time simulation as the output changes based on input values.
-
More to be added:
- Save your circuit design and load it for future use.
- Derive the equation for your circuit.
- Create the logic-gate combination from the equation provided.
- Simplifying the equation using boolean-algebra.
- Creation of custom gates(user-defined logic gates).
- AND
- OR
- NOT
- NAND
- NOR
- XOR
- XNOR
- What is SR flip-flop ? : click here
- This project is built using the Pygame library. (Link to Pygame: https://www.pygame.org/)
Contributions are welcome! Feel free to open issues or submit pull requests to enhance the simulator.
This project is licensed under the MIT License - see the LICENSE file for details.