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 ?

Recommended Answers

All 3 Replies

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 ?;        
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.