# Linear Programming if-then-else [duplicate]

I have a binary variable $y\ \epsilon\ \{0,1\}$ and a real $x$ which has the following boundaries $-100\leq\ x \leq\ 100$. How can I reformulate the following statement: $$y = \begin{cases} 0 & \text{if  x< 0  }\\ 1 & \text{if x \geq0}\\ \end{cases}$$