I am trying to fix the positions of the arrows of the following diagram without much success. I would like the arrows to be centered (both horizontally and vertically) in the matrix cell no matter which way they are pointing.
The arrows are defined by macros of LARROW RARROW and DARROW.

MWE:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart,shapes.gates.logic.IEC,shapes.arrows,positioning,decorations.markings}
\begin{document}
\begin{tikzpicture}[use IEC style logic gates, LFSR/.style={
rectangle split, rectangle split horizontal=true, rectangle split parts=#1, draw, anchor=center}, ARROW/.style={draw,thick,single arrow,single arrow head extend=3pt,transform shape}]
\def\Byte(#1,#2,#3,#4){%
\node[LFSR=3,name=#1] {\nodepart{one}#2\nodepart{two}#3\nodepart{three}#4};
}
\def\LFSR(#1,#2,#3,#4){%
\begin{scope}[decoration={
markings,
mark=at position 0.6 with {\arrow{latex}}}]
\Byte(LFSR0,#1,#2,#3)
\node[xor gate, draw, logic gate inputs=nn, logic gate input sep=0.3cm, rotate = 180, below = 1.4cm of LFSR0.one, xshift=2mm, xor gate symbol ={\scalebox{-1}{\small=1}}, logic gate symbol align = {bottom}] (Xor) {\parbox[t][0.75cm]{0.7cm}{\scalebox{-1}{\small XOR}}};
\draw (LFSR0.two south) |- (Xor.input 2);
\draw (LFSR0.three south) |- (Xor.input 1);
\draw (Xor.output) -- ++(left:3mm) node[anchor=north,inner sep=0pt] (hook1) {};
\draw[postaction={decorate}] (hook1) |- node [near start, left] {#4} (hook1|-LFSR0.west);
\draw (hook1|-LFSR0.west) -- (LFSR0.west) {};
\draw[-latex] (LFSR0.one north) ++(up:1mm) node[anchor=center,inner sep=0pt] (hook2) {} -- (LFSR0.three south |-hook2);
\end{scope}
}
\def\RARROW{\node[rectangle,draw] {
\parbox[b][1cm]{0pt}{\begin{tikzpicture}
\node[ARROW] {};
\end{tikzpicture}}
};
}
\def\LARROW{\node[rectangle,draw,rotate=180] {
\parbox[t][1cm]{0pt}{\begin{tikzpicture}
\node[ARROW] {};
\end{tikzpicture}}
};
}
\def\DARROW{\node[rectangle,draw,align=center] {
\begin{tikzpicture}
\node[ARROW,rotate=-90] {};
\end{tikzpicture}
};
}
\matrix[row sep=0, column sep=2.5mm]{
\LFSR(1,1,1,0) &\RARROW& \LFSR(0,1,1,0) & \RARROW & \LFSR(0,0,1,1) & \RARROW & \LFSR(1,0,0,0)\\
\node[anchor=east,minimum height=9mm]{$t=0$}; & &
\node[anchor=east,minimum height=9mm]{$t=1$}; & &
\node[anchor=east,minimum height=9mm]{$t=2$}; & &
\node[anchor=east,minimum height=9mm]{$t=3$}; \\
& & & & & & \DARROW\\
\LFSR(1,1,1,0) &\LARROW& \LFSR(1,1,0,1) &\LARROW& \LFSR(1,0,1,1) &\LARROW& \LFSR(0,1,0,1)\\
\node[anchor=east,minimum height=9mm]{$t=7$}; & &
\node[anchor=east,minimum height=9mm]{$t=6$}; & &
\node[anchor=east,minimum height=9mm]{$t=5$}; & &
\node[anchor=east,minimum height=9mm]{$t=4$}; \\
};
\end{tikzpicture}
\end{document}


tikzpictureis inside another. It can bring many unexpected behavior. – tecepe Oct 5 '12 at 17:14