Switch decoding