# Draw multiple arrows as a bus

It's my first post, I've been using LaTeX for some time now but frankly I'm still a rookie.

I want to draw somehting like this, set of parallel arrows to represent a bus in the digital system, does anybody know to accomplish it?

-

HTH!

The result:

And the code:

\documentclass [tikz] {standalone}

\usetikzlibrary{shapes.geometric}
\usetikzlibrary{calc}

\newcounter{mynodes}

% node, begin anchor, end anchor, name
\newcommand{\makepoints}[4]{
\foreach \k in {1, ..., \points}
{
\pgfmathsetmacro{\dist}{\k * (1 / (\points + 1))}
\coordinate (#1 #4 \k) at ($(#1.#2)!\dist!(#1.#3)$);
}
}

\begin{document}
\begin{tikzpicture}

% number of arrows between nodes
\pgfmathtruncatemacro{\points}{5}

% square 1
\node [draw, minimum size = 2cm] (square 1) {};
\makepoints{square 1}{south west}{south east}{bottom}

% square 2
\node [draw, minimum size = 2cm] (square 2) at (0, -4cm) {};
\makepoints{square 2}{north west}{north east}{top}

% arrows
\foreach \i in {1, ..., \points} {
\draw [->] (square 1 bottom \i) -- (square 2 top \i);
}

\end{tikzpicture}
\end{document}

-
Awesome, thanks, what about node nesting ? –  Mapedd Oct 18 '12 at 13:18
I think you just need to draw a node (large box) around the other nodes (boxes inside). You can read in the manual about the fit library also, if you are looking for a more elegant solution. –  tecepe Oct 18 '12 at 13:59
Thanks for help, i will look after those soultions :D –  Mapedd Oct 19 '12 at 9:06