Submitted by R0oty t3_10ovaci in explainlikeimfive
Loki-L t1_j6h6z19 wrote
Reply to comment by dmullaney in ELI5: How Does A Computer Convert A Decimal To Binary by R0oty
To add to that, in most circumstances pressing four on the keyboard will not result in 00000100 binary being stores, but instead 00110100.
The keystrokes get normally stored as characters not numbers and this character just happens to be a digit.
The value of the characters for 0 to 9 are not the values of the numbers 0 to 9, but 48 (00110000) added to them.
To actually treat what you enter as a number rather than a string of characters the computer needs to internally convert them.
Viewing a single comment thread. View all comments