C# application to simulate logical circuits