This looks like homework to me, but I'll give you a start. Bit inversion is usually taken to mean reversing the order of bits, BTW. "flip" means change from 1->0 or 0->1.
Use a bit field to see what is set, or you can use any of dozens of bit twiddles - which I suspect is what your teacher wants you to do.
See:
Bit Twiddling Hacks
Note: if this is homework , please post in the correct forum - some other moderator may close this thread otherwise.