r/AskComputerScience • u/scol2n • Sep 02 '26
How does a computer know between the number 65 and the letter H?
I'm watching CS50, and about halfway through week 0, doctor malen mentioned how 65 bits of data equals the letter H and i'm curious to that if 65 equal H, how does the company know the difference between H and just the number 65?
32
Upvotes
View all comments
65
u/soundman32 Sep 02 '26
It doesnt. There are many different encoding schemes going back to the dawn of computing. 65=H is just the ASCII 7-bit encoding definition. The computer has no idea that we decided that for some cases the number 65 should end up onscreen as a capital H.
Encodings like Unicode use 16 or 32 bit values (so they can use non Latin characters more easily), older computers may use Petscii (CBM 8 bit micros) or EBCDIC (IBM mainframes).