I guess it should go like read the string as Hex like 3A. Now convert the 3A using the Decimal, Hex, octal and binary number inter conversion.

3A in Hex is equivalent to 58 in Decimal and so you dont need to go about reading the bytes and then converting.