Encoding of Multi Level S-Threshold Functions