  Ferromagnetic-insulator (FI) based Josephson junctions are promising
candidates for a coherent superconducting quantum bit as well as a classical
superconducting logic circuit. Recently the appearance of an intriguing
atomic-scale 0-pi transition has been theoretically predicted. In order to
uncover the mechanism of this phenomena, we numerically calculate the spectrum
of Andreev bound states in a FI barrier by diagonalizing the Bogoliubov-de
Gennes equation. We show that Andreev spectrum drastically depends on the
parity of the FI-layer number L and accordingly the pi (0) state is always more
stable than the 0 (pi) state if L is odd (even).
