  We completely characterize real Bott manifolds up to affine diffeomorphism in
terms of three simple matrix operations on square binary matrices obtained from
strictly upper triangular matrices by permuting rows and columns
simultaneously. We also prove that any graded ring isomorphism between the
cohomology rings of real Bott manifolds with $\mathbb Z/2$ coefficients is
induced by an affine diffeomorphism between the real Bott manifolds.
  Our characterization can also be described in terms of graph operations on
directed acyclic graphs. Using this combinatorial interpretation, we prove that
the decomposition of a real Bott manifold into a product of indecomposable real
Bott manifolds is unique up to permutations of the indecomposable factors.
Finally, we produce some numerical invariants of real Bott manifolds from the
viewpoint of graph theory and discuss their topological meaning. As a
by-product, we prove that the toral rank conjecture holds for real Bott
manifolds.
