\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}

\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{shapes, calc, shapes, arrows}

\tikzstyle{input}=[draw,fill=red!50,circle,minimum size=20pt,inner sep=0pt]
\tikzstyle{hidden}=[draw,fill=green!50,circle,minimum size=20pt,inner sep=0pt]
\tikzstyle{output}=[draw,fill=blue!50,circle,minimum size=20pt,inner sep=0pt]
\tikzstyle{bias}=[draw,dashed,fill=gray!50,circle,minimum size=20pt,inner sep=0pt]

\tikzstyle{stateTransition}=[->, thick]
\DeclareMathOperator{\xor}{XOR}
\begin{document}
\begin{preview}
\begin{tikzpicture}[scale=2]
	\node (x)[input] at (0,1) {$x$};
	\node (y)[input] at (0,0) {$y$};
	\node (o)[output] at (1,0.5) {$1$};

	\draw[stateTransition] (x) -- (o) node [midway,above=-0.06cm] {$1$};
	\draw[stateTransition] (y) -- (o) node [midway,above=-0.06cm] {$1$};


	\draw[stateTransition] (o) -- (2,0.5) node [midway,above=-0.1cm] {$x \lor y$};

\end{tikzpicture}
\end{preview}
\end{document}
