From e429ca706358ca0d54f3499da25908a8ea8ce0b0 Mon Sep 17 00:00:00 2001 From: khalidbelk Date: Thu, 2 Jan 2025 16:49:32 +0100 Subject: [PATCH] fix: clarify explanation of ASCII as a 7-bit encoding Closes #94 --- es/guia/escribiendo-codigo/datos.md | 2 +- guide/writing-code/data.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/es/guia/escribiendo-codigo/datos.md b/es/guia/escribiendo-codigo/datos.md index bba2fa4..ca0acee 100644 --- a/es/guia/escribiendo-codigo/datos.md +++ b/es/guia/escribiendo-codigo/datos.md @@ -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. diff --git a/guide/writing-code/data.md b/guide/writing-code/data.md index 0266e68..562a4b4 100644 --- a/guide/writing-code/data.md +++ b/guide/writing-code/data.md @@ -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.