Threshold Based Encoding And Decoding Definition