Let $d_K$ be the discriminant of the quadratic number field $K = \mathbb Q(\sqrt{d})$.
How can I show that for the prime $p=2$, we have: $$2 \not | d_k, \; d \equiv 1 \pmod{8} \Rightarrow (2) = \mathcal p \mathcal p',$$ where $\mathcal p \not = \mathcal p'$ are prime ideals?
For $d \equiv 1 \pmod{4}$, the ring of integers of $\Bbb Q(\sqrt{d})$ is $\Bbb Z[\frac{1+\sqrt{d}}{2}]$. The minimal polynomial of $\frac{1+\sqrt{d}}{2}$ is $x^2-x-\frac{d-1}{4}$. If we suppose that $d \equiv 1 \pmod{8}$, then $2 \mid \frac{d-1}{4}$, so $x^2-x-\frac{d-1}{4}$ reduces mod $2$ to $x^2-x=x(x-1)$, which is a product of two distinct irreducible polynomials. Thus $2$ splits in $\Bbb Z[\frac{1+\sqrt{d}}{2}]$ as the product of two distinct prime ideals.