Your missionWrite a function that exchanges the upper nibble and the lower nibble of a byte and returns the result.See it in actionswap_bits(0xF0)15swap_bits(0xAB)186Your checklistA byte is made of two groups of 4 bits called nibbles: the high nibble (bits 7-4) and the low nibble (bits 3-0).Your function must swap those two nibbles and return the resulting byte.For example, 0xF0 (high nibble: 0xF, low nibble: 0x0) becomes 0x0F.ConstraintsExpected fileswap_bits.cAllowed functionsNone. Write every helper yourself.
Your missionWrite a function that exchanges the upper nibble and the lower nibble of a byte and returns the result.See it in actionswap_bits(0xF0)15swap_bits(0xAB)186Your checklistA byte is made of two groups of 4 bits called nibbles: the high nibble (bits 7-4) and the low nibble (bits 3-0).Your function must swap those two nibbles and return the resulting byte.For example, 0xF0 (high nibble: 0xF, low nibble: 0x0) becomes 0x0F.ConstraintsExpected fileswap_bits.cAllowed functionsNone. Write every helper yourself.