pH is calculated as : pH=−log[H+] [H+] is the concentration of H+ ions.
Since HCl is a strong acid, 100% dissociation will occur. Therefore, for 10−6: So, pH=−log10−6=>pH=6
Therefore, for 10−8: So, pH=−log10−8 =>pH=8