Consider $Q_{A},Q_{B},Q_{C}$ as the $3$ bits, $Q_{A}$ being MSB. The trend taken is that of the $3$-bit gray code. Solve for $D_{a}, D_{b}, D_{c}$ each as a function of $Q_{A},Q_{B},Q_{C}.$ $$\begin{array}{lll|ll}\hline Q_{A} & Q_{B} & Q_{C} & Q_{A_{n}} = D_{A} & Q_{B_{n}}= D_{B} & Q_{C_{n}}= D_{C} \\\hline 0&0&0 & 0& 0& 1 \\\hline 0& 0& 1 & 0& 1& 1 \\\hline 0& 1& 1 & 0& 1& 0 \\\hline 0& 1& 0 & 1& 1& 0 \\\hline 1& 1& 0 & 1& 1& 1 \\\hline 1& 1& 1 & 1& 0& 1 \\\hline 1& 0& 1 & 1& 0& 0 \\\hline 1& 0& 0 & 0& 0& 0 \\\hline \end{array}$$