Other contributors have said "How is an analog signal converted into a digital signal?" is the same question as "How is an analog signal converted into a digital signal and in which steps is it done?" If you believe that these are not asking the same thing and should be answered differently, click here

How is an analog signal converted into a digital signal and in which steps is it done?

Answer:
The analog signal goes through an ADC (Analog to Digital Converter) integrated circuit chip which analyzes it by taking samples in discrete steps which is a process called "quantizing": at each step the signal is rapidly matched against 255 digital levels.

Each of the 255 levels has a matching eight bit digital (0 or 1) word associated with it. Thus the sigbal level at each step is converted into a binary number to represent that level, which is called "encoding", and the resulting stream of encoded steps is sent onwards as the digital signal.

That process is also called PCM (Pulse Code Modulation).

Further more detailed answers
There are ICs called ADC for analogue digital converter. The mechanism is simple: there is a precision reference voltage of any value. This reference voltage is compared to the input voltage. The comparator's bits output are scaled to represent a digital value in binary code for a 12 bits up to 2047. If the reference value is 10 volts then the least significant bit is 10/2048=4.9 x10-3 volts or 4.88 mV or thereabout. The least significant bit (LSB) can be monotonic.

<><><>

An analogue signal is compared to a fixed DC reference voltage. The comparator will add transition bits, each equivalent to a digital unit, [i.e. one bit: a 0 or a 1] until full scale is reached. An analogue value of xxx volts will be converted to xxxx bits for a 4 bit converter and into xxxxxxxxxxxx bits for a 12 bit convertor. The IC used is called an ADC or Analog to Digital Converter.


Note
A Digital to Analogue Converter (DAC) does it the other way around with the same precision and results.
First answer by Martinel. Last edit by Martinel. Contributor trust: 883 [recommend contributor recommended]. Question popularity: 8 [recommend question].