Coding and decoding with dendrites