obtain a binary code for all base 6 digits so that 5 complement is obtained by replacing 1 with 0 and vice versa...
So, if I understand the question right, you need to represent each "base 6 digit" by a string of 0's and 1's. Then, for example, a base-6 number with two digits can be written as a binary number where represent and represent . Now, the trick is that "fives' complement" of should be represented as where and .
Do you know what "base 6 digit" and "fives' complement" are? Because not knowing this is like trying to cook "bouillabaisse" without knowing what it is...