Hi, I am a student with a basic knowledge of C#. For my project, I would like to build a logic gate simulator that could teach someone about the basics of Gates. I have seen this done before and always wanted to have a go myself. My starting point, I think, would be to treat each Gate as an 'object'. Where can I get assistance/tutorial from here ?

2 Years
Discussion Span
Last Post by ddanbe

You'll get help right here.
The Amount of help is usually directly proportional to the effort you are willing to put in yourself.

Do you have anything at all, yet?

I would start simple by creating simple classes for logic gates, for example.

class AndGate
        public bool GetOutput(bool a, bool b)
            return (a && b);

"&&" is the logical "And" operator.
That's a simple start to think about.


Just so happens, one of my(too many?) projects is trying to build an IC simulator.
I started with defining a pin. Be aware that this is just a sketch.

struct port
        public port(portIOtype pIO, signal sig)
            portIO = pIO;
            state = sig;
            pinNr = 0; 
            pinName = string.Empty;

        public string pinName { get; set; }

        public int pinNr { get; set; }

        public signal state { get; set; }

        public portIOtype portIO { get; set; }

        //public port connection ?;        
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.