Using Gram-Schmidt to find the QR decomposition I'm having problems doing a QR decomposition of a matrix...
Let $A=\begin{bmatrix}
    {1} & {1} & {0} \\
    {0} &{1} &{1} \\
   {1} & {0} &{1} 
\end{bmatrix}$
Find the QR decomposition for A
Here's what I've been doing:
I choose this basis, $B=\left \{(1,0,1), (1,1,0), (0,1,1)\right \}$ (the columns of the matrix).
Now I use the Gram-Schmidt process (and this is where I'm having trouble)
$u_{1}=(1,0,1)$
$u_{2}=(1,1,0)$ (cuz $<(1,0,1), (1,1,0)>=0$)
$u_{3}=(0,1,1)-\frac{<(0,1,1), (1,1,0)>}{<(1,1,0), (1,1,0)>}(1,1,0)-\frac{<(0,1,1), (1,0,1)>}{<(1,0,1), (1,0,1)>}(1,0,1)=$ $(0,1,1)-1/2(1,1,0)-1/2(1,0,1)=(-1, 1/2, 1/2)$
And now I find the norm for all the three vectors:
$||u_{1}||=||u_{2}||=||u_{3}||=\sqrt{2}$
So the orthonormal basis must be $B'= \left \{(\frac{1}{\sqrt{2}},0,\frac{1}{\sqrt{2}}), (\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},0), (\frac{-1}{\sqrt{2}}, \frac{1}{2\sqrt{2}}, \frac{1}{2\sqrt{2}})\right \}$ (Which it isn't orthonormal)
So $Q=\begin{bmatrix}
    {\frac{1}{\sqrt{2}}} & {\frac{1}{\sqrt{2}}} & {\frac{-1}{\sqrt{2}}} \\
    {0} &{\frac{1}{\sqrt{2}}} &{\frac{1}{2\sqrt{2}}} \\
   {\frac{0}{\sqrt{2}}} & {0} &{\frac{1}{2\sqrt{2}}} 
\end{bmatrix}$
Which $Q^{t}Q \neq I$ ($I$ being the identity matrix), so all I did was wrong...
Where's my mistake?

$u_1 $ is correct, your mistake is in $u_2$
\begin{equation}
 u_2 =(1,1,0) - \frac{<(1,0,1), (1,1,0)>}{<(1,0,1), (1,0,1)>}(1,0,1)
\end{equation}
which is 
\begin{equation}
 u_2 = (1,1,0) - (\frac{1}{2})(1,0,1)
 =
 \frac{1}{2}(1,1,-1)
 =
 (\frac{1}{2}, \frac{1}{2},-\frac{1}{2})
\end{equation}
Now, 
\begin{equation}
 u_3 =(0,1,1) - \frac{<(1,0,1), (0,1,1)>}{<(1,0,1), (1,0,1)>}(1,0,1)
 -
 \frac{<(\frac{1}{2}, \frac{1}{2},-\frac{1}{2}), (0,1,1)>}{<(\frac{1}{2}, \frac{1}{2},-\frac{1}{2}), (\frac{1}{2}, \frac{1}{2},-\frac{1}{2})>}(\frac{1}{2}, \frac{1}{2},-\frac{1}{2})
\end{equation}
that is
\begin{equation}
 u_3 = (0,1,1) - \frac{1}{2}(1,0,1)
 -
 \frac{0}{\frac{3}{4}}(\frac{1}{2}, \frac{1}{2},-\frac{1}{2})
 =
 (-\frac{1}{2},1,\frac{1}{2})
\end{equation}
This is an orthogonal basis, i.e.
\begin{equation}
 O 
 =
 \begin{bmatrix}
  u_1 & u_2 & u_3
 \end{bmatrix}
\end{equation}
where $O^T O $ is diagonal. To have an orthonormal one, just take (as you also mention)
\begin{align}
 l_1 &= \frac{u_1}{\Vert u_1 \Vert}\\
 l_2 &= \frac{u_2}{\Vert u_2 \Vert}\\
 l_3 &= \frac{u_3}{\Vert u_3 \Vert}
\end{align}
