G being 01000111 it is 11000111
What MikMo said.
However, both the binary patterns you posted (0x47 and 0xC7) are ASCII representations of the letter 'G'.
The second is simply an ASCII 'G' with odd parity.
If you bitwise-AND your incoming characters with 0x7F, your character comparisons will work.
The "32 bits long" is simply due to sign-extension in the print method.