Let $\star$ be a binary operation on the set $S=[0,1]$ defined to be $$\star : [0,1] \times [0,1] \to [0,1] $$

$$\text{where } a \star b = \text{min}\left(\frac12 a , \frac12 b\right) $$

From observation we can see that the set $S$ is closed under $\star$ and that each ordered pair $(a,b)$ is mapped to only one element in $S$. 

For example, $1 \star 0.3 = 0.15$

But we also don't have every element in the codomain being hit. There doesn't exist any $(a,b) \in S^2$ such that $a \star b = 0.75$, for example.

Does this cause a problem at all? Is $\star$ still considered a binary operation on $S$? In class we were told all binary operations were surjective, but the textbook for the class states no such thing. And if it is not a problem, I am wondering if there are any more complicated or "elegant" examples. I am interested to see them if they are.

Thanks for any clarification on my confusion.