Solution (source code)

= Solution

The two binary terminal payoffs are complementary:
$$
\mathbf1_{\{S_T\ge X\}}+\mathbf1_{\{S_T<X\}}=1
$$
in every state, including $S_T=X$. Long one of each is therefore exactly a unit <zero-coupon bond>. The <law of one price> gives <digital put-call parity>:
$$
\boxed{C_t^{\rm bin}+P_t^{\rm bin}=B(t,T).}
$$
With deterministic interest, the two separate values are $B(t,T)Q(S_T\ge X\mid\mathcal F_t)$ and $B(t,T)Q(S_T<X\mid\mathcal F_t)$. There is no need to assume a continuous terminal price distribution: the strict inequality for the put and weak inequality for the call allocate any atom at the strike exactly once.