Data generating, reading, writing and converting to binary and double