Convert ASCII letters to binary numbers - how it works
Related Videos: ASCII Code and Binary (May 2024).
So that you can use your computer as usual, it uses ASCII letters and binary numbers. You can find out what these are actually good for in this practical tip.
Binary numbers - this is how they are used in the computer
Before we take a look at binary numbers, first read our article on "Binary and Hexadecimal Numbers", in which we explain how these are correctly converted.
- The computer uses a number system of ones and zeros. With this number system, data can be stored, for example, in the form of an electrical charge on a capacitor, in the form of an electrical voltage on a resistor or by magnetization, for example in the case of hard disks ("HDD").
- Computers use the dual system to represent whole numbers. Other types of numbers, such as floating point numbers or negative values, can also be mapped using their own conventions.
- The whole thing gets a little more complicated with letters and punctuation marks. Special coding is required for this.
ASCII letters - this is how they are used
There are many different encodings nowadays. The best known coding is ASCII, the "American standard code for the exchange of information".
- The ASCII code comprises the Latin alphabet in upper and lower case, the ten Arabic numerals and some punctuation marks (punctuation marks, word characters), other special characters and some control characters.
- With ASCII code, a 7-bit bit pattern is assigned to each character. The eighth bit, which is not used for ASCII, can be used for error correction purposes (parity bit) on the communication lines or for other control tasks. An ASCII character therefore consumes 8 bits of memory, i.e. one byte.
- The first 32 ASCII character codes (from 0x00 to 0x1F) are reserved for control characters. From this point on, all other characters can also be used for visible purposes.
- With the ASCII codes you only have to remember one important number: 64. In the dual system that would be the number (1000000) ₂ and in the hexadecimal system the number 0x40. This number corresponds to the ASCII code for the @ sign. This is followed by the big "A", then the big "B" and so on. The big "A" has the value 65, the big "B" the value 66 and so on.
- Lowercase letters start at 97. 97 (in the decimal system) is the small "a". Numbers in turn start at 48. The (decimal) value 48 stands for a 0.
- Pro tip: Activate the number pad on your keyboard. Hold down the [Alt] key and enter the number code for an ASCII character in the number pad. As soon as you release the [Alt] key, the respective character is written. However, you should have opened a word processor beforehand. Control characters such as BS or TAB are not output as characters.
In the next practical tip, we will explain how quantum computers work.