key2binary function

Score a test by converting response patterns to binary data