Team project — C++, object-oriented design
Completed · 2026Logic Gate Circuit Simulator
A C++ event-driven simulator for digital logic circuits, a team project built by hand for an Object-Oriented Design course.
- C++
- OOP
- Digital Logic
The assignment
The final project for my Object-Oriented Design course was for me and my partner, Mark St. Michell, to build a command line program in C++ capabable of simulating digital logic. This was the culmination of two C++ classes and a digital logic design course we had taken.
MultiGate, traced
The above image is a graphical example of a circuit we simulated. Each gate has its own propigation delay we had to account for. Shown below is the waveform we generated for this circuit, inputs are in white, outputs are in blue.
The flip-flop
The above waveform was quite simple compared to implementing a flip-flop. Flip-flops are cross-coupled, the output of both gates feed back into the input of the other gate. This posed a significant design challenge because we dealt with both cross coupling and propagation delay. We reworked our code multiple times but in the end we made it work.
The flip-flop, traced
Because we were creating a waveform for a flip-flop, our output would have continued flipping back and forth between high and low for eternity so we had to added a maximum simulation length of 50 ns.
Once we solved the flip flop we were certain our program could handle any circuit our proffesor would throw at it.
How it wrapped
After about 10 hours of work a piece, we finished our logic gate circuit simulator. We earned an 100% on the assignment. This was the first time either of us had worked with Git and learning how to involve a teammate in a coding project was one of the most valuable things learned. This assignment also taught us how to design classes in C++, abstract away logic with functions, and deal with pointers. For a more technical explanation of this project, view our source code on GitHub.
More projects