On characterizations of binary and graphic matroids