There is an instantaneous binary code with n codewords of length l1,l2,…ln if and only if This is most easily seen using a binary rooted tree, as a codeword of length l precludes 2–l of the remainder of the tree, codewords for which it would be a prefix.