Take a look at section 2.2.2 of this book (from Page-15 to 16). >
$$max f (x)= x sin(10πx)+2.0 ... ... ... ... ... (2.8)$$ $$s.t. −1 ≤ x ≤ 2$$
2.2.2 Representation and Evaluation
We can use a real number, in the range $[−1,2]$, to represent a solution in Eq. $2.8$ directly. Many operators can handle real number representation. But we use the binary code or binary representation here for two reasons. GAs were originally proposed to be binary code to imitate the genetic encoding of natural organisms. On the other hand, binary code is good for pedagogy. A binary chromosome is necessary to represent a solution x in the scale $[−1,2]$. The same holds for the binary representation of real numbers in a computer.
In binary code, we cannot represent a real number completely correctly, so a trade-off is necessary. A tolerance needs to be defined by the user, which means the errors below the tolerance are extraneous. If we divide the definition domain into $2^1 = 2$ parts evenly and select the smallest number in the parts to represent any number in the division, we can only represent $−1$ and $0.5$ by $0$ and $1$ respectively. $2^2 = 4$ divisions make the $00$, $01$, $10$, and $11$ represent $−1$, $−0.25$, $0.5$, and $1.25$, respectively. The larger division number we select, the less error there is in representing a real number on binary code. Suppose we use $100$ binary codes to represent a real number in the range $[−1,2]$; the maximum error is $\frac{3}{2100} ≈ {2.37}^{−30}$, which would be satisfactory for most users. In this way, we can represent a real number with any accuracy requirements.
In this problem, we use $l = 12$ binary codes to represent one real number as follows, which constitutes a chromosome to be evolved.
Actually, I haven't understood this text. I know that binary numbers are already able to represent fractions.
So, what are they talking about?
Numbers that can be written as fractions are called Rationals. Real numbers include Rationals and Irrationals (numbers such as $\sqrt{2}$). Irrationals have an infinite number of non periodic digits, and therefore, it is impossible to represent them accurately neither as quotients of integers nor in binary code.