We have talked about obtaining a discrete-time signal through sampling the time-axis and obtaining a discrete frequency set through sampling the frequency axis. The same concept can be applied to the amplitude-axis, where the signal amplitude can be sampled to take only a finite set of discrete values. This discrete-time discrete-valued signal is called a digital signal, as opposed to an analog signal that is continuous in time and continuous in amplitude.
The above figure shows how a digital signal having amplitudes over a fixed set of values can be obtained through slicing the underlying continuous amplitudes. For example, an amplitude of 2.2 can be rounded to 2, 1.4 to 1 and so on depending on the desired resolution. Keep in mind that there is a 6 dB improvement in Signal to Quantization Noise Ratio with each extra bit of the analog to digital converter.
Computers can only work with digital signals because discrete-time signals — though defined only for finite values on time-axis — can have infinite values on the amplitudes-axis. Just as computer memory is finite and can store only a known number of time values, its width is also finite (e.g., 8 bits) and can store only a fixed number of amplitudes (e.g., for an 8-bit wide memory, we can have 256 values for amplitudes). Digital signals provide several benefits over analog signals such as accuracy, flexibility, processing and storage.