LogicGates.org Open the simulatorSimulator
Roadmap

Reading a circuit diagram

Lesson 6 of 6 in this stage, about 12 minutes

The seven symbols, which way the signals flow, and how to work a drawing out wire by wire.

The seven shapes

A circuit is drawn as a circuit diagram: a symbol for each gate, and lines for the wires between them. You have seen the symbols one at a time through this stage; here they are together. The set is the one used on most schematics, and it is called ANSI after the American standards body that keeps it.

AND
OR
NOT
XOR
NAND
NOR
XNOR

Three shapes carry it all. AND has a flat back and a rounded nose. OR has a curved back and comes to a point. NOT is a triangle with a bubble. Everything else is built from those: XOR is OR with a second curve behind its back, and a bubble on the nose of AND, OR or XOR turns it into NAND, NOR or XNOR. A NOT gate is really a triangle that does nothing plus a bubble that does the flipping. There is a second style, the IEC rectangles, where every gate is the same box with a label inside; the symbol reference shows both side by side.

Which way the signal goes

Diagrams read like text: left to right. Inputs sit on the left, the output is on the right, and every gate points right, so its inputs enter its back and its answer leaves its nose. A wire from an input runs to one or more gates; a wire from a gate's nose runs to the next gate along, or to the output. If you ever lose your place, find the pointed or rounded end of a gate, which is always its output, and you know which way you are going.

One signal often needs to go to two places. On a printed schematic, wires that meet at a dot are joined and carry the same value; wires that simply cross with no dot are not connected at all, they just happen to pass each other on the page. The diagrams on this site avoid crossings where they can, and a signal that is used twice leaves its box as two wires, so you can always trace any wire back to the box or gate it came from.

Common mistake: reading a crossing as a join

Two wires that cross without a dot are two separate wires. Treating them as connected quietly changes what the circuit does, and it is the most common error in reading a schematic. If there is no dot, the wires are strangers.

Working out a diagram

The method is the one from the NOT lesson, now applied to a picture. Write the value of every input next to its box. Find a gate whose input wires all have values, apply its rule, and write the result on its output wire. Keep going until the output has a value. Every wire in the drawing ends up labelled with a 1 or a 0, and no gate is ever worked out before it is ready. The circuit below does the labelling for you in colour: green wires are 1 and red wires are 0. Change the inputs and follow the colours from left to right.

Three gates. Click the inputs and follow the colours from left to right.

out 0
Logic circuit diagram a b c 0
Green wires carry a 1, red wires carry a 0.

Worked example. In the circuit above, what is the output when a = 0, b = 1 and c = 0?

Label the inputs: a = 0, b = 1, c = 0. The OR gate has a and b, both known: at least one is 1, so its output wire is 1. The NOT gate has c = 0, so its output wire is 1. The AND gate now has 1 from the OR and 1 from the NOT. Both are 1, so the output is 1. Set the widget to 0, 1, 0 and every wire into the AND gate should be green.

From a diagram to an expression

The same walk from left to right also gives you the circuit as writing. Name what each gate computes as you reach it. The OR gate above takes a and b, so its output wire is a ∨ b. The NOT gate takes c, so its wire is ¬c. The AND gate takes those two wires, so the whole circuit is (a ∨ b) ∧ ¬c. The brackets are there because the OR happened first; without them the expression would read as "a, OR (b AND NOT c)", which is a different circuit. Going the other way, from an expression to a drawing, is what the circuit diagram generator does, and it is a good way to check your reading: type your expression in and see if the picture matches.

Why?: why learn to read drawings when there are expressions?

Because the drawing is what you will be handed. Datasheets, textbooks, exam papers and the simulator on this site all show circuits as pictures, and a picture shows things an expression hides: which signals are shared, how far a wire has to travel, and how many gates deep the circuit is, which decides how fast it can run. Being able to move freely between the two is the skill; each is easier to read for some questions and harder for others.

What to remember

  • AND is flat-backed, OR is curved and pointed, NOT is a triangle. XOR adds a curve; a bubble adds a NOT.
  • Signals flow left to right. A gate's inputs enter its back and its output leaves its nose.
  • Wires joined at a dot carry the same value. Wires that cross without a dot are not connected.
  • To find the output, label every wire from the inputs onwards, one gate at a time.
  • To write the expression, name what each gate computes as you reach it, with brackets round earlier gates.

Build it: a circuit of your own in the simulator.

Check yourself

Get 5 right in a row and the lesson is done. A wrong answer costs the run, not the lesson.

0 right in a row. 0 / 0 this visit

Which expression does this circuit implement?

Logic circuit diagram a c b Q
A logic circuit diagram with inputs a, b, c

Already know this? and come back to the quiz any time.

Go deeper