Pergunta

In the ASCII table, punctuation characters appear between the non-printing characters and before the numbers (!"#$%&')*+,-./), between the numbers and the uppercase letters (:;<=>?@), between the uppercase letters ([\]^_`) and the lowercase letters, and after the lowercase letters ({|}~).

On first glance, one would expect these to be grouped together; possibly either before all alphanumerical characters or behind them. But this is not the case; they apprear spread out in these different groups.

Why is this the case? Is there some (possible historical) reason why the characters are grouped this way?

Foi útil?

Solução

According to Wikipedia ASCII article:

The code itself was patterned so that most control codes were together, and all graphic codes were together, for ease of identification. The first two columns (32 positions) were reserved for control characters.) The "space" character had to come before graphics to make sorting easier, so it became position 20hex for the same reason, many special signs commonly used as separators were placed before digits. The committee decided it was important to support uppercase 64-character alphabets, and chose to pattern ASCII so it could be reduced easily to a usable 64-character set of graphic codes, as was done in the DEC SIXBIT code (1963). Lowercase letters were therefore not interleaved with uppercase. To keep options available for lowercase letters and other graphics, the special and numeric codes were arranged before the letters, and the letter A was placed in position 41hex to match the draft of the corresponding British standard. The digits 0–9 were arranged so they correspond to values in binary prefixed with 011, making conversion with binary-coded decimal straightforward.

Licenciado em: CC-BY-SA com atribuição
scroll top