Something along the lines of this should be enough:
#include <stdio.h> int main (void) { unsigned int value = 71184592; // Secret key :-) for (unsigned int shift = 0; shift < 28; shift += 7) printf ("%c", (value >> shift) & 0x7f); putchar ('\n'); return 0; }
It uses bit offsets to get the specific bits you want into the least significant seven bits of the value, and bit masking to clear all other bits.
If you run this code, you will see that it can very well extract individual ASCII characters in groups of seven bits:
Pax!
source share