# Estimation and detection in communication problem?

I just want to get clear conceptually about the difference between detection and estimation in terms of a communication problem. Suppose I have a source and a destination. The source transmits binary symbols (1) $$x_1$$ and (0) $$x_0$$. Our job is to detect which symbol has been transmitted. As per detection theory, I can have two hypotheses:

$$H_1:y=0+n,$$ $$H_2:y=1+n$$ now if I know the noise distribution as $$f(n)$$, I can design a detection rule using log likelihood function $$f(y|x_0)>f(y|x_1): \text{The detected symbol is} 0$$ $$f(y|x_0)

Now can I also detect the symbol using ML estimation? For example, suppose I want to detect the parameter which can have either a value 0 or 1. Now the output is observation and If I set $$\frac{\partial (y|x)}{\partial x}\bigg{\vert}_{x=\hat{x}(y)}=0$$, where I have assumed no knowledge about the input probability distribution of the input symbols $$x_0$$ and $$x_1$$. The rule is to derive $$\hat{x}(y)$$ and find its Euclidean distance with $$x_0$$ and $$x_1$$ and assign the value to the symbol with smaller Euclidean distance value. Can detection also happen this way? I am confused as to why we can't detect using estimation procedures?