Skip to content

Commit

Permalink
fix: clarify explanation of ASCII as a 7-bit encoding
Browse files Browse the repository at this point in the history
Closes #94
  • Loading branch information
khalidbelk committed Jan 2, 2025
1 parent 1573ac9 commit e429ca7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion es/guia/escribiendo-codigo/datos.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Un byte se compone de **8 bits**. Por eso, el 8 es un número mágico: _todo_ ac

¿Por qué el número mágico es 8?

Bueno, cuando representamos un solo carácter (como `A`), hacen falta **8 bits** para representar ese carácter en los datos.
Bueno, ASCII utiliza 7 bits para representar caracteres (como `A`), pero normalmente se almacena en **8 bits** porque así es como la mayoría de los ordenadores manejan los datos.

Esto tiene que ver con el hecho de que cada letra está representada por un número. Como cada carácter está representado por un número, tenemos que tener una tabla que indique qué número representa a qué letra. Podemos utilizar esa tabla para ver qué caracteres se corresponden con qué números.

Expand Down
2 changes: 1 addition & 1 deletion guide/writing-code/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A byte is made up of **8 bits**. Due to this, 8 is a magic number around here -

Why is the magic number 8?

Well, when we're representing a single character (like `A`), it takes **8 bits** to represent that character in data.
Well, ASCII uses 7 bits to represent characters (like `A`), but it’s typically stored in **8 bits** because that’s how most computers handle data.

This has to do with the fact that each letter is represented by a number. Because each character is represented by a number, we have to have a table mapping which number represents which letter. We can use that mapping to then see which characters correspond with which numbers.

Expand Down

0 comments on commit e429ca7

Please sign in to comment.