So if the variable (i) is not equal to zero then temp_whole=temp_whole binary or res_factor[res_shift - 1]
which means that if i is not zero then, if there are any 1's in the value returned by the function res_factor[res_shift - 1]. Then 1's are added to the variable temp_whole in the same bit positions.