Xidian Software Institute algorithm on the machine 2 code