What are logic gates and truth tables?

170 views

This is a topic I’ve been struggling with and I need help understanding what different logic gates do and how to make truth tables for each.

In: 2

7 Answers

Anonymous 0 Comments

Here’s the boolean operations that you represent with single logic gates.

AND has two inputs, and outputs true only if both inputs are true. On diagrams, these gates look like a half circle on the output side and a square on the input side.

OR has two inputs, and outputs true only if either input is true. On diagrams, these gates look like curves bowing outward and meeting at a point on the output side, and bowing inward on the input side.

XOR has two inputs, and outputs true only if the two inputs are different. It looks like an OR gate, but with an extra curve on the input side.

NOT gates have only one input, and output the opposite of the input. Alone, it looks like a triangle pointing to the output, with a little circle on the point.

Sometimes the little circle symbol is combined with the other three gates to make NAND, NOR, XNOR gates. It’s the same as those first ones, but the output is the opposite. So a NAND outputs false only when both inputs are true.

You can also use the triangle part of the not gate without the little circle. It’s just a passthrough, so for logic purposes, it doesn’t really matter.

To draw a truth table, make a table such that there’s a column for every input and output, and a row for every combination of inputs. Then fill in the output column with the output that’s produced by the input listed in that row.

For these logic gates, they’ll be pretty small. Two rows for the NOT gate, and four for the others. You can combine logic gates in your design to implement more complicated logic though, and if you have more inputs, you’ll need a bigger table.

You are viewing 1 out of 7 answers, click here to view all answers.