Is there a way to make the top and bottom row come out the same, or is this offset always going to happen?
\documentclass[twoside,titlepage,12pt,appendixprefix=true]{scrbook}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{pgfmath}
\begin{document}
{
\centering
\begin{tikzpicture}
\tikzset{byte/.append style={rectangle,
draw=black, fill=white,
minimum width=0.75cm,
minimum height=1cm,
anchor=north west,
align=center, font=\scriptsize}}
\tikzset{register/.append style={byte,
minimum height=0.5cm,
fill=blue!20}}
\node [byte,minimum height=1cm] (Address Label) at (0,0) {Addr};
\node [byte, minimum height=0.5cm, minimum width=6cm] (Register Array 0) at (Address Label.north east) {Register Array 0};
\node [byte, minimum height=0.5cm, minimum width=6cm] (Register Array 1) at ($(Register Array 0.north east) + (0.25cm,0)$) {Register Array 1};
\foreach \r in {0,1}
{
\node [byte, minimum height=0.5cm] (Heading R\r D7) at (Register Array \r.south west) {D7};
\foreach \b in {6,...,0}
{
\pgfmathtruncatemacro{\bp}{\b + 1}
\node [byte, minimum height=0.5cm] (Heading R\r D\b) at ($(Heading R\r D\bp.north west) + (0.75cm,0)$) {D\b};
}
}
\foreach \r in {0,1}
{
\node [byte, minimum height=0.5cm] (Heading R\r Da7) at (Heading R\r D7.south west) {D7};
\foreach \b in {6,...,0}
{
\pgfmathtruncatemacro{\bp}{\b + 1}
\node [byte, minimum height=0.5cm] (Heading R\r Da\b) at (Heading R\r Da\bp.north east) {D\b};
}
}
\end{tikzpicture}
}
\end{document}


\foreachloop though. Plus further down I can align things to(R\a D\b.west|-R\row.north)when generating them individually. – John Moser Jul 02 '21 at 15:51