if non - 8 is even or odd than add the next even .
if ( s [ index1 ] . charCodeAt ( ) % 2 == 0 ) num = num * 10 + ( s [ index1 ] . charCodeAt ( ) - ' ' . charCodeAt ( ) + 2 ) ; else num = num * 10 + ( s [ index1 ] . charCodeAt ( ) - ' ' . charCodeAt ( ) + 1 ) ;