convertCodes function

convert entries in a rollcall matrix to binary form