YOu need an ADC whehter using an IC or building it from scratch. If use many MANY comparators and divide each comaprator to a different voltage range, you have a flash ADC- the fastest, most expensive, largest, most power hungry of power converters.
THere are also others that charge and discharge a capacitor through a resistor and measure how long it takes to reach a certain voltage. Others like successive approximation keep on redistributing the charge in a charged capacitor back and forth to figure it out. THere are other kinds too.
To make digital to analog you can use a resistive divider with many resistors and a of switches in parallel with each resitor. YOu can also output a PWM wave through a filter (like an RC filter) and only the average of the PWM waveform will appear on the output and you vary the duty cycle to change the average (and thus the output voltage). YOu can do it yourself or use ICs (especially for the resistor divider one since it's not fun working with a hundred or more resistors and switches).
Try google.