How is 65 translated to the character "A"?

In ASCII, I wonder how 65 translates to the character "A"? As far as I know, 65 can be represented in binary format, but β€œA” is not. So how could this transformation happen?

+3
source share
8 answers

It is simply a "definition." ASCII defines the relationship between integer values ​​and characters. For implementation, there is a table (you do not see it) that performs this translation.

EDIT: Computers are just 0/1. A stream of characters is just a bunch of streams 0/1: 0110010101 ... There is a contract between a person and a computer : 8 bits are represented as a character (well, there is Unicode, UTF-8, etc.). And "A" - 65, etc.

In C / C ++ and any other languages, strings are treated as whole arrays. Only when you need to display strings do these numbers "translate" into a character. This translation is carried out either by hardware or software:

  • If you write a function that draws a character, you are responsible for drawing "A" when the input signal is 65.
  • , DOS, "A" 65. . ( , , , . , Norton DOS, NDD/NCD, , , ASCII-.)

. , . : 0 1. , 0 1. , : , 101010 "", 1100 "mov". "add eax, 1", 0/1s.

+6

. , C . , , , , . ASCII 65 A. , 65, ( ASCII), A.

, , 65, , , :

  @
 @ @
@@@@@
@   @
@   @

" ", "". , 65 . , , , .

+11

'A' IS 65. , , 65 A, .

+6

ASCII - .

, , , , . , , "A" .

+3

. , .

ASCII - , 65 "A". 66 14 "", . .

, 65, - , , ASCII, 65 "A". , , .

+1

, ?

. , ( =) . , , . ( ). .

ASCII . UTF-8, Mojibake.

+1

ASCII, ,

int a;
printf("enter the ASCII value : ");
scanf("%d",&a);
printf("%d is the ASCII of %c",a,a);
+1

, 60- .

0
source

Source: https://habr.com/ru/post/1722266/


All Articles