Bipartite entanglement of quantum states in a pair basis