Number of DFA states required
In order to obtain an upper bound on the number of DFA states required to recognize some language, the simplest method is to give a DFA with that (or lower) number of states. In order to obtain a lower bound on the same number, the easiest route is to give $m$ pairwise indistinguishable words. These are $m$ words $x_1,\ldots,x_m$ such that for each $i \neq j$ there exists a word $y$ such that $x_i y \in L$ whereas $x_j y \notin L$, or vice versa. This set of words shows that every DFA for $L$ must contain at least $m$ states (why?).

In your case, the minimal number of states is much smaller than 24, though the exact number depends on the encoding. Instead of solving your question, let me calculate the minimal number of states in a DFA accepting all (non-empty) decimal numbers (encoded MSB to LSB) which are divisible by 6. I claim that this number is 4. For the upper bound, consider a DFA with states $q_0,q_1,q_2,q_A$, where $q_0$ is the initial state and $q_A$ is the accepting states. The transition table of the DFA is
$$
\begin{array}{c|ccccccccccc}
\delta &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 \\\hline
q_0 &amp; q_A &amp; q_1 &amp; q_2 &amp; q_0 &amp; q_1 &amp; q_2 &amp; q_A &amp; q_1 &amp; q_2 &amp; q_0 \\
q_1 &amp; q_1 &amp; q_2 &amp; q_A &amp; q_1 &amp; q_2 &amp; q_0 &amp; q_1 &amp; q_2 &amp; q_A &amp; q_1 \\
q_2 &amp; q_2 &amp; q_0 &amp; q_1 &amp; q_2 &amp; q_A &amp; q_1 &amp; q_2 &amp; q_0 &amp; q_1 &amp; q_2 \\
q_A &amp; q_A &amp; q_1 &amp; q_2 &amp; q_0 &amp; q_1 &amp; q_2 &amp; q_A &amp; q_1 &amp; q_2 &amp; q_0 \\
\end{array}
$$

You can show by induction that upon reading a word $w$:


If $w = \epsilon$ or $w \equiv 3 \pmod{6}$, the machine is in state $q_0$.
If $w \neq \epsilon$ and $w \equiv 1,4 \pmod{6}$, the machine is in state $q_1$.
If $w \neq \epsilon$ and $w \equiv 2,5 \pmod{6}$, the machine is in state $q_2$.
If $w \neq \epsilon$ and $w \equiv 0 \pmod{6}$, the machine is in state $q_A$.


This easily implies that this DFA accepts our language.

For the lower bounds, we use the set of words $\{0,1,2,3\}$. The following table gives the words $y$ separating each pair of words:
$$
\begin{array}{c|cccc}
y &amp; 0 &amp; 1 &amp; 2 &amp; 3 \\\hline
0 &amp; &amp; \epsilon &amp; \epsilon &amp; \epsilon \\
1 &amp; \epsilon &amp; &amp; 2 &amp; 0 \\
2 &amp; \epsilon &amp; 2 &amp; &amp; 0 \\
3 &amp; \epsilon &amp; 0 &amp; 0 &amp;
\end{array}
$$
(These correspond to the states $q_A,q_1,q_2,q_0$.)