added address decoding logic for adc
please do not use tabs