- The Bridged
- Posts
- Encoding
Encoding
How Computer Data is Conveyed for Easy Processing
Encoding
Encoding is the process of turning computer data into specific formats for different uses. In this post I’ll be discussing encoding which allows binary data to be portrayed in human-readable formats.
Encoding can be explained theoretically by using a familiar example in computing and relating the letters in that example to their positions in the alphabet and then representing those positions in the form of binary.
When we look at the word “Hello” in the phrase Hello World, we know that the positions of the letters in the world hello, starting from left to right are 8, 5, 12, 12, and 15 respectively.
In Binary these would be represented as 1000, 0101, 1100, 1100, and 1111 respectively.
This means in such a theoretical model, a computer would recognise these binary strings and map them into readable letters based on their corresponding alphabetical positions using the encoding system created to enable this.
ASCII
ASCII which stands for American Standard Code for Information Interchange is one of the first encoding models created and works in a similar way to the theoretical model we outlined above.
Below is a table which outlines the character set used in ASCII.

Across the top row we have the Hexadecimal values and the column on the left indicates multipliers for those values.
In this ASCII character set not only do we have numbers represented in binary but we also start with non-printable control characters which are often used to represent instructions, control parameters for devices for e.g. or to represent delimiters within data being encoded.
The character set also includes printable punctuation characters used in grammar.
As mentioned earlier, ASCII is one of the first encoding models created and since then we have introduced and added onto ASCII with more models such as UTF-8 which is more commonly used nowadays. UTF-8 allows for multiple bytes of data to be encoded meaning we can now represent and communicate more complex forms of information than we could in the past.
Colour
We have covered how characters and symbols can be represented however what about colour?
Colour is a prominent feature not just in pictures and videos but also on any displays that we use on a regular basis.
RGB encoding is a model that displays colour by combining a certain amount of red, green and blue to create different colours. These amounts of red, green and blue are represented and encoded by a numeric value.
An easy way to understand this is by using an RGB colour picker tool and sliding it to white. We see that the numbers for red, green and blue in this case are all up at 255 because white contains all the colours of the spectrum. If we slide the picker to black then all the numbers for red, green and blue are at 0 as of course black has none of the colours on the spectrum.
The slider can also be moved over to red, green and blue to see that the numbers for each of these colours respectively will be up near or at 255 while the other 2 will be down near or at 0.
These RGB values are in decimal but can also be represented as hexadecimal values with 6 digits. This can be easier to remember for a specific colour shade that is preferred instead of remember the individual decimal values for R, G and B.
Pictures, Videos and Pixels
Having colour encoded as RGB is the starting point to being able to collate those colours to display images on a display. This is done in the form of pixels on our monitors.
If we think of our monitors as a collection of pixels, each pixel being able to display a colour and those pixels are arranged in an array, that array can be seen as a table with cells on our monitors. The cells can then be numbered based on values on the X and Y axes starting from 0 and branching out from there.
With this array format, we can apply a number to each pixel that has a place in the array and displays a certain colour. From here we can encode which colour needs to belong where on a monitor by assigning the relevant pixel in that location a colour number.
This concept can be expanded into video by adding the component of time and dynamically changing the locations of these pixels across time to generate motion.