I think it was something like...
If the Attack DV is odd, add 8. Otherwise, add 0.
If the Defense DV is odd, add 4. Otherwise, add 0.
If the Speed DV is odd, add 2. Otherwise, add 0.
If the Special DV is odd, add 1. Otherwise, add 0.
At least I think that was it in G/S/C, and since trading between R/B/Y and G/S/C is possible, I'd guess it's the same in R/B/Y.