Fixed program, and added converter for binary representation.