Try this:
uint8_t read_nibble(uint32_t data, uint8_t ix)
{
return ((data >> (ix * 4)) & 0xf);
}
...
for (uint8_t i = 0; i < 8; i++)
Serial.println(read_nibble(0x12345678, i), HEX);
...
Please not that the nibbles are numbered from 0..7, from right to left. Changing the order I leave as homework.
Cheers!