No phone? Tell a mentor and we'll sign you in.
From a switch to a robot
Each section adds one rung. By the end, you'll know what really happens when you press Deploy.
Keyboard, mouse, touchscreen
Robot: joysticks, sensors
The CPU follows instructions and makes decisions
Screen, speakers
Robot: motors, lights
Does the work, one step at a time, billions of steps per second.
Holds what you're working on right now. Fast, but small.
Keeps everything, even when the power is off.
Orders come in, finished dishes go out.
Your thumb taps the 12 finger segments on one hand. Each time you reach 12, raise one finger on the other hand. 12 × 5 = 60. (A popular theory for why they picked 60.)
Fingers and toes. Twenty was their "ten."
In French, 80 is quatre-vingts, a leftover from counting in twenties.
12 eggs, 12 months, 12 hours on a clock face, 12 inches in a foot.
| Zibbit writes | It means |
|---|---|
| 0 | zero |
| 1 | one (out of fingers!) |
| 10 | two (start a new column) |
| 11 | three |
| 100 | four |
A switch has only two states, so computers count in base 2: binary.
"There are 10 kinds of people: those who understand binary and those who don't."
Same idea as decimal. Only two digits: 0 and 1.
Click any bulb to flip it. Notice the rightmost bulb flips every time, like an odometer.
One hand counts to 31. Two hands reach 1,023.
So the Zibbit who was 1111 years old? 8 + 4 + 2 + 1 = 15.
Take the biggest place that fits, subtract, repeat.
Right to left, carry when you hit 10. Same as decimal, just sooner.
One switch: 0 or 1
256 combinations: 0 to 255. Enough for one letter or one number up to 255.
In Pac-Man, the level number was stored in one byte. A byte maxes out at 255.
A mostly self-taught English math teacher invents a math of just TRUE and FALSE. No computers exist. People think it's a curiosity.
A 21-year-old student at MIT realizes electrical switches can do Boole's logic. His master's thesis becomes the blueprint for digital computers.
Glass, hot, thumb-sized, burned out often. ENIAC needed about 18,000.
No glass, no heat-up, no moving parts. A modern chip has billions.enabled && triggerlimitSwitch || eStop!intakeFullSneak peek: that right column is real Java. You'll write it next time.
Turn both on: 1 + 1 = 10. This circuit does exactly what you just did on paper.
Nothing magic. Just switches, built into gates, built into bigger and bigger pieces.
| Round | A | B | AND carry | XOR sum | Answer |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 0 | 00 = 0 |
| 2 | 1 | 0 | 0 | 1 | 01 = 1 |
| 3 | 0 | 1 | 0 | 1 | 01 = 1 |
| 4 | 1 | 1 | 1 | 0 | 10 = 2 ✓ |
When you type a message, your phone is really sending numbers. Emoji don't fit in ASCII's 128 spots, so they come from Unicode, a much bigger table that starts with ASCII.
A picture is a grid of tiny squares called pixels.
Each pixel is three numbers: how much red, green and blue (0 to 255).
= AdamBots Gold. Hover over the picture to read any pixel.
Sound is measured thousands of times a second. Each dot is one number.
A limit switch is a single bit: pressed or not.
Smooth, any value in between. Like a ramp, a dimmer knob, or the hands on a clock.
Exact steps, stored as numbers. Like stairs, a light switch, or a digital clock. Copies perfectly, ignores noise.
Each group of 8 bits is one character. Convert to decimal with 128-64-32-16-8-4-2-1, then look it up. Each row is one word.
1. Open the bread bag. 2. Take out one slice. 3. Unscrew the jar lid. 4. Pick up the knife. 5. Scoop peanut butter…
if (pathClear()) { forward(); } else { turnLeft(); }
if (enabled && triggerHeld)repeat (3) { forward();}
while (pathClear()) { forward();}
SystemCore's processor ticks about 2,400,000,000 times a second (2.4 GHz). This demo does about one.
This is WPILib's standard robot loop. It ran at 20 ms on the roboRIO and still does on SystemCore. Teams can change it.
Loops shown since this slide opened (slowed way down): 0
Run the whole computer and let other programs share it.
Windows, macOS, iOS, Android, LinuxWhat you open and use.
Games, browsers, SpotifyHidden inside devices, doing one job.
Microwaves, cars, motor controllersRun on servers far away.
YouTube, Google Docs10110000 00000101 00000100 00000011
MOV AL, 5 ADD AL, 3
int total = 5 + 3;
Teammates can understand and fix your code.
The same code works on many kinds of computers.
The language catches many mistakes for you.
Like translating a whole book before anyone reads it. Fast to run. (Java, C++)
Like a live interpreter translating while you speak. Easy to try things. (Python)
iload_1 // get a iload_2 // get b iadd // add them istore_3 // save total
Like a spelling or grammar mistake.
The code runs, but does the wrong thing.
Computers are billions of switches.
Binary and gates turn switches into numbers and decisions.
Compilers turn our words into those switches.
Next time, you write your first program.
It comes with its own VS Code, set up for robot code. Don't download VS Code on its own.
…Windows-x64…iso…macOS-Arm64…dmg…macOS-Intel…dmgWhich Mac? Apple menu → About This Mac → Chip.
Installer screens: WPILib docs (docs.wpilib.org), CC BY 4.0. They show an earlier version; yours will say 2027. Click one to zoom.
Windows: right-click the .iso → Mount → open WPILibInstaller.exe. Mac: open the .dmg → WPILibInstaller.
1
2
3
43Done! Open the WPILib VS Code 2027 icon. That's the one we use next session.
| →SpacePgDnEnter | Next step or slide (also: click the right half of the screen, or a clicker) |
| ←PgUpBackspace | Back (also: click the left half, or right-click) |
| Home End | First slide / last slide |
| 12… then Enter | Jump to a slide number |
| T | Contents: jump to any slide (or the ☰ button, top-left) |
| N | Show or hide speaker notes |
| F | Fullscreen on / off |
| ? | This help |
| Esc | Close notes, contents, help or a photo |