\def\d{1.5}

\usetikzlibrary{patterns}
\begin{tikzpicture}

\foreach[count=\xi] \len in {1,3,2,5} {
	\draw[|-|] (0, -\xi*\d) rectangle (\len, -\xi*\d - .5*\d);
	\draw[|-|] (-.5, -\xi*\d) -- node [left] {$d$} (-.5, -\xi*\d - .5*\d);
	\draw[|-|, yshift=.2cm] (0, -\xi*\d) -- (\len, -\xi*\d) node [right] {$\len$};
}

\begin{scope}[xshift=7cm]
	\foreach[count=\xi] \len in {4,2,1} {
		\draw[|-|] (0, -\xi*\d) rectangle (\len, -\xi*\d - .5*\d);
		\draw[|-|] (-.5, -\xi*\d) -- node [left] {$d$} (-.5, -\xi*\d - .5*\d);
		\draw[|-|, yshift=.2cm] (0, -\xi*\d) -- (\len, -\xi*\d) node [right] {$\len$};
	}
\end{scope}

\begin{scope}[yshift=-6cm, xshift=7cm]
\draw[|-|] (-.5, 0) -- node [left] {$d$} (-.5, -.5*\d);

\draw[pattern=crosshatch,pattern color=black!30] (0,  0) rectangle (1, -.5*\d);
\draw[pattern=crosshatch,pattern color=black!30] (1,  0) rectangle (3, -.5*\d);
\draw[pattern=crosshatch,pattern color=black!30] (3, 0) rectangle (6, -.5*\d);

\draw[|-, yshift=.2cm] (0, 0) -- node [above] {$1$} (1, 0) ; 
\draw[|-|, yshift=.2cm] (1, 0) -- node [above] {$2$} (3, 0) ; 
\draw[-|, yshift=.2cm] (3, 0) -- node [above] {$3$} (6, 0) ; 

\draw[|-|, yshift=-.2cm] (0, -.5*\d) -- node [below] {$sz = 6$} (6, -.5*\d) ; 
\end{scope}

\end{tikzpicture}