How Computers "See" Numbers

When you look at a handwritten number, your brain instantly knows what it is. But a computer doesn't have eyes. It only sees a grid of tiny squares called pixels. To a computer, a picture is just a giant spreadsheet of numbers.

What we see
What the computer sees

Try drawing a shape on the left. Notice how the computer just translates 'white' to the number 1, and 'black' to 0?

Meet the "Neuron" (It's just a bucket!)

You might hear the phrase "Neural Network" and picture a biological brain. Don't panic! In a computer, a Neuron is incredibly simple. It is literally just a tiny bucket that holds a single number.

0.00
Dark (0) Bright (1)

This number is called its Activation. 0 means the neuron is completely off. 1 means it is fully lit up. That's it. That's a neuron.

The "Volume Knobs" (Weights)

A single neuron is pretty useless. The magic happens when we connect them. Imagine we want a computer to detect a pattern. We connect the input pixels to a new "detector" neuron using connections called Weights.

0.0
0.0
0.0
Weight: 1.0
Weight: 1.0
Weight: 1.0
0.00

Click the input pixels on the left to turn them ON. Now slide their weights. A weight is like a volume knob. Positive (green) means "If I'm on, you turn on!" Negative (red) means "If I'm on, you stay off!"

The Math (No, really, it's easy!)

Let's look under the hood. How does the output neuron decide its final number? It does a very simple piece of math: it multiplies the input by the weight, and adds them all up.

But wait... we want our final answer to fit neatly inside our bucket between 0 and 1. So, we pass that total score through a "Squish" filter. If it goes over 1, it squishes it to 1. If it drops below 0, it squishes it to 0.

1.0
0.0
1.0
Weight: 0.5
Weight: 1.2
Weight: -1.0
0.00

Change the inputs and sliders. Watch the numbers in the equation update in real-time!

The "Stubbornness" Factor (Bias)

Sometimes, a neuron is too eager to turn on. We need a way to tell it, "Don't turn on unless you are really sure." We do this by adding a Bias.

1.0
1.0
1.0
Weight: 1.0
Weight: 1.0
Weight: 1.0
0.00
Bias: -2.0

Slide the Bias into the negatives. Notice how much harder it is to get the output neuron to light up? The inputs have to work together to overcome that negative hurdle. Bias is just a neuron's stubbornness.

The Assembly Line

A real Neural Network is just thousands of these simple buckets and volume knobs stacked in layers. It works like an assembly line. The first layer looks for tiny edges. The next layer combines edges into shapes. The last layer combines shapes into numbers.

Layer 1 (Pixels)
Layer 2 (Shapes)
Top
Loop
Vertical
Line
Bottom
Loop
Layer 3 (Numbers)
1
8

And that is how a computer sees. It doesn't "understand" math or images. It just lets numbers flow through thousands of carefully tuned volume knobs until the correct bucket lights up at the end!