Let \( \vec{a} = \hat{i} - \hat{j} \) and \( \vec{b} = \hat{i} + \hat{j} \).
The unit vector perpendicular to both vectors is given by the cross product \( \vec{a} \times \vec{b} \).
We compute the cross product:
\[
\vec{a} \times \vec{b} = \left( \hat{i} - \hat{j} \right) \times \left( \hat{i} + \hat{j} \right)
\]
Using the distributive property and properties of unit vectors:
\[
\vec{a} \times \vec{b} = \hat{i} \times \hat{i} + \hat{i} \times \hat{j} - \hat{j} \times \hat{i} - \hat{j} \times \hat{j}
\]
Since \( \hat{i} \times \hat{i} = 0 \), \( \hat{j} \times \hat{j} = 0 \), and \( \hat{i} \times \hat{j} = \hat{k} \), we get:
\[
\vec{a} \times \vec{b} = \hat{k} + \hat{k} = 2 \hat{k}
\]
Thus, the unit vector perpendicular to both vectors is:
\[
\frac{2 \hat{k}}{|2 \hat{k}|} = \hat{k}
\]
Therefore, the correct answer is \( \hat{k} \).