TactivergeOffline

Level 1 Discovering How the World Works · Term 2: Machines and Logic

How machines move and how they decide. Learners take apart (on screen) the levers, gears, pulleys and mechanisms that turn a push or a spin into useful work, use ratios and coordinates to size and place them, then discover how machines store information as bits and make decisions with logic gates, rules and states. The term ends with each learner designing, testing and presenting a simulated everyday machine.

In this file: 26 lessons across weeks 10–18, with 114 practice questions (questions only, no answers).

Develop engineering curiosity, foundational scientific reasoning and the ability to understand simple systems. Levels describe what you can do, not your age. About About 2–3 hours a week (three short lessons and a lab), with optional extensions. Stop and pick up any time..

Week 10: Mechanical components

This week you will

What is a machine, really?

A pair of scissors, a bicycle and a washing machine are all machines. What do they have in common that a brick doesn't?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Engineers almost never invent a machine from nothing. They pick from a small toolbox of trusted parts (levers, gears, belts, springs, bearings) and connect them. Once you can spot those parts, every machine stops being a mystery box and becomes a story: where does the push come in, how is it passed along, and what comes out?

Goals

Safety: Look at machines from the outside only. Never open an appliance or put fingers near moving parts.

Predict

Which of these is the best description of what a machine does?

  1. It creates energy out of nothing
  2. It changes a push or a turn into a more useful push or turn
  3. It always makes a job need less force

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Open the washing machine Build at Level 1 and map its parts. For each part, ask: is it an input, something that passes motion along, or the output? Where does the motor's turn end up?

What the interactive shows, in words

The washing machine Build can be replaced by this description: the motor (input) turns a small pulley; a belt (transmission) carries the turn to a big pulley fixed to the drum; the drum (output) spins the clothes. Springs and dampers hold the tub, and bearings let the drum shaft spin smoothly.

Understand

Input, transmission, output

Every machine has an input (where energy comes in: your hand, a motor, a falling weight), a transmission (the parts that pass motion along and change it) and an output (the useful job: cutting, lifting, spinning a drum). Draw it as three boxes with arrows, and you have the first diagram an engineer sketches.

The component toolbox
Parts allow some motions and block others

A door hinge lets the door swing but stops it sliding up and down. A drawer runner lets the drawer slide in and out but not swing. Engineers call each allowed motion a degree of freedom. Choosing which motions a part allows, and which it blocks, is half of mechanical design.

Explain it another way: intuitive

Think of a machine as a relay race for motion. The input runner (your hand) passes the baton (motion) to the next runner (a lever), who passes it to the next (a gear), and the last runner crosses the finish line (the useful job). Each runner can change the speed, but nobody adds extra energy to the baton.

Explain it another way: technical

A machine is a set of connected bodies, constrained by joints, that transmits and transforms force and motion from an input to an output. Each joint removes some degrees of freedom: a hinge (revolute joint) leaves one rotation; a slider (prismatic joint) leaves one translation.

Explain it another way: applied

In a bicycle: input = your feet on the pedals (a lever called a crank), transmission = the chain and sprockets (gears linked by a chain), output = the back wheel pushing the road. Bearings in the pedals, wheels and steering keep friction low.

Try these examples

Example 1

Trace a hand-cranked pencil sharpener from input to output.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. In an electric fan, what is the input?

  • The spinning blades
  • The electric motor
  • The cool breeze
  • The guard around the blades

2. Which component's main job is to let a shaft spin smoothly with little friction?

  • Spring
  • Bearing
  • Lever
  • Belt

3. A door hinge allows how many kinds of motion (degrees of freedom) for the door?

  • None
  • One: swinging about the hinge
  • Two: swinging and sliding up
  • Six: any motion at all

4. A clicky pen springs back after you press it. What does the spring do?

  • Creates new energy
  • Stores the energy of your press and gives it back
  • Makes the pen lighter
  • Turns the ink into motion

Apply it

Pick a machine in your home that you can see working without opening it (a door handle, a tap, a stapler, a bicycle). Draw it as input → transmission → output boxes and label at least two components from the toolbox.

Reflect

Which component from the toolbox do you think is used most often in the world, and why?

Go further (online)

Levers: how a small push lifts a big load

Archimedes said: give me a lever long enough and a place to stand, and I will move the Earth. Was he exaggerating?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Levers are everywhere: scissors, crowbars, wheelbarrows, your own forearm. Every robot arm joint is a lever too, and engineers use the same simple rule to decide how strong its motor must be.

Goals

Predict

A 40 N load sits 2 pegs from the pivot. Where should you push so that the smallest push balances it?

  1. Close to the pivot
  2. Far from the pivot
  3. It doesn't matter where you push

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set the load to 40 N at 2 pegs. Move your push to 1, 2, 4 and 5 pegs, and each time find the push that makes the beam level. Write down the pairs: what do you notice when you multiply?

What the interactive shows, in words

The lever diagram shows a beam on a triangular pivot. A load hangs on the left and a downward push arrow sits on the right, each at a chosen distance in pegs. If load × load distance equals push × push distance, the beam is level; otherwise it tips toward the side with the bigger turning effect. A panel shows both turning effects and the mechanical advantage.

Understand

Three words: fulcrum, effort, load

A lever is a stiff bar that turns about a pivot called the fulcrum. The effort is your push. The load is what you want to move. In a seesaw the fulcrum is in the middle; in a wheelbarrow the wheel is the fulcrum and the load sits between it and your hands.

Turning effect = force × distance

A force makes a lever turn more if it acts further from the fulcrum. Try opening a door by pushing next to the hinges: it is hard work! Engineers measure the turning effect (also called a moment or torque) as force × distance from the pivot.

The law of the lever

A lever balances when the turning effects on each side are equal:

load × load distance = effort × effort distance

So a 60 N load 1 m from the pivot balances with a 20 N push 3 m away, because 60 × 1 = 20 × 3. Push further away, and you need less force.

The catch

Your 20 N push 3 m away has to move 3 times further than the load moves. A lever trades force for distance. You never get both a smaller push and a shorter movement.

Explain it another way: intuitive

On a seesaw, a small child can balance a grown-up if the child sits right at the end and the grown-up sits close to the middle. Distance makes up for weight.

Explain it another way: technical

The moment of a force about a pivot is M = F × d, where d is the perpendicular distance from the pivot to the line of the force. For static equilibrium the clockwise moments equal the anticlockwise moments.

Explain it another way: mathematical

Balance: W × a = E × b, so E = W × a ÷ b. The mechanical advantage is W ÷ E = b ÷ a. For a 40 N load at a = 2 and a push at b = 5: E = 80 ÷ 5 = 16 N, mechanical advantage 2.5.

Explain it another way: applied

Robot designers use exactly this rule: a 2 kg (about 20 N) gripper at the end of a 0.5 m arm needs a shoulder motor that can provide 20 × 0.5 = 10 N·m of turning effect, before adding the arm's own weight.

Try these examples

Example 1

A 90 N rock sits 0.5 m from a crowbar's pivot. You push 1.5 m from the pivot. What push balances it?

The worked solution is in the online lesson.

Example 2

A 30 N child sits 2 m from a seesaw's middle. Where must a 60 N child sit to balance?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A 50 N load is 1 m from the pivot. You push 5 m from the pivot. What push balances it, in newtons?

Answer: N

2. Why is a door handle put on the side far from the hinges?

  • It looks better
  • A push far from the pivot has a bigger turning effect
  • The door is lighter on that side
  • So the door closes by itself

3. You lift a heavy box with a long lever using only a small push. What is the catch?

  • There is no catch
  • Your hand has to move much further than the box
  • The box gets heavier
  • The lever must be made of metal

4. A 80 N load hangs 2 m from the pivot of a lever. You push down on the other side, 7 m from the pivot. How hard must you push to balance it, in newtons?

Answer: N

5. On a lever, the load is 0.2 m from the pivot and you push 1 m from it. What is the mechanical advantage (effort distance ÷ load distance)?

Answer:

Apply it

Using the lever diagram, find three different (push, distance) pairs that balance a 60 N load at 2 pegs. Explain in one sentence why they all work.

Reflect

Was Archimedes exaggerating? What would the problem be with a lever long enough to move the Earth?

Go further (online)

Gears, belts and wheels: passing a turn along

Two gears touch. You turn one clockwise. Which way does the other one go, and why does that matter for a clock?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Gears are in clocks, cars, drills, bikes and every robot joint. Getting the direction and speed right is the first job; get it wrong and a robot's wheel spins backwards or a clock runs anticlockwise.

Goals

Predict

A chain of three gears touches in a row. You turn the first one clockwise. Which way does the third one turn?

  1. Clockwise
  2. Anticlockwise
  3. It won't turn

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Start with a 20-tooth driver and a 20-tooth driven gear. Turn the driver once: which way does the driven gear go? Now switch the idler on and turn again. Then try a 10-tooth driver with a 40-tooth driven gear.

What the interactive shows, in words

The gear diagram shows an orange driver gear meshing with a blue driven gear, optionally with a small purple idler between them. Pressing 'Turn driver' rotates the driver clockwise; the driven gear turns anticlockwise, or clockwise when the idler is on. The status line reads out the turns of each gear and their directions.

Understand

Teeth push teeth

A gear is a wheel with teeth. When two gears mesh, the teeth of the driver (the one turned by the motor) push the teeth of the driven gear. Because the teeth lock together, the gears can't slip, so they always stay in step.

Meshing gears turn opposite ways

Where two gears touch, their edges move in the same direction, like two hands rubbing together. That forces their centres to spin opposite ways. Add a third gear in between (an idler) and the output flips back to the driver's direction. The idler changes direction only, not speed.

Belts and chains keep the direction

A belt or chain wraps around two wheels, so both wheels turn the same way. That is why a bike's back wheel turns the same way as the pedals. Belts can also link wheels that are far apart. A smooth belt can slip; a toothed belt or a chain cannot.

Explain it another way: intuitive

Hold two coins edge to edge on a table and roll one: the other rolls the opposite way. Gears are coins with teeth so they can't slip.

Explain it another way: technical

At the contact point (the pitch point) the two gears share the same surface speed. With centres on opposite sides of that point, equal surface speed means opposite angular directions. Each external mesh reverses rotation, so an odd number of meshes reverses the output and an even number doesn't.

Explain it another way: applied

Analogue clocks use idler gears so the hands all turn the right way. Car gearboxes use a tiny extra idler gear to make reverse.

Try these examples

Example 1

Four gears in a row. Gear 1 turns clockwise. Which way does gear 4 turn?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A driver gear turns anticlockwise. Which way does the gear it meshes with turn?

  • Anticlockwise
  • Clockwise
  • It doesn't move

2. A belt links a motor pulley to a fan pulley. The motor turns clockwise. The fan turns…

  • clockwise
  • anticlockwise
  • faster in the opposite direction

3. Five gears mesh in a row. How many direction changes happen between gear 1 and gear 5?

Answer:

4. What does an idler gear between a driver and a driven gear change?

  • Only the output direction
  • Only the output speed
  • Both speed and direction
  • Nothing at all

Apply it

Design (on paper) a gear chain where a motor turning clockwise makes an output turn clockwise, using the fewest gears. Then design one using a belt instead. Which would you use if the motor is 1 m from the output?

Reflect

Why do you think bicycles use a chain instead of a long row of gears between the pedals and the back wheel?

Go further (online)

Week 11: Motion and simple mechanisms

This week you will

Spin, slide, swing: the four kinds of motion

A motor can only spin. So how does a sewing machine needle go up and down, or a windscreen wiper swing side to side?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Motors are brilliant at one thing: spinning. Almost every job needs something else, such as a push, a slide or a swing. A mechanism is the clever bit in between that converts the motor's spin into the motion the job needs.

Goals

Predict

A robot arm has two joints that can only *turn*. Can its hand move in a straight line?

  1. No, turning joints can only make curves
  2. Yes, if both joints turn together in just the right amounts
  3. Only if one joint is removed

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the robot arm lab, turn only the first joint and watch the hand's path. Then turn only the second. Finally, try to move the hand straight to the right by nudging both joints. What kind of motion does each joint make?

What the interactive shows, in words

The robot arm lab shows a two-link arm on a fixed base. Turning the first joint swings the whole arm around the base in a big circle; turning the second swings only the outer link in a smaller circle. Moving both together lets the hand travel along a straight line.

Understand

Four kinds of motion
Mechanisms convert motion
Joints add up

A robot arm is a chain of levers joined by turning joints. Each joint is rotary, but the hand's path depends on all of them together. Working out where the hand ends up from the joint angles is called forward kinematics.

Explain it another way: intuitive

Pedalling a bike: your knees go up and down (reciprocating) but the cranks turn the pedals round and round (rotary). Your legs and the crank are a living crank-and-slider.

Explain it another way: technical

Motion conversion mechanisms are classified by input and output motion. A crank of radius r driving a slider gives a stroke of 2r per revolution. A rack and pinion advances the rack one pinion circumference (π × diameter) per turn.

Explain it another way: applied

A 3D printer uses toothed belts to turn motor spin into linear motion of the print head; a car's windscreen wiper uses a crank linkage to turn a motor's rotation into oscillation.

Try these examples

Example 1

A crank has a radius of 3 cm. How far does the slider travel from one end of its stroke to the other?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A hand saw moving back and forth through wood shows which kind of motion?

  • Rotary
  • Linear
  • Reciprocating
  • Oscillating

2. A clock pendulum swinging shows which kind of motion?

  • Oscillating
  • Reciprocating
  • Rotary
  • Linear

3. Which mechanism turns a steering wheel's rotation into the sideways slide that steers a car's wheels?

  • Cam and follower
  • Rack and pinion
  • Pulley
  • Spring

4. A crank has a radius of 5 cm. What is the slider's full stroke, in cm?

Answer: cm

Apply it

Find three objects at home that convert one kind of motion into another (looking, not opening). For each, name the input motion, the output motion and your best guess at the mechanism.

Reflect

Which kind of motion do you think is hardest to make from a spinning motor, and why?

Go further (online)

Pulleys: lifting with rope and wheels

Builders lift steel beams heavier than a car using a rope and a few wheels. How can a person's pull be enough?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Cranes, lifts, sailing boats, gym machines and flagpoles all use pulleys. Engineers choose how many strands to use by balancing two things: how hard you have to pull, and how much rope you have to haul.

Goals

Predict

A 100 N bucket hangs from one rope that runs over a single pulley fixed to the ceiling. How hard must you pull down?

  1. 50 N
  2. 100 N
  3. 200 N

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set a 120 N load. Try 1, 2, 3 and 4 supporting strands and note the pull each time. Then drag 'Lift progress' to 100%: how far did your hand travel compared with the load?

What the interactive shows, in words

The pulley diagram shows a load hanging from a block. With one strand, the rope runs over a fixed pulley to your hand. With more strands, the rope loops between a fixed top block and a movable bottom block. The pull shown is the load divided by the number of strands. Moving 'lift progress' raises the load and lowers your hand by strands × the load's rise.

Understand

A fixed pulley changes direction

A pulley is a wheel with a groove for a rope. Fixed to the ceiling, it lets you pull down to lift a load up. The pull is the same as the load, but pulling down is easier because you can lean your weight into it.

Count the strands

Add a movable pulley attached to the load and the rope now holds the load up with more than one strand. In an ideal system every strand carries the same tension, so:

pull = load ÷ number of supporting strands

With 4 strands, a 120 N load needs only 30 N of pull. The number of strands is the mechanical advantage.

No free lunch

To lift the load 1 m, each of the 4 strands must get 1 m shorter, so you pull 4 m of rope. Pull × rope distance = 30 × 4 = 120, the same as load × height = 120 × 1. This is the golden rule of machines: force × distance in = force × distance out (minus losses).

Explain it another way: intuitive

Imagine four friends each holding one strand of rope under a heavy box. Each friend only needs to hold a quarter of the weight. In a pulley system, the 'friends' are all the same rope, and you hold one end.

Explain it another way: technical

For an ideal (frictionless, massless) block and tackle with n supporting segments, the tension T in the rope is uniform and n·T = W, so T = W/n. Conservation of rope length gives a pulled length of n·h for a lift of h.

Explain it another way: mathematical

Pull E = W ÷ n, rope pulled s = n × h, so E × s = (W ÷ n) × (n × h) = W × h: the work in equals the work out. For W = 200 N, n = 4, h = 1.5 m: E = 50 N, s = 6 m, and 50 × 6 = 200 × 1.5 = 300 J.

Explain it another way: applied

Tower cranes thread their hook rope through several pulleys (a block and tackle) so a modest winch can lift tonnes, at the cost of winding in lots of rope slowly. Real pulleys have friction, so the actual pull is always a bit higher.

Try these examples

Example 1

A 240 N engine part hangs from a pulley system with 3 supporting strands. What is the ideal pull, and how much rope lifts it 2 m?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. What does a single fixed pulley do for you?

  • Halves the force
  • Changes the direction of the pull
  • Doubles the force
  • Shortens the rope you pull

2. An ideal pulley system holds a 80 N crate with 2 rope strands supporting the bottom block. How hard do you pull on the free end, in newtons?

Answer: N

3. A pulley system has 2 supporting strands. To lift a load 1.5 m, how many metres of rope must you pull through?

Answer: m

4. You can pull at most 50 N. What is the smallest number of supporting strands needed to lift a 180 N load with an ideal pulley system?

Answer:

5. Adding more strands makes the pull smaller. What gets bigger?

  • The load
  • The length of rope you pull
  • The height the load rises
  • Nothing

Apply it

A theatre needs to lift a 300 N piece of scenery 4 m using a stagehand who can pull 80 N. Choose the number of strands, and say how much rope the stagehand pulls. What is one reason not to just use as many strands as possible?

Reflect

Why do cranes lift heavy loads slowly? Use the words 'force' and 'distance' in your answer.

The golden rule: trading force for distance

A lift carries ten people up a skyscraper, yet its motor is smaller than a car engine. What's the trick?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every simple machine obeys the same rule, so once you know it you can check any machine design in seconds. It also stops you falling for 'free energy' gadgets.

Goals

Predict

To get a 500 N barrel 1 m up onto a truck, you can lift it straight up or roll it up a 5 m ramp. Ignoring friction, how hard must you push along the ramp?

  1. 500 N, the same
  2. 100 N
  3. 2,500 N

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Ride the lift in the Elevator Build. Find the counterweight. While the cabin goes up, what does the counterweight do, and how does that help the motor?

What the interactive shows, in words

The Elevator Build shows a lift shaft. The cabin hangs from a cable running over a drive wheel at the top to a counterweight on the other side. As the cabin rises, the counterweight falls the same distance, so the motor only supplies the difference in weight plus friction.

Understand

Work = force × distance

Engineers call force × distance moved work, measured in joules (J). Lifting a 100 N box 2 m takes 100 × 2 = 200 J, however you do it.

The golden rule

For an ideal machine, work in = work out. A lever, a pulley and a ramp are three ways of doing the same thing: you push with less force over a longer distance, or more force over a shorter distance. A machine that claims to give out more work than you put in is breaking the rule, so it can't be real.

Friction takes a cut

Real machines lose some work to friction, which turns into heat. Efficiency = useful work out ÷ work in. A machine that needs 250 J to lift 200 J worth of load is 200 ÷ 250 = 80% efficient. Bearings, oil and smooth surfaces push efficiency up.

Counterweights: let gravity help

A lift's cabin is hung from a cable that runs over a wheel to a heavy counterweight on the other side. As the cabin goes up, the counterweight goes down, so the motor only has to lift the difference in weight, not the whole cabin.

Explain it another way: intuitive

Climbing a hill by a zigzag path is easier than going straight up, but it's a longer walk. You end up at the same height, having done the same lifting.

Explain it another way: technical

Ideal mechanical advantage = output force ÷ input force = input distance ÷ output distance. Actual mechanical advantage is lower because of friction; efficiency η = W_out ÷ W_in < 1.

Explain it another way: mathematical

Ramp: E × L = W × h, so E = W × h ÷ L. Barrel: 500 × 1 ÷ 5 = 100 N. If the real push is 125 N, the efficiency is (500 × 1) ÷ (125 × 5) = 500 ÷ 625 = 80%.

Explain it another way: applied

Lift designers make the counterweight about the cabin's weight plus half the usual passenger load. With a 6,000 N cabin and a 7,500 N counterweight, a half-full lift is nearly balanced and the motor mostly fights friction.

Try these examples

Example 1

A 1,000 N cabin is balanced by an 800 N counterweight. Ignoring friction, how much force does the motor need to lift the empty cabin at steady speed?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. How much work does it take to lift a 50 N toolbox 3 m, in joules?

Answer: J

2. An ideal ramp is 4 m long and rises 1 m. What push lifts a 200 N box up it, in newtons?

Answer: N

3. A pulley system needs 400 J of your work to lift a load that gains 300 J. What is its efficiency, in percent?

Answer: %

4. An advert says a gadget lets you put in 100 J and get 150 J of lifting out, with no battery. What should an engineer think?

  • Great, buy ten
  • It breaks the golden rule, so the claim is false
  • It works only on Tuesdays
  • It must use very good bearings

5. A lift cabin with passengers weighs 9,000 N and its counterweight weighs 7,000 N. Ignoring friction, what force must the motor provide to raise it steadily, in newtons?

Answer: N

Apply it

Compare three ways to get a 600 N crate onto a 1.5 m platform: a 6 m ramp, a 4-strand pulley and a lever with arms of 0.5 m and 2 m. Calculate the ideal force for each, and say which you would choose and why.

Reflect

Explain the golden rule of machines to a younger friend using one example from your own life.

Week 12: Ratios and proportional reasoning

This week you will

What a ratio says

A bike gear, a recipe and a map all hide the same kind of number. What is it, and why do engineers love it?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

A ratio tells you how two things relate, whatever their size. That is exactly what engineers need: a gear ratio works for a toy or a truck, a scale works for a model or a skyscraper, a mix works for a cupful or a tanker.

Goals

Predict

A 10-tooth gear drives a 30-tooth gear. A 20-tooth gear drives a 60-tooth gear. Which pair turns its output more slowly?

  1. The 10 : 30 pair
  2. The 20 : 60 pair
  3. They are exactly the same

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set a 10-tooth driver and a 30-tooth driven gear and turn the driver 3 times. The 60-tooth gear isn't in the box, so compare 10 and 30 with 10 and 20, then 20 and 40. Which two pairs behave identically?

What the interactive shows, in words

In the gear diagram, a 10-tooth driver meshing with a 30-tooth driven gear turns the output once for every three turns of the input (ratio 1 : 3). A 10-tooth driver with a 20-tooth gear, and a 20-tooth driver with a 40-tooth gear, both turn the output once for every two turns of the input: 10 : 20 and 20 : 40 are the same ratio, 1 : 2.

Understand

A ratio compares

A ratio compares two amounts. If a machine mixes 2 cups of sand for every 6 cups of gravel, the ratio of sand to gravel is 2 : 6. Order matters: gravel to sand is 6 : 2.

Simplify by dividing both sides

Divide both numbers by the same number and the ratio still says the same thing. 2 : 6 ÷ 2 = 1 : 3. A ratio is in its simplest form when no whole number bigger than 1 divides both parts.

Scale by multiplying both sides

Need more? Multiply both parts by the same number. 1 : 3 is the same as 4 : 12 or 10 : 30. These are equivalent ratios. To find a missing amount, work out the scale factor: if 2 cups of sand go with 6 of gravel, then 18 cups of gravel is 3 times as much, so you need 2 × 3 = 6 cups of sand.

Explain it another way: intuitive

A ratio is like a recipe card that works for any number of people. Double the people, double everything on the card.

Explain it another way: technical

The ratio a : b is equivalent to ka : kb for any non-zero k. In simplest form, the greatest common divisor of the parts is 1. A ratio a : b can also be written as the single number a ÷ b.

Explain it another way: mathematical

Missing value: if a : b = x : B, then x = a × (B ÷ b). For 2 : 6 = x : 18, x = 2 × 18 ÷ 6 = 6. Simplest form of 24 : 36: the GCD is 12, so 2 : 3.

Explain it another way: applied

Concrete for a garden path might be 1 : 2 : 3 (cement : sand : gravel). A builder scales it to the size of the job without changing the strength of the mix.

Try these examples

Example 1

Simplify 15 : 45.

The worked solution is in the online lesson.

Example 2

Paint is mixed 3 parts blue to 2 parts white. How much blue goes with 10 litres of white?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A gear pair has 25 teeth on the driven gear and 5 teeth on the driver. Write the ratio 25 : 5 in its simplest form. What is the FIRST number?

Answer:

2. A mixing machine uses 6 cups of flour for every 2 eggs. Keeping the same ratio, how many cups of flour go with 4 eggs?

Answer:

3. Which ratio is equivalent to 4 : 6?

  • 6 : 8
  • 2 : 3
  • 8 : 10
  • 4 : 12

4. A machine uses 1 bolt for every 4 washers. What is the ratio of washers to bolts?

  • 1 : 4
  • 4 : 1
  • 5 : 1
  • 1 : 5

Apply it

Write the ratio of two things in your day (for example, minutes of homework to minutes of break) in simplest form. Then scale it to describe a whole week.

Reflect

Why is a ratio more useful to an engineer than just the two numbers on their own?

Gear ratios: speed or strength, pick one

Why does a bike feel easy to pedal but slow in its lowest gear, and fast but hard work in its highest?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Motors spin fast but weakly. Wheels, robot joints and winches need to turn slowly but strongly. A gear ratio is the dial engineers turn to give each job the speed and strength it needs.

Goals

Predict

A 10-tooth gear drives a 40-tooth gear. The small gear turns 8 times. How many times does the big gear turn?

  1. 32 times
  2. 8 times
  3. 2 times

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Try a 10-tooth driver with each driven gear (10, 20, 30, 40). Turn the driver 4 times each and record the output turns. Then flip it: 40-tooth driver, 10-tooth driven. What is the pattern?

What the interactive shows, in words

In the gear diagram, choosing a small driver and a large driven gear makes the driven gear turn fewer times than the driver (for example, 4 turns of a 10-tooth driver give 1 turn of a 40-tooth gear). Choosing a large driver and a small driven gear makes the output turn more times. The status line reads out the ratio, the output turns, the direction and the change in turning force.

Understand

Count the teeth

Every tooth that passes the meeting point on one gear also passes on the other. So:

gear ratio = driven teeth ÷ driver teeth

A 10-tooth driver and a 30-tooth driven gear give a ratio of 30 ÷ 10 = 3, often written 3 : 1.

Speed goes down…

Output turns = input turns ÷ gear ratio. With a ratio of 3, the driver turns 3 times for every 1 turn of the output. A motor spinning at 300 turns per minute drives the output at 100 turns per minute.

…turning force goes up

The golden rule again: what you lose in speed you gain in turning force (torque). With a ratio of 3, an ideal gearbox gives the output 3 times the turning force of the motor. A ratio less than 1 (big gear driving small) does the opposite: faster but weaker. Real gears lose a little to friction.

Explain it another way: intuitive

Low bike gear: a small front cog drives a big back cog. Every pedal turn moves the wheel only a little, so it is easy to push up hills. High gear does the reverse: each pedal turn spins the wheel a lot, fast but heavy going.

Explain it another way: technical

For meshing gears, the pitch-line speeds match: ω₁ × r₁ = ω₂ × r₂, and teeth are proportional to radius, so ω₂ = ω₁ × N₁ ÷ N₂. Ideal power is conserved, so torque scales the opposite way: τ₂ = τ₁ × N₂ ÷ N₁.

Explain it another way: mathematical

Ratio G = N_driven ÷ N_driver. Output speed = input speed ÷ G, output torque = input torque × G (ideal). Motor 1,200 rpm, 0.5 N·m through 12 → 48 teeth: G = 4, output 300 rpm and 2 N·m.

Explain it another way: applied

A robot vacuum's wheel motors spin thousands of times a minute. Gearboxes with ratios around 30 to 100 slow that down to a gentle roll and give the wheels enough force to climb onto a rug.

Try these examples

Example 1

A 12-tooth motor gear drives a 36-tooth wheel gear. The motor spins at 600 turns per minute. How fast does the wheel turn?

The worked solution is in the online lesson.

Example 2

A 40-tooth driver turns a 10-tooth gear 5 times. How many turns does the output make?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A driver gear with 15 teeth turns a driven gear with 30 teeth. What is the gear ratio (driven teeth ÷ driver teeth)?

Answer:

2. A 10-tooth driver gear meshes with a 30-tooth driven gear. The driver turns 12 times. How many times does the driven gear turn?

Answer: turns

3. A motor at 900 turns per minute drives a gear pair with a ratio of 3 (driven ÷ driver). How fast does the output turn, in turns per minute?

Answer: turns/min

4. A robot needs to climb a steep ramp. Which gear choice helps most?

  • Small driver, big driven gear
  • Big driver, small driven gear
  • Two gears the same size
  • Remove the gears

5. Gear A (10 teeth) drives gear B (50 teeth). Which is true for an ideal gearbox?

  • B is faster and stronger
  • B is slower and stronger
  • B is faster and weaker
  • B is slower and weaker

Apply it

A winch motor spins at 1,200 turns per minute, but the drum should turn at 60. Choose two gear tooth counts that give the right ratio. What happens to the turning force?

Reflect

If you were designing a racing car's top gear and a tractor's lowest gear, how would their ratios differ and why?

Scale models and proportional thinking

Engineers test a 1 : 50 model bridge before building the real one. If the model is 1 m long, how big is the bridge?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Engineers shrink things to test them (models, drawings, simulations) and grow things to build them. Proportional reasoning is how they move between the two without mistakes.

Goals

Predict

On a lever, a 40 N load needs a 20 N push. If you double the load to 80 N (same distances), what push do you need?

  1. 20 N
  2. 40 N
  3. 60 N

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Fix the distances at 2 pegs (load) and 4 pegs (push). Find the balancing push for loads of 20, 40, 60 and 80 N. Make a table. Is the push proportional to the load? Now fix the load and change only the push distance: is that proportional too?

What the interactive shows, in words

With the lever distances fixed at 2 and 4 pegs, the balancing push is always half the load: 10 N for 20 N, 20 N for 40 N, 30 N for 60 N, 40 N for 80 N (proportional). With the load fixed, pushing further away needs less force: 40 N at 2 pegs, 20 N at 4 pegs (inversely proportional).

Understand

Scale is a ratio

A scale of 1 : 50 means 1 cm on the model stands for 50 cm in real life. To go from model to real, multiply by 50. To go from real to model, divide by 50. A 2 cm model part is 100 cm (1 m) in real life.

Proportional means 'times the same number'

Two quantities are proportional if one is always the other times a fixed number. Gear output turns are proportional to input turns; pulley pull is proportional to load. Test: double one; if the other exactly doubles, it is proportional. On a graph, a proportional relationship is a straight line through zero.

Not everything scales

Doubling the push distance on a lever halves the push needed. That's not proportional: it goes the other way (called inversely proportional). And some things don't scale simply at all: a model bridge twice as big is eight times as heavy, but its beams are only four times as strong. That's why engineers can't trust a model's strength blindly.

Explain it another way: intuitive

Proportional is like buying sweets at a fixed price each: twice as many sweets, twice the cost. Inverse is like sharing a pizza: twice as many friends, half each.

Explain it another way: technical

y is proportional to x if y = k·x for a constant k (the constant of proportionality). y is inversely proportional to x if y = k ÷ x. A scale factor is the k between model and real lengths.

Explain it another way: mathematical

Lever push E = W × a ÷ b. For fixed a and b, E = (a ÷ b) × W: proportional to W with k = a ÷ b. For fixed W and a, E = (W × a) ÷ b: inversely proportional to b. Volume scales as k³ and area as k², so weight grows faster than strength.

Explain it another way: applied

Wind-tunnel engineers test small car and plane models, then scale up the results with careful rules, because air doesn't behave identically around a model and the real thing.

Try these examples

Example 1

A 1 : 20 model robot arm is 15 cm long. How long is the real arm, in metres?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A model of a bridge span is built at a scale of 1 : 25. The model is 2 cm long. How long is the real bridge span, in metres?

Answer: m

2. A real conveyor belt is 12 m long. How long is it on a 1 : 100 drawing, in centimetres?

Answer: cm

3. Which of these is proportional?

  • Gear output turns vs input turns (same gears)
  • Lever push needed vs push distance
  • Your height vs your age
  • Temperature in °C vs time of day

4. A pulley system's pull is proportional to the load. A 60 N load needs a 15 N pull. What pull does a 200 N load need, in newtons?

Answer: N

Apply it

Make a 1 : 10 sketch of a machine you know (a desk, a bike, a door). Label three real lengths and the matching drawing lengths. Then name one thing about the real machine your drawing can't tell you.

Reflect

Give one example of a proportional relationship and one inversely proportional relationship from this term's machines.

Week 13: Introduction to coordinates

This week you will

Grids and ordered pairs: giving every point an address

How can you tell a robot exactly where a dropped screw is on a factory floor, using just two numbers?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every robot, game, map app and 3D printer uses coordinates. Before a machine can go anywhere, someone must agree where zero is and which way is which. Get that wrong and the robot goes to the wrong place with total confidence.

Goals

Predict

A robot is told to go to (2, 5). Where does it end up?

  1. 2 across, 5 up
  2. 5 across, 2 up
  3. Either; it's the same point

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Drive the robot from (0, 0) to the star. Before each move, say out loud what the new coordinates will be. Then press 'New target' and do it again without looking at the readout.

What the interactive shows, in words

The grid robot diagram shows a square grid numbered 0 to 8 on both axes, with the origin at the bottom left. A robot starts at (0, 0) and a star marks the target. Each button moves the robot one square: right adds 1 to x, left subtracts 1, up adds 1 to y, down subtracts 1. The readout announces the robot's coordinates after every move.

Understand

Two number lines

Draw a number line across the page: that's the x-axis. Draw another going up: that's the y-axis. They cross at the origin, the point (0, 0). Every point now has an address made of two numbers.

Across, then up

A point is written as an ordered pair (x, y). Start at the origin, go x across, then y up. A memory trick: along the corridor, then up the stairs. (3, 1) and (1, 3) are different points, so the order really matters.

Why engineers love grids

Once every point has an address, a machine can be given exact instructions: 'drill at (40, 25) mm', 'pick up the part at (3, 7)'. The grid can be any size: millimetres on a circuit board, metres in a warehouse, kilometres on a map.

Explain it another way: intuitive

Coordinates are like seat numbers in a cinema: row and seat. 'Seat 4, row 7' is not the same as 'seat 7, row 4', and you'd end up in someone else's seat.

Explain it another way: technical

A Cartesian coordinate frame is defined by an origin and two perpendicular axes with a chosen unit. A point P is described by its signed distances (x, y) from the origin along each axis.

Explain it another way: applied

A CNC router cutting wood gets a list of coordinates in millimetres measured from a corner of the board. Engineers 'zero' the machine at the start so its origin matches the board's corner exactly.

Try these examples

Example 1

A drawing robot starts at (1, 2) and draws straight lines to (4, 2), (4, 5) and back to (1, 2). What shape is it?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A point is 4 squares across and 1 square up from the origin. How is it written?

  • (1, 4)
  • (4, 1)
  • (4 1)
  • 4 : 1

2. What is the y coordinate of the point (6, 3)?

Answer:

3. What are the coordinates of the origin?

  • (1, 1)
  • (0, 0)
  • (0, 1)
  • It depends on the robot

4. A grid robot starts at (2, 3). It moves: 2 left, 2 right, 2 up, 1 right, 1 up. What is its y coordinate now? (Up adds to y; right adds to x.)

Answer:

Apply it

Draw an 8 × 8 grid and plot a simple picture (a house, a rocket) by joining points. Write the list of coordinates so a friend, or a drawing robot, could redraw it without seeing yours.

Reflect

Why do you think everyone agreed to put x first? What would go wrong if two engineers disagreed?

Programming a robot on a grid

A warehouse robot can only drive along the aisles. What's the shortest route to a shelf, and how many routes are that short?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Real warehouse robots, delivery bots and even game characters move on grids. Writing their instructions means thinking in changes of position, and checking that a list of moves really ends where you meant.

Goals

Predict

A robot at (2, 3) moves 3 right and 4 down. Where is it?

  1. (5, 7)
  2. (5, −1)
  3. (−1, 7)

Write down your guess and your reason. The reveal is in the online lesson.

Discover

For each target, first write your full program (like R R R U U) on paper, then type it in with the buttons. Did you reach the star in the shortest number of moves? Find two different shortest programs for the same star.

What the interactive shows, in words

In the grid robot diagram, each move changes one coordinate by 1, and the readout lists every move made so far, for example 'R R U'. When the robot reaches the star, it reports how many moves it used and the shortest possible number, which is the across gap plus the up/down gap.

Understand

A move is a change

Each instruction changes the coordinates. Right: x + 1. Left: x − 1. Up: y + 1. Down: y − 1. A move like '3 right, 2 up' is a change of (+3, +2). Engineers call a change in position a displacement, and they often draw it as an arrow.

Track x and y separately

To predict where a long program ends, add up all the x changes and all the y changes separately. R R U L U R: x changes +1 +1 −1 +1 = +2, y changes +1 +1 = +2. From (0, 0) the robot ends at (2, 2), however the moves are mixed up.

Shortest route

On a grid with no diagonal moves, the smallest number of moves from A to B is (the across gap) + (the up/down gap). From (1, 2) to (4, 6): 3 across + 4 up = 7 moves. There are usually many different 7-move routes, because you can mix the order. A good robot planner picks one that avoids obstacles.

Explain it another way: intuitive

Think of walking around a city of square blocks. To get 3 blocks east and 4 blocks north you must walk 7 blocks, whichever streets you choose.

Explain it another way: technical

A displacement is a vector (Δx, Δy). Displacements add component by component, so the order of moves doesn't change the final position. Grid ('taxicab' or Manhattan) distance is |Δx| + |Δy|.

Explain it another way: mathematical

From (x₁, y₁) to (x₂, y₂): Δx = x₂ − x₁, Δy = y₂ − y₁, moves = |Δx| + |Δy|. From (−2, 3) to (3, −1): Δx = 5, Δy = −4, so 9 moves.

Explain it another way: applied

Warehouse robots plan on a grid of floor squares. Their software checks the shortest route, then picks the one that doesn't cross another robot's path at the same time.

Try these examples

Example 1

A robot runs: U U R R R D L. It started at (1, 1). Where does it end?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A grid robot starts at (3, 0). It moves: 3 left, 2 right, 2 down, 2 left. What is its x coordinate now? (Up adds to y; right adds to x.)

Answer:

2. A warehouse robot can only drive along grid lines (no diagonals). It is at (-3, 3) and must reach (-3, -3). What is the smallest number of one-square moves?

Answer:

3. Which program takes a robot from (0, 0) to (2, 1)?

  • U U R
  • R U R
  • R R D
  • L L U

4. Program A is R R U. Program B is U R R. Starting from the same place, which is true?

  • They end in the same place
  • A ends further right
  • B ends higher
  • They can't be compared

Apply it

Draw a 6 × 6 grid with three 'shelf' squares the robot can't enter. Write the shortest program from (0, 0) to (5, 5) that avoids them. Is it still 10 moves?

Reflect

Why might a real robot NOT choose the shortest route?

Four quadrants: below zero and behind the robot

A robot arm reaches behind its own base. How do you write down where its hand is?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Robots work all around themselves: left and right, above and below. Negative coordinates let one grid cover every direction, and putting the origin at the robot's base makes its maths much simpler.

Goals

Predict

The point (−3, 2) is in which direction from the origin?

  1. Right and up
  2. Left and up
  3. Left and down
  4. Right and down

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the robot arm lab, the base is the origin. Move the hand into each of the four quadrants and read off its coordinates. Can the hand reach (−0.5, 0.5)? Can it reach (0, 0)?

What the interactive shows, in words

The robot arm lab shows a two-link arm whose base is the origin of a grid with axes through it. Moving the joints carries the hand into the four quadrants; the readout gives the hand's x and y in metres. Points left of the base have negative x and points below it have negative y. The hand can't reach points closer to the base than the difference of the link lengths, or farther than their sum.

Understand

Below zero

Extend both number lines past zero. Left of the origin, x is negative. Below it, y is negative. Now the axes split the plane into four quadrants: (+, +) top right, (−, +) top left, (−, −) bottom left and (+, −) bottom right.

Put the origin where it helps

The origin is a choice. For a robot arm, engineers put it at the base, so the hand's coordinates say 'how far forward and how high, from the robot'. For a warehouse, it might be a corner of the floor. The same spot can have different coordinates in different frames, so always say which frame you mean.

Where's the hand?

A robot arm is a chain of links. If the first link points straight up and is 1 m long, the elbow is at (0, 1). If the second link then points left and is 0.5 m long, the hand is at (−0.5, 1). Adding up each link's change in x and y gives the hand's position: that is forward kinematics in its simplest form.

Explain it another way: intuitive

Stand in the middle of a room and call that spot zero. In front of you is positive, behind you is negative; to your right is positive, to your left is negative. You now have your own personal coordinate frame.

Explain it another way: technical

Choosing a frame means picking an origin and axis directions. The same physical point has coordinates in every frame; converting between frames is called a transformation. Robots use a base frame, a tool frame and a world frame.

Explain it another way: mathematical

For links that point along the axes, the hand position is the sum of link displacements: (0, 1) + (−0.5, 0) = (−0.5, 1). For tilted links you need trigonometry: x = L·cos θ, y = L·sin θ, which you will meet in later years.

Explain it another way: applied

Industrial robots store taught positions in the base frame. If the robot is moved to a new spot in the factory, only the base frame's position in the world changes; the taught moves stay the same.

Try these examples

Example 1

A robot arm's first link (0.8 m) points right and its second link (0.6 m) points down. Where is the hand, from the base?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. In which quadrant is (−2, −5)?

  • Top right
  • Top left
  • Bottom left
  • Bottom right

2. How many squares apart, across, are x = −3 and x = 4?

Answer:

3. A robot's first link (1 m) points straight up from the base. Its second link (0.4 m) points left. What is the hand's x coordinate, in metres?

Answer: m

4. A warehouse robot can only drive along grid lines (no diagonals). It is at (-1, 2) and must reach (2, 4). What is the smallest number of one-square moves?

Answer:

5. Why do engineers usually put a robot arm's origin at its base?

  • Because it's the heaviest part
  • So the hand's coordinates say directly how far it is from the robot
  • Because negative numbers aren't allowed
  • It's the only possible choice

Apply it

Choose the centre of your desk as the origin. Write the coordinates (in cm) of four objects on it, one in each quadrant. Then move the origin to a corner and rewrite them. What changed and what didn't?

Reflect

Where would you put the origin for a robot vacuum cleaner, and why?

Week 14: Digital information

This week you will

Analog and digital: smooth worlds, stepped machines

A thermometer's red line can sit anywhere. A digital thermometer shows 21.5 or 21.6, never in between. What did it throw away?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

The real world is smooth: temperatures, colours and distances can take any value. Computers can only store whole steps. Every sensor in every machine has to cross that border, and engineers decide how fine the steps should be.

Goals

Predict

A sorting machine's colour sensor gives a 'redness' score from 0 to 100. The machine has to decide 'red' or 'not red'. What is the simplest way?

  1. Ask a human every time
  2. Pick a threshold, e.g. above 65 means red
  3. Average all the parts it has ever seen

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the sorting machine Build, look at each part's sensor readings (numbers that could be anything) and the thresholds in the brief. Sort the six parts by hand. Which step turns a smooth reading into a yes/no answer?

What the interactive shows, in words

In the sorting machine Build, each part on the conveyor has readings: a redness score, a length and a metal-detector value. The brief gives thresholds, for example redness above 65 counts as red. Comparing each reading with its threshold turns it into a yes or no, and the three answers together choose a bin.

Understand

Analog: any value

An analog quantity can take any value in a range: the temperature might be 21.4 °C, 21.43 °C or 21.4372 °C. A clock with sweeping hands, a dimmer switch and the height of water in a bath are analog.

Digital: fixed steps

A digital value can only be one of a fixed list of steps. A digital thermometer that shows one decimal place has steps of 0.1 °C: 21.4, 21.5, 21.6. Turning an analog signal into steps is called analog-to-digital conversion. Smaller steps are more precise but need more storage.

The simplest step: a threshold

The roughest possible conversion has just two steps: yes or no, 1 or 0. Pick a threshold: above it is 1, otherwise 0. A night light turns on below a brightness threshold; a sorting machine calls a part 'red' above a redness threshold. Readings close to the line are where mistakes happen, so engineers test them carefully.

Explain it another way: intuitive

Analog is a ramp; digital is a staircase. You can stand anywhere on a ramp, but only on a step of a staircase. The smaller the steps, the more the staircase feels like a ramp.

Explain it another way: technical

An ADC samples a continuous voltage and quantises it to one of 2ⁿ levels, where n is its number of bits. A comparator is a 1-bit ADC: its output is 1 when the input exceeds a reference (the threshold).

Explain it another way: mathematical

With a range R split into N equal steps, step size = R ÷ N. A thermometer covering 0–50 °C in 500 steps has steps of 50 ÷ 500 = 0.1 °C. A reading of 21.43 °C is stored as the step 214 (21.4 °C).

Explain it another way: applied

Phone cameras convert light at each pixel into one of 256 or more brightness steps. Car rain sensors use a threshold on reflected light to decide when to start the wipers.

Try these examples

Example 1

A light sensor reads 0 (dark) to 1,000 (bright). The night light rule is: ON if the reading is below 200. Readings are 150, 200 and 640. What does the light do each time?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Which of these is analog?

  • The number of people in a lift
  • The water level in a tank
  • Whether a door is open or shut
  • The score in a football match

2. A sensor measures distances from 0 to 2 m in 200 equal steps. How big is each step, in centimetres?

Answer: cm

3. A smart fan follows this rule: IF someone is home AND the temperature is above 25 °C, THEN fan on (1), ELSE fan off (0). Someone is home and it is 25 °C. What does the fan do (1 or 0)?

Answer:

4. Where is a threshold-based sorting machine most likely to make mistakes?

  • Parts far above the threshold
  • Parts far below the threshold
  • Parts whose reading is close to the threshold
  • It never makes mistakes

Apply it

Design a threshold rule for an automatic plant-watering machine using a soil-moisture sensor that reads 0 (bone dry) to 100 (soaking). Pick a threshold, say what happens just above and just below it, and explain one problem if the threshold is too high.

Reflect

Name one thing in your life that is analog and one that is digital. What would be lost if the analog one became digital?

Bits: how much can two lights say?

A lighthouse can only flash on or off. How many different messages could you send with three lamps?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every photo, song, game and robot command is, deep down, a long line of bits. Knowing how many patterns a few bits can make tells engineers how many wires, lights or memory cells a machine needs.

Goals

Predict

One lamp can show 2 messages (on, off). How many different patterns can 3 lamps show?

  1. 3
  2. 6
  3. 8

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Use the 4-bit register. Starting from all off, press 'Add 1' over and over and write down every pattern until it wraps back to 0000. How many patterns did you find? Now imagine adding a fifth switch.

What the interactive shows, in words

The binary switches diagram shows a row of 4 (or 8) switches, each showing 0 or 1. Pressing 'Add 1' repeatedly steps through every pattern: 0000, 0001, 0010, up to 1111, which is 16 patterns for 4 bits, and then wraps back to 0000.

Understand

A bit is one choice

A bit (short for binary digit) is the smallest piece of information: 0 or 1. Inside a machine it could be a switch off or on, a voltage low or high, a hole punched or not, a magnet pointing one way or the other.

Every bit doubles the patterns

1 bit: 2 patterns. 2 bits: 4 (00, 01, 10, 11). 3 bits: 8. 4 bits: 16. n bits give 2 × 2 × … × 2 (n times) = 2ⁿ patterns. That's why 8 bits (one byte) already give 256 patterns, enough for every letter, digit and symbol on a keyboard.

A code gives patterns meaning

Patterns mean nothing until people agree a code. A 2-bit code for a robot might be: 00 = stop, 01 = left, 10 = right, 11 = forward. The same pattern can mean different things in different codes, so the sender and receiver must use the same one.

Explain it another way: intuitive

Each bit is a fork in a path: left or right. Two forks give 4 possible routes, three forks give 8. Every new fork doubles the number of places you could end up.

Explain it another way: technical

The number of distinct states of n independent binary elements is 2ⁿ. To encode M different messages you need at least ⌈log₂ M⌉ bits: 5 messages need 3 bits, because 2 bits give only 4.

Explain it another way: mathematical

2¹ = 2, 2² = 4, 2³ = 8, 2⁴ = 16, 2⁵ = 32, 2⁶ = 64, 2⁷ = 128, 2⁸ = 256. To find the bits needed for 20 messages: 2⁴ = 16 is too few, 2⁵ = 32 is enough, so 5 bits.

Explain it another way: applied

Traffic-light controllers, washing machine programs and robot modes are all stored as short bit codes. A washing machine with 12 programs needs at least 4 bits to remember which one you picked.

Try these examples

Example 1

A robot needs commands for: stop, forward, back, left, right and beep. What is the fewest bits per command?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A machine sends messages using 6 on/off lights (6 bits). How many different patterns can it make?

Answer:

2. A vending machine has 10 buttons. What is the smallest number of bits that can give each button its own pattern?

Answer: bits

3. The pattern 10 means 'turn right' to one robot and 'beep' to another. Why?

  • One robot is broken
  • Patterns only mean something through an agreed code
  • Bits change meaning randomly
  • 10 is always 'ten'

4. How many bits are there in one byte?

  • 2
  • 4
  • 8
  • 10

Apply it

Invent a 3-bit code for a pet-feeding robot: up to 8 commands. Write the table, then 'send' a friend a message of three commands as bits (like 011 101 000) and see if they can decode it.

Reflect

Why do you think computers use only two symbols (0 and 1) instead of ten like we do?

Pictures as numbers: pixels

A robot's camera doesn't 'see' a cat. It sees a grid of numbers. How many numbers make one photo?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Self-driving cars, sorting machines and phone cameras all work on images. Before a machine can recognise anything, an engineer has to know how the image is stored, how big it is, and how much detail it can hold.

Goals

Predict

A black-and-white picture is 8 pixels wide and 8 pixels tall, one bit per pixel. How many bits is it?

  1. 16
  2. 64
  3. 256

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Load the smiley and read the row numbers. Now draw your own 8 × 8 icon. Then press Invert: what happens to each row's bits? Could a friend redraw your picture from just the eight numbers?

What the interactive shows, in words

The pixel picture diagram shows an 8 by 8 grid of squares, each ink (1) or paper (0), with a table giving each row as 8 bits and as a number. The smiley's first row is 00111100, which is 60. Pressing Invert flips every bit, so 00111100 becomes 11000011 (195). The grid can be navigated with arrow keys and Space toggles a pixel.

Understand

A picture is a grid

Zoom in on any screen and you find tiny squares called pixels (picture elements). A digital image is just a grid of pixels, and each pixel is stored as a number. To a machine, a photo is a big table of numbers.

Bits per pixel = how many shades

With 1 bit per pixel, each pixel is black or white. With 2 bits, 4 shades. With 8 bits, 256 shades of grey. Colour photos usually use 8 bits each for red, green and blue: 24 bits per pixel, over 16 million colours.

How big is a picture?

bits = width × height × bits per pixel. An 8 × 8 icon at 1 bit is 64 bits. A 100 × 100 greyscale image at 8 bits is 100 × 100 × 8 = 80,000 bits = 10,000 bytes. Bigger, more detailed images need much more storage and take longer for a robot to process.

Explain it another way: intuitive

It's like a paint-by-numbers mosaic: a grid of squares, each with a number that says which colour tile to use.

Explain it another way: technical

A raster image is a 2D array of samples. Each sample is quantised to 2ᵇ levels, where b is the bit depth. Size in bits = W × H × b (before compression).

Explain it another way: mathematical

A 640 × 480 image at 8 bits: 640 × 480 = 307,200 pixels × 8 = 2,457,600 bits = 307,200 bytes, about 0.3 MB.

Explain it another way: applied

The sorting machine's camera turns each part into a small grid of colour numbers. Code then averages the 'redness' numbers and compares the average with a threshold.

Try these examples

Example 1

A 16 × 16 game sprite uses 4 bits per pixel. How many colours can it use, and how many bits is it?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A tiny robot-eye camera takes pictures 10 pixels wide and 4 pixels tall. Each pixel uses 2 bits (4 possible shades). How many bits is one picture?

Answer: bits

2. A tiny sensor image is 12 pixels wide and 10 pixels tall. How many pixels does it have?

Answer: pixels

3. How many different shades can a pixel show if it uses 3 bits?

Answer: shades

4. You invert a black-and-white image (black ↔ white). What happens to each pixel's bit?

  • Nothing
  • Each 0 becomes 1 and each 1 becomes 0
  • All bits become 0
  • The picture gets bigger

Apply it

Design an 8 × 8 icon for a machine's display (for example, a warning sign or a battery). Write it as eight row numbers. Swap numbers with a friend and redraw each other's icons.

Reflect

If a robot's camera image is just numbers, what makes it hard for the robot to recognise an object?

Week 15: Binary representation

This week you will

Counting with only 0 and 1

You count 8, 9, 10 because you have ten fingers. How would you count if you only had two?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every number inside a computer, from your game score to a robot's motor speed, is stored in binary. Reading binary lets you see what a machine is really holding.

Goals

Predict

In binary, what comes after 1?

  1. 2
  2. 10
  3. 11

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Use 4 bits. Make the numbers 1 to 15 by flipping switches. Which switch flips every single time you add 1? Which flips least often? Then try the challenges.

What the interactive shows, in words

The binary switches diagram labels each switch with its place value: 8, 4, 2, 1 for 4 bits (or 128 down to 1 for 8). Turning switches on adds their place values; the total is shown and read out, for example '1011 in binary = 8 + 2 + 1 = 11'. Pressing 'Add 1' counts up; the rightmost switch flips every time.

Understand

Place value, the familiar way

In ordinary decimal numbers each place is worth ten times the one to its right: ones, tens, hundreds. 352 means 3 × 100 + 5 × 10 + 2 × 1. You carry when a place goes past 9.

Place value in base 2

In binary, each place is worth two times the one to its right: 1, 2, 4, 8, 16, 32, 64, 128. Each place holds only 0 or 1. To read 1011, put the place values over the bits: 8, 4, 2, 1. Add the places with a 1: 8 + 2 + 1 = 11.

Counting up

0, 1, 10, 11, 100, 101, 110, 111, 1000… The rightmost bit flips every time. The next flips every 2 counts, the next every 4, the next every 8. It's the same carrying you already know, just carrying at 2 instead of 10.

Explain it another way: intuitive

Imagine coins worth 1, 2, 4 and 8 pence, and you have exactly one of each. Any amount from 0 to 15 can be paid by choosing which coins to hand over. Binary is just a list of which coins you used.

Explain it another way: technical

A base-b positional number dₙ…d₁d₀ has value Σ dᵢ × bⁱ. In base 2 each digit dᵢ ∈ {0, 1}, so the value is the sum of the powers of two whose bits are set.

Explain it another way: mathematical

1101₂ = 1×8 + 1×4 + 0×2 + 1×1 = 13. 100000₂ = 32. The largest n-bit number is 2ⁿ − 1: for 4 bits, 1111₂ = 8 + 4 + 2 + 1 = 15.

Explain it another way: applied

Programmers working close to the hardware read registers in binary: each bit might mean 'motor on', 'LED on' or 'button pressed', and the whole register is also just a number.

Try these examples

Example 1

Read the binary number 10110.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. What number is the binary pattern 1010 in ordinary (decimal) counting?

Answer:

2. What comes next after 0111 in 4-bit binary?

  • 0112
  • 1000
  • 1111
  • 0110

3. In binary, what is the place value of the 5th bit from the right?

Answer:

4. When counting up in binary, which bit changes every time?

  • The leftmost bit
  • The rightmost bit
  • The middle bit
  • They all change every time

Apply it

Count in binary on one hand: each finger is a bit (thumb = 1, index = 2, middle = 4, ring = 8, little = 16). What is the biggest number you can show? Show your age in binary.

Reflect

What feels the same and what feels different about counting in binary compared with decimal?

Converting: binary to decimal and back

A robot's register shows 1001 1100. Is the motor speed high or low? First you need to translate.

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Engineers constantly translate between how humans write numbers and how machines store them, when setting registers, reading sensor data or debugging. A quick, reliable method beats guessing.

Goals

Predict

What is 13 in binary?

  1. 1011
  2. 1101
  3. 1110

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Open the Virtual Computer Build, Level 1. Show 13, 6 and 9 on the 4-bit register, then read 1010 and 0111 back into numbers. Before each one, say your answer, then check it on the lamps.

What the interactive shows, in words

The Virtual Computer Build's Level 1 shows a 4-bit register as four lamps labelled 8, 4, 2 and 1. Turning lamps on shows a number: 13 is 8, 4 and 1 on (1101); 6 is 4 and 2 (0110); 9 is 8 and 1 (1001). Reading 1010 gives 10 and 0111 gives 7.

Understand

Binary → decimal: add the places

Write the place values above the bits, then add the place values that sit over a 1. For 1001 1100: places 128, 64, 32, 16, 8, 4, 2, 1. The 1s are under 128, 16, 8 and 4. Total: 128 + 16 + 8 + 4 = 156.

Decimal → binary: biggest place that fits
  1. Find the biggest place value that fits into your number. Put a 1 there.
  2. Subtract it.
  3. Repeat with what's left. Any place you skip gets a 0.

22: 16 fits (22 − 16 = 6). 8 doesn't (0). 4 fits (6 − 4 = 2). 2 fits (2 − 2 = 0). 1: 0. So 22 = 10110.

Always check by going back

Convert your answer back: 10110 → 16 + 4 + 2 = 22. ✔ It takes seconds and catches most mistakes. Engineers call this a round-trip check.

Explain it another way: intuitive

Decimal → binary is like paying an amount with coins of 16, 8, 4, 2 and 1, always using the biggest coin you can first. The binary number is a list of which coins you used.

Explain it another way: technical

Another method is repeated division by 2: the remainders, read from last to first, are the bits. 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1 → 1101.

Explain it another way: mathematical

Every whole number has exactly one binary form, because each place value is bigger than all the smaller ones added together (8 > 4 + 2 + 1). So the 'biggest first' method never gets stuck.

Explain it another way: applied

In the Virtual Computer Build, numbers in memory are shown as lamps. Translating them is the first skill you need to follow a program as it runs.

Try these examples

Example 1

Convert 37 to binary.

The worked solution is in the online lesson.

Example 2

Convert 0110 1001 to decimal.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. What number is the binary pattern 1010 in ordinary (decimal) counting?

Answer:

2. Write 7 in binary. Type just the 0s and 1s with no leading zeros (for example, six is 110).

Answer:

3. Convert the 8-bit binary number 10011100 to decimal.

Answer:

4. Which is 9 in binary?

  • 1001
  • 1010
  • 0111
  • 1100

5. A classmate says 20 is 10010 in binary. What does a round-trip check show?

  • Correct
  • Wrong: 10010 is 18
  • Wrong: 10010 is 20 but should have 6 digits
  • Wrong: binary can't show 20

Apply it

Write your birthday (day and month) as binary numbers. Then encode a 3-digit secret number for a friend in binary and ask them to decode it and check by converting back.

Reflect

Which direction of conversion do you find easier, and what trick helps you with the harder one?

Running out of bits: overflow

In 2014 a video got so many views that YouTube's view counter nearly ran out of room. How can a computer run out of numbers?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Machines store numbers in a fixed number of bits. Pick too few and a counter quietly wraps back to zero, which has caused real failures in games, rockets and clocks. Engineers must size their numbers on purpose.

Goals

Predict

A 4-bit counter shows 1111. You add 1. What does it show?

  1. 10000
  2. 0000
  3. 1111 (it stays stuck)

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set the 4-bit register to all on (15) and press 'Add 1'. Read the message. Switch to 8 bits, press 'All on', note the number, and add 1 again. Can you predict the biggest number for 5, 6 and 7 bits?

What the interactive shows, in words

In the binary switches diagram, pressing 'All on' with 4 bits shows 1111 = 15. Pressing 'Add 1' then shows 0000 and the message explains that 16 needs 5 bits, so the carry falls off the top. With 8 bits, all on is 255, and adding 1 also wraps to 0.

Understand

The biggest number

With every bit on, n bits hold 2ⁿ − 1. 4 bits: 1111 = 15. 8 bits: 11111111 = 255. The '− 1' is because one of the 2ⁿ patterns is used for 0.

Overflow: wrapping round

Add 1 to the biggest number and every bit carries, but the final carry has nowhere to go. The counter shows all zeros. It's like a car's old mileage counter rolling from 99999 to 00000. The machine doesn't complain: it just shows a wrong answer, which is what makes overflow dangerous.

Choosing enough bits

Engineers ask: what's the biggest value this number could ever reach? Then they pick enough bits, plus a safety margin. A step counter for a day might reach 50,000 steps: 16 bits (up to 65,535) is enough. A counter of all views on a video needs far more. In 2014 YouTube's view counter, a 32-bit number that tops out at 2,147,483,647, was upgraded to 64 bits as one video got close to that limit.

Explain it another way: intuitive

A 4-bit counter is like a tiny clock face with only 16 hours. After hour 15 comes hour 0 again.

Explain it another way: technical

Unsigned n-bit arithmetic is arithmetic modulo 2ⁿ: the result is kept as (a + b) mod 2ⁿ, and the carry out of the top bit signals overflow. Signed counters lose one bit to the sign, so 32-bit signed tops out at 2³¹ − 1 = 2,147,483,647.

Explain it another way: mathematical

Max(n) = 2ⁿ − 1: Max(8) = 255, Max(10) = 1,023, Max(16) = 65,535. Bits needed for N: the smallest n with 2ⁿ − 1 ≥ N. For N = 1,000: 2¹⁰ − 1 = 1,023, so 10 bits.

Explain it another way: applied

In the Virtual Computer Build, the 4-bit processor uses overflow on purpose: adding 1111 to a number is the same as subtracting 1, because the carry falls off the top.

Try these examples

Example 1

A parking-garage counter must count up to 600 cars. How many bits does it need?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A counter in a machine has 7 bits. Starting from 0, what is the biggest number it can show before it overflows?

Answer:

2. An 8-bit counter holds 255 and you add 3. What does it show? (It wraps round after 255.)

Answer:

3. What is the smallest number of bits a counter needs to reach 1,000?

Answer: bits

4. Why is overflow dangerous in a machine?

  • It makes the machine explode
  • The machine quietly shows a wrong, too-small number
  • It uses up the battery
  • It deletes all the bits

Apply it

Design the counters for a smart bin that counts how many times it is opened per day and per year. Estimate the biggest values, choose the bits for each, and explain your safety margin.

Reflect

Overflow is silent. What could an engineer add to a machine so it notices when a counter is about to overflow?

Week 16: Basic logic gates

This week you will

AND, OR, NOT: the three little deciders

A factory press only slams down if the worker has BOTH hands on the buttons. How does a machine check 'both'?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every decision inside a computer, from 'is the door shut?' to 'should the airbag fire?', is built from tiny logic gates. Three of them, AND, OR and NOT, are enough to build any decision at all.

Goals

Predict

A doorbell has a front button and a back button. Either one should ring it. Which rule is that?

  1. Ring if front AND back are pressed
  2. Ring if front OR back is pressed
  3. Ring if NOT front is pressed

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Pick AND. Before flipping anything, predict the output for all four input combinations. Then check them. Do the same for OR and NOT. Which gate gives 1 most often?

What the interactive shows, in words

The logic gate diagram lets you choose AND, OR, NOT, NAND, NOR or XOR, flip inputs A and B between 0 and 1, and see the output lamp. A truth table lists every input combination with its output and highlights the current row. AND gives 1 only for 1,1; OR gives 0 only for 0,0; NOT flips its one input.

Understand

Inputs and outputs are bits

A logic gate takes one or two inputs, each 0 (off, false, no) or 1 (on, true, yes), and produces one output by following a fixed rule. In real circuits, 0 and 1 are low and high voltages; inside a lab simulation they are just numbers.

The three basic gates
Plus three useful extras

Amazingly, NAND on its own can be wired up to make every other gate.

Explain it another way: intuitive

AND is a strict parent: 'You can go out if your homework is done AND your room is tidy.' OR is a relaxed parent: 'You can go out if your homework is done OR your room is tidy.' NOT is a contrarian who always says the opposite.

Explain it another way: technical

Boolean algebra writes AND as A·B, OR as A + B and NOT as Ā (or ¬A). Gates are built from transistors acting as switches: two in series behave like AND, two in parallel like OR.

Explain it another way: applied

A car's interior light uses OR (any door open → light on). A microwave uses AND (door shut AND start pressed → heat). A smoke alarm's test button and its sensor are combined with OR.

Try these examples

Example 1

A safe opens only if the right code is entered AND the key is turned. The code is right (1) but the key isn't turned (0). Does it open?

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A NAND gate gets A = 0 and B = 1. What is its output (0 or 1)?

Answer:

2. A microwave heats only if the door is shut and you pressed start. Which gate?

  • OR
  • AND
  • NOT
  • XOR

3. A NOT gate's input is 1. What is its output?

  • 1
  • 0
  • It depends on the other input
  • 2

4. Of the four input combinations (00, 01, 10, 11), how many make an OR gate output 1?

Answer:

5. A NOR gate gets A = 0 and B = 0. What is its output (0 or 1)?

Answer:

Apply it

Find three rules in machines around you and write each as a gate, e.g. 'car alarm sounds if a door opens OR the glass breaks'. Then invent one rule that needs NOT.

Reflect

Which gate do you think a safety system uses most often, and why?

Truth tables: checking every possibility

A machine with three sensors has eight possible situations. How do you make sure it does the right thing in every single one?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

A truth table is a machine's complete promise: for every possible input, here is the output. Engineers write them before building, and test against them afterwards, so that no situation is forgotten.

Goals

Predict

How many rows does a truth table need for a circuit with 3 inputs?

  1. 3
  2. 6
  3. 8

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Open the digital logic lab. Build A AND (NOT B): put a NOT on input B and feed it into an AND with A. Fill in your truth table on paper first, then let the lab check every row. Which single row gives a 1?

What the interactive shows, in words

The digital logic lab lets you place gates, wire inputs to them and see a live truth table. For A AND (NOT B), the rows 00, 01, 10 and 11 give outputs 0, 0, 1 and 0: only A = 1 with B = 0 gives a 1.

Understand

List every input combination

Write the inputs as columns and count up in binary down the rows: for two inputs, 00, 01, 10, 11. Counting in binary guarantees you never miss or repeat a combination. Three inputs: 000 to 111, eight rows.

Work out the middle, then the output

For a combination like A AND (NOT B), add a helper column for NOT B first, then combine it with A. Doing one gate at a time, column by column, avoids mistakes.

| A | B | NOT B | A AND NOT B | |---|---|---|---| | 0 | 0 | 1 | 0 | | 0 | 1 | 0 | 0 | | 1 | 0 | 1 | 1 | | 1 | 1 | 0 | 0 |

A table is a test

To check a circuit, set the inputs for every row and compare its output with your table. If even one row disagrees, the circuit is wrong. This is exactly how the Tactiverge labs and Builds check your circuits: row by row, every row.

Explain it another way: intuitive

A truth table is like a checklist for a robot butler: for every possible situation (raining or not, guests or not), it says exactly what to do. No situation is left to guesswork.

Explain it another way: technical

A truth table fully specifies a combinational function of n inputs with 2ⁿ rows. Two circuits are equivalent if, and only if, their truth tables match on every row, which is how NAND-only versions of gates are proved correct.

Explain it another way: mathematical

NOT (A AND B) and (NOT A) OR (NOT B) have identical tables (1, 1, 1, 0), so they are equal. This is one of De Morgan's laws. With 4 inputs a table has 2⁴ = 16 rows; with 10 inputs, 1,024 rows.

Explain it another way: applied

Before writing code for a machine's safety logic, engineers often write the full truth table with the client. Rows the client never thought about (such as 'both sensors broken') come to light early.

Try these examples

Example 1

Fill in the truth table for (NOT A) OR B and count the 1s.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Fill in the 4-row truth table for A XOR B (rows AB = 00, 01, 10, 11). How many rows give an output of 1?

Answer:

2. Fill in the 4-row truth table for (NOT A) OR B (rows AB = 00, 01, 10, 11). How many rows give an output of 1?

Answer:

3. How many rows does a full truth table need for 4 inputs?

Answer: rows

4. A mystery gate's truth table output column (rows 00, 01, 10, 11) is 0, 1, 1, 0. Which gate is it?

  • AND
  • OR
  • XOR
  • NAND

5. Why do engineers list truth table rows by counting in binary (00, 01, 10, 11)?

  • It looks nice
  • It guarantees every combination appears exactly once
  • Computers can't read other orders
  • It makes the outputs come out as 1

Apply it

Write the full 8-row truth table for a 'majority vote' circuit with inputs A, B and C: output 1 if at least two inputs are 1. How many rows give 1? (You'll meet this circuit again in the Sorting Machine Build.)

Reflect

Why might a 20-input machine be hard to test with a truth table? (Hint: how many rows?)

Gates at work: safety interlocks and sorting rules

A sorting machine has three sensors and four bins. How can a few gates decide where every part goes?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Real machines combine many conditions: a press must see two hands AND a closed guard; a sorter must check colour, size AND metal. Turning a client's words into exact logic is one of the most important (and most error-prone) jobs in engineering.

Goals

Safety: Interlocks in real machines are designed and certified by qualified engineers. Never bypass a guard or interlock on a real machine.

Predict

A guillotine paper cutter should only cut if the guard is down AND both hand buttons are pressed. How many conditions must be 1 at the same time?

  1. 1
  2. 2
  3. 3

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the Sorting Machine Build, Level 2, turn the client's four-line brief into an 8-row rule table. Start with the easy rows: any part with metal (M = 1). Then do the others. Watch the belt run your table.

What the interactive shows, in words

The Sorting Machine Build's Level 2 shows an 8-row table: every combination of red (R), large (L) and metal (M). For each row you choose a bin. The correct table puts every row with M = 1 in Metal, rows with M = 0 and L = 1 in Reject, R = 1, L = 0, M = 0 in Red plastic, and the all-zero row in Mixed plastic.

Understand

Chaining gates

Gates can feed other gates. (A AND B) AND C is 1 only when all three are 1. (A OR B) AND NOT C means 'A or B, but never when C'. Work from the inside out, like brackets in maths.

From words to logic

A brief like 'metal goes in the metal bin; otherwise large parts are rejected; otherwise red parts go to red plastic; everything else to mixed' becomes rules with three bits: R (red), L (large), M (metal). Order matters: the first rule that matches wins. Words like 'otherwise', 'unless' and 'only if' hide NOT and AND, so read them carefully.

Interlocks and fail-safe

An interlock is an AND that stops a machine unless every safety condition is true: door shut AND guard down AND hands clear. Good designs are also fail-safe: if a wire breaks, the signal drops to 0 and the AND output goes to 0, so the machine stops instead of starting.

Explain it another way: intuitive

An interlock is like a bank vault that needs two managers turning two keys at once. One key alone does nothing.

Explain it another way: technical

Priority rules ('first match wins') become logic by adding NOT terms: Metal = M; Reject = L AND NOT M; Red = R AND NOT L AND NOT M; Mixed = NOT R AND NOT L AND NOT M. Exactly one output is 1 for each input row.

Explain it another way: applied

Lifts use interlocks so the motor can't move while any door is open; washing machines lock the door AND check the water level before spinning. Engineers prove these rules with complete truth tables.

Try these examples

Example 1

Using the sorter's rules, where does a large, red, non-metal part go? (R = 1, L = 1, M = 0)

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Using the sorter's rules (metal first, then large → reject, then red → red plastic, else mixed), where does a small, red, metal part go?

  • Red plastic
  • Metal
  • Reject
  • Mixed

2. A press needs: guard down AND left button AND right button AND foot pedal. Of all 16 possible combinations of these four signals, how many let it run?

Answer:

3. A safety interlock uses '1 = guard closed'. The guard sensor's wire snaps, so its signal becomes 0. What happens?

  • The machine runs anyway
  • The AND output becomes 0, so the machine stops
  • The machine speeds up
  • Nothing changes

4. Fill in the 4-row truth table for A AND B (rows AB = 00, 01, 10, 11). How many rows give an output of 1?

Answer:

Apply it

Write the logic for a garage door that closes only if the close button is pressed AND nothing is in the doorway AND the door is NOT already shut. Draw it with gates and give its truth table (8 rows).

Reflect

Why should a safety system stop when a wire breaks, instead of carrying on?

Week 17: Decision-making systems

This week you will

IF this, THEN that: how machines decide

A smart fan switches itself on when you walk into a hot room. Who told it what to do?

About 25 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Every automatic machine follows rules a person wrote: thermostats, automatic doors, robot vacuums. Writing those rules clearly, and noticing the situations they miss, is the heart of designing smart machines.

Goals

Predict

A fan's rule is: IF someone is in the room AND it's hotter than 26 °C THEN fan on. The room is 30 °C and empty. What happens?

  1. Fan on
  2. Fan off
  3. The fan can't decide

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Set someone in the room, 28 °C, window shut. Step through the flowchart and see where it ends. Then change one thing at a time. Can you make the fan finish on OFF in two different ways?

What the interactive shows, in words

The decision runner shows a smart fan's flowchart as a list of steps: read the sensors; is someone in the room?; is it hotter than the limit?; is the window open?; then fan OFF, LOW or HIGH. You set the inputs, step through one question at a time, and each answer (yes or no) chooses the next step.

Understand

Sense, think, act

Smart machines repeat three steps: sense (read sensors: temperature, motion, light), think (apply rules to decide), act (switch motors, lights, heaters). Then they do it again, many times a second. The 'think' part is where your rules live.

IF … THEN … ELSE

A decision rule has a condition and actions:

IF temperature > 26 THEN fan on ELSE fan off.

The condition is always true or false: a single bit, just like a logic gate's output. Conditions can be combined: IF (someone home) AND (temperature > 26).

Careful with the edges

'Hotter than 26' and '26 or hotter' differ by just one value, but at exactly 26 °C they give different answers. Engineers check these edge cases on purpose. They also add a little gap (on above 26, off below 25) so the fan doesn't flick on and off when the room sits at 26.0.

Explain it another way: intuitive

Rules are like the instructions you'd leave for a babysitter: 'IF they're hungry, THEN make a sandwich, ELSE let them play.' A machine follows them exactly, with no common sense to fill gaps.

Explain it another way: technical

A conditional evaluates a Boolean expression and selects a branch. In code: if (present && temp > limit) { fan = ON } else { fan = OFF }. Inside a loop, this becomes a simple controller: sense, evaluate, actuate, repeat.

Explain it another way: applied

Automatic doors: IF motion detected OR door button pressed THEN open; IF nothing detected for 5 seconds AND doorway clear THEN close. The 'doorway clear' check is a safety condition that was added after people got bumped.

Try these examples

Example 1

Write a rule for a night light that turns on when it's dark, but only if someone is in the room.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A smart fan follows this rule: IF someone is home AND the temperature is above 26 °C, THEN fan on (1), ELSE fan off (0). Someone is home and it is 23 °C. What does the fan do (1 or 0)?

Answer:

2. In a robot vacuum, 'the bumper switch is pressed' belongs to which step?

  • Sense
  • Think
  • Act
  • None of them

3. Rule: IF temperature > 25 THEN heater off ELSE heater on. It is exactly 25 °C. What does the heater do?

  • Off
  • On
  • Half power
  • Nothing: the rule breaks

4. A car's warning beep should sound if the driver's seatbelt is undone OR a door is open. Which situation gives NO beep?

  • Belt undone, doors shut
  • Belt done up, a door open
  • Belt done up, doors shut
  • Belt undone, a door open

Apply it

Write IF/THEN/ELSE rules for an automatic pet door that should open for your pet's tag, never for other animals, and stay shut at night. Test your rules on four situations, including one tricky one.

Reflect

Think of a time a machine did something 'stupid'. What rule might it have been following?

Flowcharts: drawing a decision

Engineers often draw a machine's 'brain' before writing a single line of code. What does that drawing look like?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

A flowchart lets a whole team (engineers, clients, testers) see a machine's decisions at a glance and spot missing cases before anything is built. It's the bridge between a client's words and working code.

Goals

Predict

The smart fan's flowchart asks up to three yes/no questions and can end in OFF, LOW or HIGH. How many different paths are there from start to finish?

  1. 3
  2. 4
  3. 8

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Your job is tester. Choose inputs that send the fan down all four paths, ticking each off in the test log. What is the fewest number of runs that can test every path?

What the interactive shows, in words

The decision runner lists the fan's flowchart steps and a test log of its four paths: nobody home → OFF; cool enough → OFF; hot, window open → LOW; hot, window shut → HIGH. Each run through the flowchart ticks off the path it took, so you can see which paths still need testing.

Understand

Three shapes

Arrows show the order. Follow them with your finger and you're running the machine's program by hand.

Paths, not just outcomes

Each decision splits the path in two. A path is one complete route from start to end. Different paths can reach the same outcome (two ways to get OFF), and a good test plan tries every path, not just every outcome, because a mistake can hide on a path you never walked.

Loops: going round again

A real controller doesn't stop at 'end'. An arrow goes back to 'read the sensors', so the machine checks again and again. That's a loop. In the next lesson, you'll see machines that also remember where they are in a sequence.

Explain it another way: intuitive

A flowchart is like a 'choose your own adventure' book: each diamond is a page that says 'if yes, turn to page 12; if no, turn to page 20.'

Explain it another way: technical

A flowchart is a directed graph of process and decision nodes. A test suite with path coverage exercises every route from entry to exit. Here, each decision only appears on some paths, so 4 tests cover all paths rather than 2³ = 8.

Explain it another way: applied

Medical devices, lifts and traffic lights are designed with flowcharts or state diagrams, and testers write one test case per path, often hundreds of them.

Try these examples

Example 1

Design inputs that test each fan path once.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Which flowchart shape holds a yes/no question?

  • Rectangle
  • Diamond
  • Rounded box
  • Arrow

2. A flowchart asks two yes/no questions one after the other, and every answer leads on to the next question (no early exits). How many paths are there?

Answer: paths

3. A flowchart asks Q1. If 'no', it ends. If 'yes', it asks Q2, which ends either way. How many paths are there?

Answer: paths

4. A tester ran the fan three times and got OFF, LOW and HIGH. Have they tested every path?

  • Yes: they saw every outcome
  • No: there are two different paths to OFF, so one is untested
  • Yes: three runs are always enough
  • No: they need eight runs

5. A smart fan follows this rule: IF someone is home AND the temperature is above 28 °C, THEN fan on (1), ELSE fan off (0). Someone is home and it is 28 °C. What does the fan do (1 or 0)?

Answer:

Apply it

Draw a flowchart for an automatic school-bag checker: is it a school day? Is it PE day (then check for kit)? Is it raining (then check for a coat)? Count its paths and write one test for each.

Reflect

What's one advantage of drawing a flowchart before writing code, and one thing a flowchart can't show you?

Machines that remember: states and sequences

A traffic light is green. What colour comes next? The light itself has to remember where it is in the cycle. How?

About 30 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

Many machines can't decide from the sensors alone: a washing machine must know whether it's washing or spinning; a traffic light must know whether it was just green. A state machine is the simple, powerful idea engineers use to give machines that memory.

Goals

Predict

A traffic light shows amber. In the UK it could be heading towards red or towards green. What does the controller need to decide correctly?

  1. A brighter bulb
  2. To remember which state it was in before
  3. A faster clock

Write down your guess and your reason. The reveal is in the online lesson.

Discover

In the Traffic System Build, Level 1, judge each moment at the crossroads as safe or a conflict. Then say what each light must show next. Which moments are unsafe, and what rule would stop them?

What the interactive shows, in words

The Traffic System Build's Level 1 shows six moments at a crossroads with traffic lights and a pedestrian crossing. Moments where two conflicting movements both have a go signal (for example, north–south amber while east–west is green, or walk while north–south is green) are conflicts. You also choose what the lights should show next at three points in the cycle.

Understand

A state is 'where I am'

A state is the machine's current situation: green, amber, red; or filling, washing, spinning. The machine is always in exactly one state, and it remembers it until something makes it move on.

Transitions: the rules for moving on

A transition is a rule like: 'in GREEN, after 30 seconds, go to AMBER'. Transitions can be triggered by time, by a sensor ('button pressed') or both. Draw states as circles and transitions as labelled arrows, and you have a state diagram.

Designing out danger

Some combinations must never happen: north–south green while east–west is green is a crash. Engineers list these unsafe states and design the transitions so they can't be reached, adding an all-red pause between greens for safety. A state machine is easy to check because it has a short, complete list of states.

Explain it another way: intuitive

A board game piece on a track is a state machine: where you are is your state; the dice and the squares' rules decide your transition. You need to remember your square, or you can't take your next turn.

Explain it another way: technical

A finite state machine has a finite set of states, an initial state, inputs and a transition function: next state = f(current state, input). Storing the current state needs memory: with 8 states, 3 bits.

Explain it another way: applied

Lifts, vending machines, washing machines, game characters and robot behaviours (search → approach → grab → return) are all built as state machines. Safety engineers audit every transition.

Try these examples

Example 1

A simple pedestrian crossing has states: CARS GO, CARS STOP (amber), WALK, FLASHING. Write the transitions.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Which of these is a STATE of a washing machine?

  • Pressing the start button
  • Spinning
  • The drum
  • Water

2. A robot has 6 behaviour states. What is the fewest number of bits needed to remember which state it is in?

Answer: bits

3. At a crossroads, which state must never be reachable?

  • North–south red, east–west green
  • All red
  • North–south green, east–west green
  • North–south amber, east–west red

4. A light cycle is: green 30 s, amber 3 s, all red 2 s, other road green 20 s, amber 3 s, all red 2 s, then repeat. How long is one full cycle, in seconds?

Answer: s

Apply it

Draw a state diagram for a microwave: IDLE, COOKING, PAUSED (door opened), DONE. Label every transition with what triggers it. Which transition is a safety rule?

Reflect

Name a machine you use that must remember something to work properly. What is it remembering?

Week 18: Design a simulated everyday machine

This week you will

Plan your machine: from problem to design

You have two weeks and no workshop. Can you still design a machine that solves a real everyday problem?

About 40 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

This is where the whole term comes together: mechanisms that move, ratios that size them, coordinates that place them, bits that store information and logic that decides. Real engineers start every project the same way you're about to: with a problem, not a solution.

Goals

Safety: Your machine is designed in simulation or as a conceptual model. Don't build anything with mains power, sharp blades, heat or water near electricity. Any physical model needs an adult's safety review.

Predict

What should come first in an engineering design?

  1. Choosing the coolest motor
  2. Writing down the problem and what 'solved' means
  3. Building it and seeing what happens

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Use the Sorting Machine as a model of a complete machine. Map its parts: which are sensors, which make decisions, which act? Write down its objective in one sentence. You'll do the same for your own machine.

What the interactive shows, in words

The Sorting Machine Build's Level 1 shows a conveyor with three sensors (a colour sensor measuring redness, a light gate measuring length, a metal detector) and a diverter flap that steers each part into one of four bins. You match each part to its job and sort six example parts by hand using thresholds.

Understand

1. Problem and objective

Pick an everyday problem you have actually noticed: plants forgotten during holidays, a pet fed at the wrong times, a messy desk drawer, a door left open in winter. Write one sentence: 'My machine will … so that …'. Then list 3–5 requirements: things it must do (e.g. 'water the plant once a day', 'never overflow the pot').

2. Mechanism

Decide what has to move and how: rotary, linear, reciprocating or oscillating? Choose components from the toolbox (lever, gears, pulley, belt, cam, rack and pinion). Use a ratio to size at least one: for example, a 10 : 40 gear pair to turn a fast motor into a slow, strong turn.

3. Sense, think, act

List your sensors and what each measures, with a threshold that turns it into a bit. Write the decision rules (IF/THEN or gates), and if your machine works in steps, its states. Then draw it all: a labelled sketch with coordinates for where key parts sit, and a flowchart.

Constraints and trade-offs

Every design has limits: cost, size, power, safety, noise. Choose your top two and say how they shaped your design: 'I used a belt instead of gears because the motor had to sit 30 cm away and be quiet.' Trade-offs explained with reasons are a sign of good engineering.

Explain it another way: intuitive

Designing is like planning a trip: first decide where you're going (objective), then what you must bring (requirements), then the route (mechanism and rules). You don't pack before you know the destination.

Explain it another way: technical

The engineering design cycle: define → research → generate concepts → select → model or prototype → test → improve. Requirements should be testable: 'water within 1 hour of 8 am' can be checked; 'water nicely' can't.

Explain it another way: applied

Professional engineers write a short design brief before every project, often one page, and every later decision is checked against it. In this course, your 'prototype' is a simulation or a clear conceptual model, never a hazardous build.

Try these examples

Example 1

Write an objective and three testable requirements for a holiday plant waterer.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. Which requirement is testable?

  • The machine should be nice
  • The fan turns on within 5 seconds of someone entering a room above 26 °C
  • The machine should work well
  • It should be modern

2. Your machine must slide a drawer open and closed using a spinning motor. Which mechanism fits best?

  • A single fixed pulley
  • A rack and pinion
  • An idler gear
  • A spring alone

3. Your motor spins at 120 turns per minute but the feeder wheel should turn at 6. What gear ratio (driven ÷ driver) do you need?

Answer:

4. Your machine has 5 operating states. What is the fewest number of bits to store its state?

Answer: bits

Apply it

Start your term project: write your machine's objective, 3–5 testable requirements, your top two constraints, and a first labelled sketch showing the mechanism, sensors and where each part sits (with coordinates).

Reflect

What everyday problem did you choose, and why does it matter to you or someone you know?

Test it, improve it, present it

Your machine works perfectly in your head. How do you prove it works in every situation, and convince someone else?

About 40 min · Checked by automated tests · Interactive lesson · Lite lesson (answers checked here)

Why it matters

A design isn't finished when it's drawn; it's finished when it's tested and explained. Engineers who test every path, admit what failed, and improve because of it build machines people can trust.

Goals

Safety: Keep your machine simulated or conceptual. If you make a physical model, an adult must review it first; no mains power, blades, heat or water near electricity.

Predict

Your smart fan design has 4 paths through its flowchart. What's the minimum number of test runs to try every path?

  1. 1
  2. 3
  3. 4

Write down your guess and your reason. The reveal is in the online lesson.

Discover

Treat the smart fan as a client's design. Test all four paths, then change the rule's temperature and test the edge (temperature exactly equal to the rule). Write down one improvement you would suggest, with the test that convinced you.

What the interactive shows, in words

The decision runner lets you set a smart fan's inputs, step through its flowchart and tick off each of its four paths in a test log. Changing the rule's temperature limit and testing a room temperature exactly equal to it shows the edge case: 'hotter than 26' is false at 26, so the fan stays off.

Understand

Plan the tests

Make a table: test number, inputs, expected result, actual result, pass/fail. Include:

Test honestly, then improve

Run each test in your simulation or walk it through on paper, and record what actually happens, even when it fails. A failed test is useful: it tells you what to fix. Make at least one improvement, then re-run the tests to check you fixed it without breaking something else.

Present like an engineer

A short presentation (or poster) covers: the problem and objective → how it works (sketch, mechanism, ratio) → how it decides (flowchart or truth table) → test evidence → the improvement and why → what you'd do next. Use your diagrams. Say clearly what is simulated or assumed (no friction, perfect sensors) and what you'd need to check in real life.

Explain it another way: intuitive

Testing is like checking every door in a house before you leave, not just the front one. The back door you forgot is the one that matters.

Explain it another way: technical

Path coverage plus boundary-value testing catches most logic errors in small controllers. A fault-injection test (forcing a sensor to a fixed value) checks fail-safe behaviour. Regression testing re-runs earlier tests after every change.

Explain it another way: applied

Before a lift, car or medical device is approved, engineers present test evidence to independent reviewers. Being clear about assumptions and limits is part of the job, not an admission of weakness.

Try these examples

Example 1

Write edge-case tests for 'IF moisture < 30 THEN water'.

The worked solution is in the online lesson.

Common mix-ups

Practice questions

Questions only. Check your answers in the Lite lesson; they are graded on our server and nothing is saved.

1. A rule says IF distance < 10 cm THEN stop. Which set of distances is the best edge-case test?

  • 50, 60, 70
  • 9, 10, 11
  • 0, 100
  • 10, 10, 10

2. A plant waterer's moisture sensor gets stuck reading 0 (bone dry). Which design change makes the machine safest?

  • A brighter display
  • A daily maximum on how much water it can add
  • A faster pump
  • Removing the sensor

3. You changed a threshold to fix a failed test. What should you do next?

  • Nothing: it's fixed
  • Re-run all your tests
  • Only re-run the test that failed
  • Delete the failed result

4. Your flowchart has 5 paths and 2 thresholds. You test every path once plus 3 edge values per threshold. How many tests is that?

Answer: tests

5. Your simulated machine assumes no friction. What should your presentation say?

  • Nothing: friction is boring
  • State the assumption and what might change in real life
  • Claim it would work exactly the same in real life
  • Add made-up real-world results

Apply it

Finish your term project: write and run your test plan (every path, every edge, one broken-sensor case), make one improvement and re-test, then prepare a 3-minute presentation or one-page poster using your sketch, flowchart and test table.

Reflect

Which test surprised you most, and what did it teach you about your design?