Binary Counter — How Computers Count
Four LEDs, sixteen numbers — counting in twos
Logic
Binary
LED
Button
Counting
What you will learn
- Binary means only two symbols — ON and OFF, or 1 and 0 — and every number can be written with them
- Each bit is worth double the one before it: 1, 2, 4, 8, because each new bit carries into the next (2 + 2 + 2 = 8)
- With four bits you can show 2⁴ = 16 values, from 0 to 15. Eight bits (one byte) give 256
- Buttons are read with INPUT_PULLUP, so the Arduino pulls the pin high and a press pulls it LOW — no resistor needed
What you will need
| Component |
|---|
| 1× Arduino Uno R3 |
| 4× LED (green, blue, amber, red — one per bit) |
| 4× 220Ω resistor |
| 2× pushbutton (count up / count down) |
| Breadboard |
| 16× jumper wires |
Step by step
Take it further
- Add four more LEDs to make 8 bits, and count from 0 to 255 instead of 0 to 15.
- Make it a binary clock: count seconds, then minutes, then hours, and blink the bit for the highest number once a second.
- Count something real — every time a person walks past a sensor, go up by one, so the LED display is a live headcount.
- Add a third button that clears back to 0 instantly.
Practise it before you build it
Wire this circuit in the ThinkEdge Learn simulator first. The simulator runs a real Arduino sketch against a modified-nodal-analysis solver, so the LED on screen actually lights when the current is right — no hardware, no burnt components, and a class can try it in a browser.
Related projects
Arduino — Two-Player Reaction BattleTwo players, two buttons — fastest finger wins
Servo — Two Buttons, Two PositionsPress A → go to 0°. Press B → go to 180°.
Arduino Nano — Reaction Timer GameHow fast can you press the button? Built in a tiny form factor.
Arduino Nano — 4-Note Mini PianoFour buttons, four notes, one tiny piano that fits in your pocket
Arduino Mega — 10-LED Bar GraphLight up an LED "bar" that grows with the analog input
Morse Code TelegraphHow the first internet worked — one click at a time
Guides that use this project
One guide on the site build this project as part of a longer explanation. The guide says why the circuit works; this page says how to wire it.
Where this project sits
It is also part of these lists, which is how a class usually finds it.
Arduino LED projects for beginners36 projects in this list
Arduino push button projects for beginners14 projects in this list
Engineering projects for school students12 projects in this list
Try the full simulator with your class
103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. One licence covers a whole school.