To perform this trick you will have to know binary number system of computer programming.
Binary is the machine level language of computer and it's expressed with the digits of "1 and 0" only.
You still remember your binary operations in Mathematics.
You have to learn how to write your phone...