Pregunta

I just have a question to make sure I get something well.

If I used my computer to sum 10+11 which is 21, it will store 21 in usually a byte such that 0001 0101, however, when it prints it on the screen, it will actually represent it as two digits 2 (0110010) and 1 (0110001) appended to each other to form 21) using ASCII.

Is that right?

Thank you!

¿Fue útil?

Solución

That is correct.

The representation of characters in a simple terminal is ASCII, where each character is represented by a (technically 7-bit) code.

Some terminals support more complex encodings like UTF8, but since UTF8 is backwards compatible with ASCII you need not worry about it.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top