Analog-digital and digital-analog conversion