optical analog to digital conversion