https://itch.io/t/3291682/7-segment-displays-in-digital-logic-sim
This should explain everything.