iOS Hex, binary, and decimal conversion