  In his pioneering paper on matroids in 1935, Whitney obtained a
characterization for binary matroids and left a comment at end of the paper
that the problem of characterizing graphic matroids is the same as that of
characterizing matroids which correspond to matrices (mod 2) with exactly two
ones in each column. Later on Tutte obtained a characterization of graphic
matroids in terms of forbidden minors in 1959. It is clear that Whitney
indicated about incidence matrices of simple undirected graphs. Here we
introduce the concept of a segment binary matroid which corresponds to matrices
over $\mathbb{Z}_2$ which has the consecutive $1$'s property (i.e., $1$'s are
consecutive) for columns and obtained a characterization of graphic matroids in
terms of this. In fact, we introduce a new representation of simple undirected
graphs in terms of some vectors of finite dimensional vector spaces over
$\mathbb{Z}_2$ which satisfy consecutive $1$'s property. The set of such
vectors is called a coding sequence of a graph $G$. Among all such coding
sequences we identify the one which is unique for a class of isomorphic graphs.
We call it the code of the graph. We characterize several classes of graphs in
terms of coding sequences. It is shown that a graph $G$ with $n$ vertices is a
tree if and only if any coding sequence of $G$ is a basis of the vector space
$\mathbb{Z}_2^{n-1}$ over $\mathbb{Z}_2$. Moreover considering coding sequences
as binary matroids, we obtain a characterization for simple graphic matroids
and found a necessary and sufficient condition for graph isomorphism in terms
of a special matroid isomorphism between their corresponding coding sequences.
For this, we introduce the concept of strong isomorphisms of segment binary
matroids and show that two simple (undirected) graphs are isomorphic if and
only if their canonical sequences are strongly isomorphic segment binary
matroids.
