Hi,
Pomprocker, that's not BCD (Binary Coded Decimal), but straight Binary (which can be converted back and forth to/from Gray with XOR gates).
The OP should reveal the nature of this assignment (which it probably is), since it doesn't really make sense with BCD to Gray, as the sole purpose of using Gray is to only have one bit change at every transition.