Binary vertex labelings of graphs and digraphs