Update TextEncoderAndDecoder

Changed the convertTheInt method to use modulo arithmetic.