Character encoding standards like ASCII and Unicode define how keystrokes are translated into binary data that computers can process. ASCII uses 7 bits to represent 128 characters, while Unicode supports over 155,000 characters across 168 scripts using variable-length encodings like UTF-8.
Character Encoding Standards
Every time you press a letter on your keyboard, it sends a digital code to your computer, and then that computer processes it. But what does that digital code look like? There's actually standards out there just for that.
Your keyboard has the whole alphabet on it. In fact, it has the whole alphabet on it in lowercase, and if we use the shift key, it's also in uppercase. Plus it has all of the numbers, and if we use the shift key with those numbers, then we have special characters with it. Plus there's the space bar, plus there's a whole bunch of other keys that we can use. Each one of those is sending a code to your computer.
One example of a standard that's out there is ASCII, and ASCII converts those letters into a binary equivalent. What we see here is a capital A is represented by a string of digits here. A B is a slightly different string, and C is a slightly different string. In fact, they're just counting up, so it's counting up in binary numbers to represent all the capital letters. And then we see all of the lowercase letters here, and we see all the numbers. Once again, this is not showing all of the characters that you have, but this is a good sampling of a lot of the characters that need to be represented from your keyboard and need to be sent to the computer to be processed.
ASCII is one of the more prevalent standards that are out there. ASCII is 7 bits long, and 2 to the 7th power means that it can represent 128 different characters. Here's the list of that. So here's the binary, and then it's also listed in octal and decimal and hexadecimal, and what it represents. We can scroll through here and see all of the different stuff that's represented by ASCII. ASCII stands for the American Standard Code for Information Interchange.
Here's another standard that's out there. I'm on the Wikipedia site showing you Unicode. Unicode is another very popular standard that's out there. It has almost 155,000 characters, 168 scripts, has a bunch of emojis, and is constantly being updated. So if we scroll down here, we can see that there's updates throughout the years. In fact, it looks like they're doing an update once a year in September and adding more and more languages to it. So this is another example of a standard that's out there.
Now, the thing is that when we're supporting so many different characters and scripts and emojis, then we have to have more representation, which means a bigger number. We have to have a much bigger number to represent all these different possible combinations of stuff. And that can be problematic, because now we're not just using a byte to store a character, or seven bits to store a character, but we're using possibly several bytes to store each character. So now our documents are getting much larger.
Unicode has some interesting features to it. The first thing to note is that there are a few different encoding standards: we've got UTF-8, 16, 32. We're not going to get into the details of that here, but we are going to look at UTF-8. So I'm going to click on there and I'm going to scroll down to how it copes with this.
UTF-8 has kind of a sliding scale here, anywhere from one byte to four bytes. So it doesn't necessarily have to have four bytes representing every single character. It could just use a byte for most of our standard characters. So like the alphabet, A B C D, it's just going to use one byte for that. But then if it does something special that's a little bit less standard, then it can extend out these and use a total of four bytes here.
If it is just a single byte, it starts with a zero, and then these seven characters, y y y ZZ ZZ, those seven characters, or those seven bits, represent a character, and it represents it in ASCII. So this is actually backwards compatible. There's ASCII kind of built into this UTF-8. So if we have an A that's being represented, then it will just start with a zero, and then this code would represent the A, which I think, if I remember correctly, is 00100001. But anyways, the ASCII is built into this. So that's how this UTF-8 works, and its correlation to ASCII, which is kind of built into this, and its correlation to Unicode.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →