[intervención alta] Titivillus: bytes de 7 bits

Los bytes constan de 8 bits siempre; sin embargo, la máscara AND aparece varias veces sin el bit menos significativo. Se coteja con el original y se corrige el error allí también.

Sin embargo, no queda claro claro del todo el valor 10 escrito a la derecha. El número en binario corresponde al valor 8 (suma de potencias de dos: 2³).
This commit is contained in:
Roberto MF 2022-01-29 23:28:05 +01:00
parent 318e57a398
commit 53207878fb
2 changed files with 4 additions and 4 deletions

View File

@ -590,7 +590,7 @@ por ejemplo, digamos que queremos ver si el bit número 4, que corresponde al bo
nuestra máscara AND tendrá un 1 en el bit número 4 (de derecha a izquierda y empezando por el 0) y 0 en el resto:
```
0001 000: 10
0001 0000: 10
```
¿qué pasaría si se pulsa el botón A (tecla Ctrl), con su estado codificado en el bit 0 y nada más?
@ -625,7 +625,7 @@ así vemos cómo la máscara nos permite aislar efectivamente el bit que nos imp
aplicar esta máscara sería tan sencillo como escribir:
```
#10 AND ( aplicar máscara 0001 000 )
#10 AND ( aplicar máscara 0001 0000 )
```
## ejemplo: dibujar con flechas y Ctrl

View File

@ -590,7 +590,7 @@ for example, let's say we want to see if bit number 4, corresponding to the Up b
our AND mask will have a 1 in bit number 4 (from right to left, and starting at 0), and 0 elsewhere:
```
0001 000: 10
0001 0000: 10
```
what would happen if button A (Ctrl key), with its state encoded in bit 0, is pressed, and nothing else?
@ -625,7 +625,7 @@ see how the mask allows us to effectively isolate the bit that matters to us, re
applying this mask would be as simple as writing:
```
#10 AND ( apply 0001 000 mask )
#10 AND ( apply 0001 0000 mask )
```
## example: draw with arrows and Ctrl