Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned char stringToBinary(char tmpSubjectStatus[])
- {
- unsigned char tmpBinaryCh = 0;
- int i;
- for (i = 0; i < 5; i++){
- if (tmpSubjectStatus[i] == '1') tmpBinaryCh += 1 << (4 - i);
- }
- return tmpBinaryCh;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement