$$S(t)-S_{0}=\mu\int_{0}^{t}S(t)\;dt+\sigma\int_{0}^{t}S(t)\;dW(t).$$
In "differential" form,
$$dS_{t}=\mu S_{t}dt+\sigma S_{t}dW_{t}.$$
This contract is known as a binary call option. We seek to determine its price $V$ at the initial time $t=0$.
The Black-Scholes theory implies (through its connection to parabolic partial differential equations and the Feyman-Kac formula) that this price is equal to the risk-neutral expected payoff $\mathbb{E}_{\mathbb{Q}}$ discounted at the risk-free rate $r$. That is,
$$V=e^{-rT}\mathbb{E}_{\mathbb{Q}}[B].$$
A simple computation reveals that this is equal to $e^{-rT}\mathbb{Q}(S_{T}>K)$. In detail,
$$e^{rT}V=\mathbb{E}_{\mathbb{Q}}[B]=1\cdot\mathbb{Q}(B=1)+0\cdot\mathbb{Q}(B=0)=\mathbb{Q}(B=1)=\mathbb{Q}(S_{T}>K).$$
Now, as covered in the Black-Scholes theory, an application of Girsonov's theorem leads us to the equivalent process for $S$
$$dS=rSdt+\sigma Sd\tilde{W_{t}}$$
where $\tilde{W}$ is a Brownian motion under the equivalent martingale measure (risk-neutral measure) $\mathbb{Q}$. We now proceed as usual taking the natural logarithm to get
$$d\log S=(r-\frac{1}{2}\sigma^{2})dt+\sigma d\tilde{W_{t}},$$
which, in light of the risk-neutral probability computation above, immediately leads us to
$$\mathbb{E}_{\mathbb{Q}}[B]=N(d_{2}),$$
where $N=\Phi(0,1)$, the standard normal density, and
$$d_{2}=\frac{\ln(S_{0}/K)+(r-\frac{1}{2}\sigma^{2})T}{\sigma\sqrt{T}}.$$
Thus,
$$V=e^{-rT}N(d_{2}).$$
The price of the put can be determined by following the steps above, but where the contract has a payoff of $1$ when $S(T)\leq K$. The result is
$$V=e^{-rT}N(d_{1}),$$
or equivalently
$$V=e^{-rt}N(-d_{2}).$$
As an aside from this, we can compute the price of this option using only the known prices of European call options. Observe that the payoff function $P$ of this option is given by
$$P=\frac{\partial C_{K}}{\partial S}$$
where $C$ is the payoff function for European call option with strike price $K$.
This observation leads us to the conclusion
$$V=\lim_{\delta\to0}\frac{{U(K-\delta})-U(K)}{\delta}=-\frac{\partial U}{\partial S},$$
where $U(K)$ is the value of the call option with strike $K$.