Is there an easy way to convert a character to its binary representation?
I am trying to send a message to another process, one bit at a time. Therefore, if the message is "Hello", I need to first turn the "H" into a binary file, and then send the bit in order.
Saving in an array would be preferable.
Thanks for any feedback, the most useful can be either pseudo-code or valid code.
I think I should mention that it concerns a school assignment in order to learn about signals ... this is just an interesting way to learn about them. SIGUSR1 is used as 0, SIGUSR2 is used as 1, and the point should send a message from one process to another, pretending that the medium is blocking other communication methods.
c char binary
Blackbinary
source share