41
ASCII characters. The only exception is that 127 (ASCII <DEL>) is sent as 63 (ASCII
"?")
Example 1. Encoding the number 10 in 1 byte:
Since 10 will fit in 6-bits we only have to add 64 which would yield 74. So the number
10 would appear as ASCII 74 or the letter "J".
Example 2. Encoding the number 12345 in 3 bytes:
First we have to convert 12345 into binary in 6-bit pieces:
12345 (base 10) = 11 000000 111001 (base 2)
Now we can convert each piece back to base 10:
11 000000 111001 (base 2) = 3, 0, 57
Finally, we add 64 to each piece and convert to ASCII:
67, 64, 121 = ASCII "C@y"
Example 3. Encoding the number -12345 in 3 bytes:
First we have to convert -12345 into two's complement 18-bit binary: -12345 (base 10) =
111100 111111 000111 (base 2)
Now we can convert each piece back to base 10: 111100 111111 000111 (base 2) = 60,
63, 7
Finally, we add 64 to each piece and convert to ASCII (since the second piece is 63 we
leave it alone):
124, 63, 71 = ASCII "|?G"
Example 4. Decoding the 3 byte string "@SW":
This is just like encoding except we follow the steps backward.
First we convert all the characters to ASCII decimal codes:
ASCII "@SW" = 64, 83, 87
Now we subtract 64 from each piece and convert to 6-bit binary:
0, 19, 23 = 000000 010011 010111
Finally, we combine all the bits to form one 18-bit two’s complement number and
convert to base 10:
000000010011010111 = 1239
Pseudobinary-B/C over SMS Format
The Pseudobinary-B and -C formats contain 8 characters which cannot be sent over SMS
using the standard GSM 7-bit character set without inserting additional characters. This is
undesirable as it would reduce the number of bytes that can be sent over SMS from 160
to 80 (in the worst case). To work around this limitation, SMS messages that contain a
Pseudobinary message will automatically be translated to replace non-supported