Analog and Digital

Smooth continuous wave beside a stepped digital line graph

Analog: something physical with continuous change.

Digital: made of numbers.

Arrow Barks!

Let's record him barking:

Dog barking into a microphone creating sound waves in the air

Arrow's bark is analog. It is actual pressure waves in the air, so it is physical with continuous change.

Continuous change: changes smoothly ... no sudden breaks.

And the microphone converts that pressure into an electrical signal. It is still analog (the electricity is physical, and has continuous change).

microphone goes to digital device

But when it gets to your computer or phone it gets converted to digits!

Smooth wave overlaid with vertical rectangular blocks showing sampled values

The analog signal is measured thousands of times a second by special electronics ... and is then saved as numbers.

So the "sound" is now "12, 25, 39, 52, 68, 71, 78, 82, 83, 79, 70, 59, ..." (in fact it would be in binary, so would be something like "000011000001100100100111...")

It is now digital!

Notice the digital data has sudden jumps up and down ... it does not change continuously.

It is Discrete Data: that means it can only be certain values (such as 1, 2, 3, and so on).

Digital data is very easy for computers and phones to use. It can be saved, shared electronically, sent all over the world quickly and more.

How Can We Hear Digits?

Easy! The numbers are used to control the size of an electrical signal, which is analog.

Digital becomes Analog

digital to analog speaker

The electricity can be sent to a speaker ...
... to make sound waves again!

It should sound very much like the original bark (but not perfectly so).

Quick Question: If digital sounds are made of separate numbers with sudden jumps, why does music from your device sound smooth?

Because the samples happen thousands of times every second (often 44,100 times a second) and your device blends them back into a smooth electrical curve for the speakers.

Digital Pictures

A similar thing happens when you take a picture.

Light (which is analog) gets projected onto a grid of millions of little sensors inside the camera:

Dog picture divided into a grid of colored square pixels
The camera measures the light at each point and produces numbers.

The picture is now digital!

So the "picture" is now "A1DDF9, ADE3FF, B5E7FE, AFE4F8, ...", which are hexadecimal color numbers, (that are used internally in binary, so would be something like "101000011101110111111001...")

Look really closely at a digital picture ... it is made up of millions of little squares called "pixels":

Close-up view of dog photo showing individual square color pixels
Each "pixel" is made using a hexadecimal color number.

Some Examples

Analog: changes smoothly and continuously.

Hourglass

Digital: uses numbers or steps.

Digital IS Numbers

So digital pictures, music, videos and so on are actually stored on your device as numbers.

Numbers rule!