문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top