Microbit Computer Science
Beginner
40 mins
Teacher/Student led
What you need:
Chromebook/Laptop/PC

Digital vs. Analogue Input

In this lesson, you'll explore the differences between digital and analogue inputs in computing. Understand their unique characteristics, identify real-world examples, and demonstrate both types using MakeCode for micro:bit in practical simulations.
Learning Goals Learning Outcomes Teacher Notes

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Introduction

    In this lesson, you will explore the differences between digital and analogue inputs in computing. These concepts are important for understanding how computers interact with the real world through sensors and devices.

    By the end of this lesson, you will:

    1. Understand what digital and analogue inputs are.
    2. Learn the key differences between them.
    3. Explore real-world examples of each.
    4. Demonstrate digital and analogue inputs using MakeCode for micro:bit in the simulator.

    2 - What is Digital Input?

    Digital input refers to data that is received in discrete, distinct values, typically represented as binary states: on or off, 0 or 1, true or false. The term 'digital' comes from 'digits,' reflecting how information is handled in countable, separate units, much like fingers on a hand. Computers process digital inputs directly because they operate in binary, which is the fundamental language of all digital devices.

    For example, a button press on a keyboard is a digital input – it's either pressed (1) or not pressed (0). There are no in-between states; it's all or nothing. Another common example is a light switch in your home: it's either on or off, without any gradual levels in between.

    Think about how this works in everyday technology – when you press a key on your phone's screen, it's a digital input that tells the device to perform a specific action immediately.

    Digital inputs are simple, reliable, and less prone to noise or interference, making them ideal for clear, yes/no decisions in computing. This reliability is why they're widely used in systems where precision and consistency are crucial, like in alarms or basic sensors.
    Activity: Can you name two other examples of digital inputs from everyday life? Jot them down and think about why they are digital (e.g., they have only on/off states).

    3 - What is Analogue Input?

    Analogue input refers to data that is continuous and can take on a range of values, not just discrete states. It represents real-world phenomena that vary smoothly, like temperature or sound levels. Unlike digital inputs, which are like simple yes/no switches, analogue inputs capture the subtle changes and variations in the environment.

    For instance, a thermometer measures temperature on a continuous scale, from cold to hot, with infinite possible values in between. Imagine turning a dimmer switch for a light – you can adjust it gradually to any brightness level, not just fully on or off. This is similar to how analogue inputs work, providing a smooth transition across a spectrum of values.

    Another example is sound waves: when you speak, your voice creates continuous waves that vary in pitch and volume, which a microphone captures as analogue input.

    In computing, analogue inputs must be converted to digital signals using an Analogue-to-Digital Converter (ADC) so the computer can process them. This conversion approximates the continuous signal into discrete digital values, like turning a smooth curve into a series of steps. This is necessary because computers fundamentally work with binary data, but it allows them to handle complex, real-world information.
    Activity: Can you name two other examples of analogue inputs from everyday life? Jot them down and think about why they are analogue (e.g., they provide a continuous range of values).

    4 - Key Differences

    Here are the main differences between digital and analogue inputs:

    • Nature of Data: Digital is discrete (e.g., 0 or 1), while analogue is continuous (e.g., a range from 0 to 100).
    • Processing: Digital inputs are directly usable by computers; analogue inputs require conversion via ADC.
    • Accuracy and Noise: Digital is more resistant to noise but can lose detail; analogue captures more nuance but is susceptible to interference.
    • Examples in Devices: Digital: switches, buttons; Analogue: microphones, sensors for light or temperature.

    Understanding these differences helps in designing systems, like in networking where sensors send data over the internet.

    5 - Real-World Examples

    Let's look at some real-world examples to illustrate the concepts:

    Digital Input Examples

    • A light switch: It's either on or off – no dimming.
    • A computer mouse button: Clicked (1) or not clicked (0).
    • A barcode scanner: Detects presence or absence of lines.

    Analogue Input Examples

    • A volume knob on a radio: Turns continuously to adjust sound level.
    • A car's accelerator pedal: Pressed to varying degrees for speed control.
    • A weather station thermometer: Measures temperature on a continuous scale.

    In computing, a smart home system might use digital inputs from door sensors (open/closed) and analogue inputs from temperature sensors (exact room temperature).

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of DigitalSkills.org. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more