\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{%
  shapes.gates.logic.US,%
  shapes.gates.logic.IEC,%
  circuits.logic.US,%
  circuits.logic.IEC,%
  circuits.logic.CDH,%
  circuits.ee.IEC}
\usepackage{xepersian}
\settextfont{Yas}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}[circuit logic CDH,
large circuit symbols,
every circuit symbol/.style={
fill=white,draw},very thick]
\matrix[column sep=7mm]
{
\node (i0) {0}; &
& \\
& \node [and gate] (a1) {}; & \\
\node (i1) {0}; &
& \node [or gate] (o) {};\\
& \node [nand gate] (a2) {}; & \\
\node (i2) {1}; &
& \\
};
\draw (i0.east) -- ++(right:3mm) |- (a1.input 1);
\draw (i1.east) -- ++(right:3mm) |- (a1.input 2);
\draw (i1.east) -- ++(right:3mm) |- (a2.input 1);
\draw (i2.east) -- ++(right:3mm) |- (a2.input 2);
\draw (a1.output) -- ++(right:3mm) |- (o.input 1);
\draw (a2.output) -- ++(right:3mm) |- (o.input 2);
\draw (o.output) -- ++(right:3mm);
\end{tikzpicture}
\caption{یک مدار منطقی}
\end{figure}
\end{document}