Digital Electronics · Lesson 1 of 33 · Numbers a computer understands

Analog vs Digital

Why do computers use only 0 and 1?

Loading the video…

Key ideas

  • Analog = any value in a range
  • Changes smoothly
  • Temperature, sound, mic voltage
  • Digital = only fixed levels
  • Binary: LOW = 0, HIGH = 1
  • Near 0 V → read as 0
  • Near 1 V → read as 1
  • Middle zone is avoided
  • Every wire picks up noise
  • Analog: noise changes the value itself
  • 0.62 V or 0.65 V? Can't tell
  • A wobbly HIGH is still a 1
  • Only question: above or below the middle?
  • The message survives
  • Analog copies get worse each time
  • Digital copies are perfect

Worked example

  • Check the level once per clock tick
  • High → 1, Low → 0
  • Bits received: 1 0 1 1 0
  • = 22 in decimal
  • Conversion: next lesson
  • But the real world is analog, so devices convert. Your phone's microphone makes an analog voltage. A converter called an A D C turns it into numbers. To play it back, a D A C turns those numbers into a smooth voltage again, for the speaker.
✗ Common mistakeA common mistake is thinking digital is always more accurate. It's not. Digital rounds values to fixed steps. Its real advantage is that noise can't easily change it, and it copies perfectly.
💡 Memory trickHere's a memory trick. Analog is a ramp. Digital is a ladder. On a ramp, you can stand anywhere. On a ladder, you can only stand on the steps.
RecapAnalog can take any value, and changes smoothly. Digital uses fixed levels, and in binary, just zero and one. Digital wins because noise can't easily turn a zero into a one.
❓ Quick questionHow many different values can three binary digits represent?
The answer is in Lesson 2, coming soon.

Full lesson text

Read everything said in the video

Where you have seen itLook at the lights in your home. Some have a dimmer knob. Turn it slowly, and the brightness changes smoothly. Others have a simple switch. On, or off. Nothing in between.

Where you have seen itThat one difference, smooth versus steps, is this whole lesson. The dimmer is analog. The switch is digital.

The ideaAn analog signal can take any value in a range, and it changes smoothly. Temperature, sound, and the voltage from a microphone are all analog. Between any two values, there are infinitely many more.

The ideaA digital signal uses only a few fixed levels. In binary, which every computer uses, there are just two. Low, which we call zero. And high, which we call one.

The ideaIn a chip running on one volt, anything close to zero volts is read as zero, and anything close to one volt is read as one. The middle zone is avoided.

The ideaSo why not use analog, with all those values? Because of noise. Every wire picks up small random disturbances. In an analog signal, noise changes the value itself. Was it point six two volts, or point six five? You can't tell, and you can't undo it.

The ideaNow add the same noise to a digital signal. A slightly wobbly high is still clearly a one. The receiver asks only one question: above the middle, or below? The message survives.

The ideaThis is why digital wins. Make a photocopy of a photocopy, and it gets blurry every time. Copy a file a million times, and every copy is perfect.

Worked exampleLet's read a real digital signal. Here's a wire changing over time. Once every clock tick, we check the level. High, low, high, high, low.

Worked exampleSo the wire just sent the binary number one, zero, one, one, zero. That's twenty two in decimal, and in the next lesson you'll learn exactly how to convert it.

Worked exampleBut the real world is analog, so devices convert. Your phone's microphone makes an analog voltage. A converter called an A D C turns it into numbers. To play it back, a D A C turns those numbers into a smooth voltage again, for the speaker.

Common mistakeA common mistake is thinking digital is always more accurate. It's not. Digital rounds values to fixed steps. Its real advantage is that noise can't easily change it, and it copies perfectly.

Memory trickHere's a memory trick. Analog is a ramp. Digital is a ladder. On a ramp, you can stand anywhere. On a ladder, you can only stand on the steps.

RecapLet's recap. Analog can take any value, and changes smoothly. Digital uses fixed levels, and in binary, just zero and one. Digital wins because noise can't easily turn a zero into a one.

RecapQuick question before you go. How many different values can three binary digits represent? Think about it. The answer is in the next lesson.

Ready to test yourself? Practise real digital electronics interview questions, with model answers.

Practice questions →

← All 33 lessons of the Digital Electronics course