[Tex/LaTex] Can not find symbols in latex

pdf

I am new in latex and I need to express the following symbols:

&, &&, ^, | , || , <, <=, >, >= , == , != , %

When I write them in that way, nothing happens on the document. Please help.

best regards,

Best Answer

The symbols can be set in verbatim mode, e.g.:

\documentclass{article}

\begin{document}
\begin{tabular}{ll}
  \verb|&|  & bitwise and\\
  \verb|&&| & logical and\\
  \verb|^|  & bitwise xor\\
  \verb+|+  & bitwise or\\
  \verb+||+ & logical or\\
  \verb|<|  & less than\\
  \verb|<=| & less than or equal to\\
  \verb|>|  & greater than\\
  \verb|>=| & greater than or equal to\\
  \verb|==| & equal to\\
  \verb|!=| & not equal to\\
  \verb|%|  & modulo\\
  \verb|~|  & bitwise not\\
\end{tabular}
\end{document}

Result

Program code can also be set via package listings.

Related Question