Familiarize with concepts of converting Digital Values to Analog Values.
One day, I wanted to measure the distance with the help of the infrared sensor connected to Arduino. Infrared Sensor sends the analog input to the Arduino but without the help of the ADC (Analog-to-Digital Converter) chip, it is impossible to read analog values. So Arduino uses an ADC chip of 10-bit resolution to convert analog values into digital ones.
Well, I said that Arduino uses the 10-bit resolution chip. But what does the 10 bit means? It means that it can divide an analog signal to 2^10 digital values means 1024 values.
As you can see in the above picture, 1 V is divided into 8 steps that means it represents the 8 bit ADC chip. Similarly, a 10 bit ADC chip would divide the 1 V into the 10 steps.
For example, if we are sending the 5 V input to the Arduino, 10 it ADC chip will convert its value to 1023, and similarly, 2.5 V will be mapped to 512.
After reading this post you might have got an overview of the working of ADC chip.