<?xml version="1.0" encoding="ISO-8859-1" ?>
  <resource>
  <id>5973</id>
  <path>/www/nrich/html/content/id/5973/</path>
  <resourceTypeID>1</resourceTypeID>
  <last_published>2011-02-01T00:00:01</last_published>
  <indexXML>&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
In this problem a circuit has been set up. There are two switches
on the left, two logic gates in the middle and two bulbs on the
right.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Currently the gates are both set to XOR. They can be changed to any
of the following: AND, NAND, OR, NOR, XNOR. Any switch or gate can
be altered by clicking on the blue square in its top left hand
corner. If you are unsure about the meaning of the logic gates,
take a look at &lt;a href=&quot;http://nrich.maths.org/public/viewer.php?obj_id=5974&amp;amp;part=&quot;&gt;Circuit
Maker&lt;/a&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Can you set the gates so that the number of bulbs which are on is
the same as the number of switches which are on? In other words:
&lt;br&gt;&lt;/br&gt;

&lt;div style=&quot;margin-left: 40px;&quot;&gt;when both switches are off both
bulbs are off,&lt;br&gt;&lt;/br&gt;
when either switch is on one bulb is on,&lt;br&gt;&lt;/br&gt;
when both switches are on both bulbs are on.&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;
&lt;a href=&quot;/content/id/5973/Circuits%20adder%202.swf&quot;&gt;Full Screen
Version&lt;/a&gt; &lt;br&gt;&lt;/br&gt;
&lt;mdo:flash height=&quot;400&quot; width=&quot;560&quot;&gt;&lt;param value=&quot;/content/id/5973/Circuits%20adder%202.swf&quot; name=&quot;movie&quot; &gt;&lt;/param&gt;&lt;param value=&quot;8&quot; name=&quot;flashplayerversion&quot; &gt;&lt;/param&gt;&lt;/mdo:flash&gt;&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Other circuits to try to
construct&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Can you set the gates so that: &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;

&lt;div style=&quot;margin-left: 40px;&quot;&gt;when both switches are on both
bulbs are on,&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;the rest of the time - both bulbs
are off;&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;

&lt;div style=&quot;margin-left: 40px;&quot;&gt;when both switches are off both
bulbs are on,&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;the rest of the time - both bulbs
are off;&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;

&lt;div style=&quot;margin-left: 40px;&quot;&gt;when both switches are off both
bulbs are off,&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;when one switch is on both bulbs
are on,&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;when both switches are on one bulb
is on.&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;
Experiment further with the effects of the different settings to
create similar problems: choose a setting for the two gates,
describe clearly the effect of your circuit and challenge a partner
to figure out your settings.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
If you liked this problem you may like to build your own circuit
boards with interesting properties using the &lt;a href=&quot;http://nrich.maths.org/public/viewer.php?obj_id=5974&amp;amp;part=&quot;&gt;Circuit
Maker&lt;/a&gt; interactivity, or try the harder &lt;a href=&quot;http://nrich.maths.org/public/viewer.php?obj_id=5931&amp;amp;part=&quot;&gt;Adding
Machine&lt;/a&gt; problem. &lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</indexXML>
  <solutionXML>&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
&lt;p&gt;&lt;span class=&quot;editorial&quot;&gt;Well done to Chris from CSN for a clear
explanation on how to solve the first question, and well done to
Jake from Crosscrake C.E. School, Louise from Melling St.Wilfreds
School and Tristan from St James School for answering the first
three questions correctly. Special congratulations go
to Rachel from Tatham Fells School who managed to answer all
questions correctly. Here are her solutions:&lt;/span&gt;&lt;/p&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;With OR and AND for the
switches:&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
when both switches are off both bulbs are off, &lt;br&gt;&lt;/br&gt;
when either switch is on one bulb is on, &lt;br&gt;&lt;/br&gt;
when both switches are on both bulbs are on.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;With AND and AND for the
switches:&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
when both switches are on both bulbs are on, &lt;br&gt;&lt;/br&gt;
the rest of the time - both bulbs are off.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;With NOR and NOR for the
switches:&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
when both switches are off both bulbs are on, &lt;br&gt;&lt;/br&gt;
the rest of the time - both bulbs are off.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;With XOR and OR for the
switches:&lt;/span&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
when both switches are off both bulbs are off, &lt;br&gt;&lt;/br&gt;
when one switch is on both bulbs are on, &lt;br&gt;&lt;/br&gt;
when both switches are on one bulb is on.&lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</solutionXML>
  <noteXML>&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;

&lt;h3&gt;Why do this problem?&lt;/h3&gt;
This problem offers a simple challenge using logic gates and
circuits. Through experimentation with switches and settings,
students will begin to see the structure of logic gates emerge
without the need for any detailed formalism. They can then move on
to construct circuits with more complicated behaviours.&lt;br&gt;&lt;/br&gt;

&lt;h3&gt;Possible approach&lt;/h3&gt;
&lt;div&gt;If students haven't worked with logic gates before you could
start by directing them to &lt;a href=&quot;http://nrich.maths.org/public/viewer.php?obj_id=5974&amp;amp;part=&quot;&gt;Circuit
Maker&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;

&lt;div&gt;Put the problem on to the board. Ask students to work out what
the circuit board does.&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;

&lt;div&gt;Encourage experimentation with combinations of on / off
switches and different settings on the logic gates. At each stage,
encourage students to predict what they think will happen, and to
explain what does happen.&lt;/div&gt;
&lt;h3&gt;Key questions&lt;/h3&gt;
Describe what you see.&lt;br&gt;&lt;/br&gt;
What can we change? &lt;br&gt;&lt;/br&gt;
What will happen if we change the settings?&lt;br&gt;&lt;/br&gt;

&lt;h3&gt;Possible extension&lt;/h3&gt;
Once the concept of the gate is understood there are several follow
up problems, such as &lt;a href=&quot;http://nrich.maths.org/public/viewer.php?obj_id=5931&amp;amp;part=&quot;&gt;Adding
Machine&lt;/a&gt; &lt;br&gt;&lt;/br&gt;

&lt;h3&gt;Possible support&lt;/h3&gt;
You might suggest focussing on the AND and OR gates to begin
with.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</noteXML>
  <clueXML>&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
Take a look at &lt;a href=&quot;http://nrich.maths.org/public/viewer.php?obj_id=5974&amp;amp;part=&quot;&gt;Circuit
Maker&lt;/a&gt; and experiment with the interactivity provided.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
There is more information on Logic Gates &lt;a href=&quot;http://www.kpsec.freeuk.com/gates.htm&quot;&gt;here&lt;/a&gt; &lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</clueXML>
  <canonXML>&lt;mdoxml version=&quot;1.0&quot;&gt;
&lt;br&gt;&lt;/br&gt;
Settings: AND and OR for the two gates&lt;br&gt;&lt;/br&gt;
 &lt;br&gt;&lt;/br&gt;
s&lt;a href=&quot;/content/id/5973/Circuits%20adder%202.swf&quot;&gt;w&lt;/a&gt;f&lt;br&gt;&lt;/br&gt;
 &lt;br&gt;&lt;/br&gt;

&lt;/mdoxml&gt;</canonXML>
  <end_user_role>2</end_user_role>
  <difficulty>4</difficulty>
  <keystage1>0</keystage1>
  <keystage2>0</keystage2>
  <keystage3>1</keystage3>
  <keystage4>0</keystage4>
  <keystage4plus>0</keystage4plus>
  <title>Simple counting machine</title>
  <description>Can you set the logic gates so that the number of bulbs which are
on is the same as the number of switches which are on?</description>
  <spec_group>Information and Communications Technology
    <specifier>Programming</specifier>
  </spec_group>
  <spec_group>Information and Communications Technology
    <specifier>Interactivities</specifier>
  </spec_group>
  <spec_group>Decision Mathematics and Combinatorics
    <specifier>Logic</specifier>
  </spec_group>
</resource>