wrote string reversal function and used it in dec2bin