HEX Split

So i don't understand where i need to put this

uint8_t read_nibble(uint32_t data, uint8_t ix)
{
return ((data >> (ix * 4)) & 0xf);
}

may be you can stisk your solution with my code what i post?
I would like all code sticked together not only peace of code. I am simply a newbie.

May be there is some easier way without uint8 ....
I think all that could be done with Array[] function, or may be i wronk?