Basics for Digital Logic
Hi Everyone, It's been a while for me since I did anything with digital logic and had to remind myself of some stuff. If it's a new topic to you, I thought that it might be informative to know.
Logic is what computers or circuits use to make decisions, and that becomes important for automating an action. A simple example is if you want to know if a door opens, you can make a circuit with a switch to light a bulb or ring a bell if the door opens. The circuit is simple, but evaluates a condition (is the switch open or not), and then has a consequence (turn on the light).
If you want to compare two or more conditions at once, it's necessary to use a logic gate, or a device that compares two conditions or inputs at the same time. If you and your roommate want to have a secret ballot to decide if you want to get pizza, and both push a button at the same time to say "Yes", you need an AND gate to see that both are Yes, & both buttons are pushed. If both are Yes, the circuit could light a bulb. If one is yes and one is no, (or both no), then no light. I attach a diagram of some of the different gates, their symbols, and the different "decisions" they make in terms of truth tables.
The truth tables are written as 1's and 0's. I view "1" as "Yes" or "On", and practically that means that you have to supply a small voltage, usually ~ 5 Volts, to the device. For "0", you make a connection to "Ground". The gates often come in the form of chips, and are pretty straightforward to connect, but there are practical concerns: Is the chip good or defective? Are my connections and solder joints tight or loose, or did I solder 2 pins together?, Do I have enough chips and enough space on my circuit board to hook them together? etc. A big advantage of using an FPGA is that you have a library of logic gates available, you can make a complex array of gates to make complex decisions with mouse clicks instead of solder and wires, and it's easy to test it all at once without worrying about the solder / chip burnout issues.
I'm attaching a picture I found with more to come

Comments
Post a Comment