The standard electrode potential of a metal ion (Ag|Ag⊕ and metal insoluble salt anion (Ag|AgCl|Cl⊖) are related as:
Cathode : AgCl+e−→Ag+Cl⊖
Anode : Ag→Ag⊕+e−
When, Ecell=0⇒Qcell=Ksp
and E⊖cell=E⊖Ag|AgCl|Cl⊖−E⊖Ag⊕|Ag .... (i)
Ecell=E⊖cell−RTnFln[Ag⊕][Cl⊖](n=1)