Construct a logic diagram using AND, OR, NOT, NAND, NOR and XOR gates.


Teaching Note:

Problems will be limited to an output dependent on no more than three inputs.

The gate should be written as a circle with the name of the gate inside it. For example:
(JSR note: after "For example:" there's a picture of an OR inside a circle)

LINK Thinking logically, connecting computational thinking and program design, introduction to programming.


Sample Question:


From Sample Paper 1 - 2014:

JSR Notes:



First of all a reminder of how Boolean operators function:

A processor contains logic gates, which are essentially circuits that can be open or closed, and so they reflect perfectly boolean logic.

"Closed" circuit = a complete circuit, electricity flows through - represented by boolean 1.
"Open" circuit = incomplete, electricity does not flow through - represented by boolean 0.


When there are 2 inputs to a logic gate:

The overall circuit is on (meaning it has electricity flowing through it)...
            ...for an AND logic gate...

... when both input switches are closed.

The overall circuit is on...     
            ... for an OR logic gate...

... when one input switch or the other is closed.

The overall circuit is on...
            ... for a NAND logic gate...

... when both input switches are open (i.e. not closed).


The overall circuit is on...
            ... for a NOR logic gate...

... when neither input switch is closed (which may seem kind of weird).

The overall circuit is on...  
          ... for a NOT logic gate...

... when the circuit it is connected to is off. So to clarify, a NOT gate stops the flow of electricity if it was flowing before, and makes electricity flow if it wasn’t.

The overall circuit is on...
            ... for a XOR logic gate...

... when one switch is closed, but not both.



Constructing the Diagrams

Do remember that for I.B. you only need the gates written in circles, not the fancy symbols shown way below, though they are the correct ones - IN FACT IT SAYS "circle with the name of the gate" in the teaching note.



Here are some examples:

circuit diaram

circuit diaram

circuit diaram

So the strategy for doing these logic diagrams is to follow order of operations (a repeat diagram of boolean order of operations is below). So take the example above.


The Correct Symbols - you are welcome to use either the correct symbols (see below) or the circles and words (see above). I would like you to use the proper symbols, but IB only requires the words (inside circles).

If you only use simple circle gates, obviously you will put "and", "or", or "not" in the circles. But you should do that too, even if you are using the correct symbols I taught you, on the off chance that an examination marker is unfamiliar with those symbols. i.e. MAKE SURE TO PUT "AND", "OR" ETC.IN YOUR SYMBOLS.

(I'm just going to paste here the notes from the Former Curriculum, assessment statement 4.2.5, which is exactly the same as this one.)

former curriculum 4.2.5 image


Here's some more practice, with answers:

Plus, you could also look at the following Former Curriculum assessment statements.

Former 4.2.5 - this one is for going the other way: from the circuit diagram to the expression.
Former 4.2.6-Extra

(And also, even these.)

(Former 4.2.2)
(Former 4.2.3)
(Former 4.2.4)


"La Piece do la Resistance" - Half Adder & Full Adder

And one last wonderful key bit of knowledge, if you want to give it a try, is how all of this is just one step away from, really, completely getting to know how computers work. It's a big step, and NOT PART OF IBCS, but it's explained well in both of the following videos.

What is it? It's how a computer does it's most fundamental operation, addition, with a fairly straight-forward combination of the logic gates we have been dealing with in the form of the half adder, and the full adder.


And, thanks, Gabriel for this one: