Skip to content


Repository files navigation

Forks Stargazers Issues MIT License


Reproduce digital electronics in Python

Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Coding Guidelines
  5. Roadmap
  6. Contributing
  7. License
  8. Contact

About The Project

This project is an attempt to reproduce digital electronics in Python. Its ultimate goal is to be able to build an actual CPU by simulating the core components of a real, physical, processor (using Transistors to build Logic Gates, using Logic Gates to build a Half Adder, using Half Adders to build Full Adders, and so on and so forth...).

By adding more components to the project, you will be helping achieve that goal!

Getting Started


Make sure you have virtualenv and Poetry installed.


  1. Clone the repo
    git clone
  2. Create the virtualenv
    virtualenv venv
  3. Use it
    source venv/bin/activate
  4. Install packages
    poetry install


The project is yet in its infancy, so there is not much to show for apart from some components.

Coding Guidelines

This project uses Black, Prospector, and Pytest. It is set to enforce all the linting rules and 100% test coverage when running:



See the open issues for a list of proposed features (and known issues).

It's tough to provide a real roadmap at this stage, since I'm still learning about digital electronics. Nonetheless, there are a few concepts that should be thought about to allow the project to grow:

  • Memory: All computers need memory. Whether D-Type FlipFlops, or SR Latches, we will need these components to build more complex components...
  • Unified Interfaces: It would be nice to have some utilities baked into all the components that can give us some stats:
    • Number of Transistors in this component
    • Total Number of Transistors,
    • Timing functions to measure performance
    • Etc
  • and more!


Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Do your magic
  4. Make sure tests pass with 100% coverage, as well as static validation (./
  5. Commit your Changes (git commit -m 'Add some AmazingFeature')
  6. Push to the Branch (git push origin feature/AmazingFeature)
  7. Open a Pull Request


Distributed under the MIT License. See LICENSE for more information.


Filipe Garcia -

Project Link:


Reproduce digital electronics in Python







No releases published


No packages published