What is a microcontroller? Its like a mini personal PC, controlling features of a larger component, without an Operating System. It contains a CPU,memory and input/output devices where it can send and receive signals.
Microcontrollers also have ADCs and DACs, an ADC being a Analog to Digital Converter. It converts an analog signal, which consists of sine waves into a digital signal, denoted by square waves. The digital signal represents information as a series of binary digits (1 or 0).
If you have a 1 or 0 depends of the voltage grade and which ranges you decide to assign to which number. Most of the time 0 represents a lower voltage range than 1. If you want to play around with microcontrollers, they are quite cheap, like eg. 10 Euro. Here is some example code taken from the Arduino IDE which makes the led of the Microcontroller blink:
Did you work with microcontrollers yet and what did you do with them? Have a nice day. 🙂