Rechecked and recycled the Exception classes and added throws for
checking wheather the given input is a binary number; 2^p = 1, 2, 4, 8,
16, 32, 64, .., 1024, ..