Binary tree representation of trees