Computers can only understand binary digits, making encoding essential

Computers can only understand binary digits, making encoding essential

Encoding is the conversion of data into text like ASCII or Unicode, which can be easily converted into binary language.

It's not just characters that are encoded; images and videos are also encoded.

Types of Encoding Techniques

1.????? Character Encoding

2.????? Image and Audio and Video Encoding

However, in this article, we will delve deeply into character encoding.

Character encoding defines a mapping between text and bytes for e.g Character A can be represented into bytes as 01000001 in UTF-8 Encoding system .Further as in HTML we normally declare a character encoding of UTF-8, using the following line:

<meta charset="utf-8" />

This ensures that you can use characters from just any human language in your HTML document, and they will display reliably.

We have different character encoding systems as discussed below

  1. ASCII Encoding

  • American Standard Code for Information Interchange?(ASCII) is a type of character-encoding.
  • Th ASCII code is used to represent English characters as numbers which can later converted into binary, where each letter is assigned with a number from?0 to 127.?
  • The original ASCII was a 7-bit character set (128 possible characters)
  • Currently used ASCII is an 8-bit code. That is, it uses eight bits to represent a letter or a punctuation mark.
  • Character sets used today are generally 8-bit sets with 256 different characters, effectively

2. Unicode Encoding

  • Unicode is a universal character set that defines all the characters needed for writing the majority of living languages in use on computers.
  • Unicode aims to be (and already is) a superset of all other encoded computer character sets.
  • UTF-8 requires 8, 16, 24 or 32 bits (one to four?bytes) to encode a Unicode character,
  • ?UTF-16 requires either 16 or 32 bits to encode a character
  • ?UTF-32?always requires 32 bits to encode a character.

3. Base64

  • Years ago, when mailing functionality was introduced, so that was utterly text based, as the time passed, need for attachments like image and media (audio,video etc) came into existence.
  • When these attachments are sent over internet (which is basically in the form of binary data), the probability of binary data getting corrupt is high in its raw form. So, to tackle this problem Base64 came along.
  • Base64 encoding is commonly used in web development to represent binary data, such as images or files, as American standard code for information interchange (ASCII) text.
  • Base64 encoding is a simple and widely supported method for embedding multimedia content directly into web pages or data exchanges

4. URL Encoding

  • URL Encoding Convert character in such a format that can transmitted over internet.

要查看或添加评论,请登录

Shehzad Naeem的更多文章

  • Force Envelope

    Force Envelope

    A smart designer plans for the worst, making the envelope concept absolutely necessary. Imagine a skyscraper during a…

  • Shell thin or Membrane?

    Shell thin or Membrane?

    Your choice depends on your situation. For a slab that won't bear weight, opt for a membrane.

社区洞察

其他会员也浏览了