Sampling rate of 8khz means that we must measure the analog signal 8000 times per one second. If the bitrate is 64kbits/s, this means we are allowed to store our data using 64,000 bits of storage for every 1 second's worth of measurements.
Since we are making 8000 measurements per second, this means we are allowed 8 bits to store each individual measurement.
Now each bit contains 2 possible values, 0 or 1. So given 8 bits we are only able to store 256 possible levels of value.
After this, it is quite straightforward to translate all the levels into bits. For example, '22' from the above graph will be translated into 00010110, as so forth.
To actually translate the full data completely from just the sparse graph above is actually impossible by inspection. We need the full analog signal data to be measured 8000 times a second and then translate them one by one into 64000 bits of data.
But if the assignment is to translate 22, 15, 4, 9 from the graph, then we can do it as above.
Hope it helps!