convert Character string into binary

Hi i had a ASCII string, how do i convert it into binary?

I was told to use bit masking to do it.

thanks in advance

For Arduino (you can adapt to your need if pure avr):

void setup() {
  Serial.begin(9600);
  char *str = "0123";
  for (char *c = str ; *c ; c++)
    for (char b = 7 ; b > -1 ; b--)
      Serial.print((*c >> b) & 0x1 ? "1" : "0");
}

void loop() {
}

caltex88:
Hi i had a ASCII string, how do i convert it into binary?

I was told to use bit masking to do it.

thanks in advance

Is the GPS NMEA data question again?