Have you ever wondered how computers, calculators, or your smartphone can do so many amazing things? It all starts with a very simple concept: numbers. But these devices don’t use numbers in the same way we do. They have their own special languages. In this post, we’ll break down the core ideas of Number System and Codes to understand digital languages.
We use the decimal system (base 10) every day, with its ten digits (0-9). This system is natural for us because we have ten fingers. But for a computer, which is made of billions of electronic switches, it’s much simpler to use a system with only two digits.
This is the binary system (base 2). It uses only 0 and 1.
Binary numbers can get very long and difficult for humans to read. For example, the number 227 in binary is
11100011
. That’s a lot to write down without making a mistake!
This is where the hexadecimal system (base 16) comes in. It acts as a convenient shorthand for binary. It uses 16 symbols: the digits 0-9 and the letters A-F (where A=10, B=11, …, F=15).
The magic of hexadecimal is that every single hex digit represents a group of exactly four binary digits (bits).
1110
is 14
in decimal, which is represented by the hex digit E
.0011
is 3
in decimal, which is the hex digit 3
.11100011
can be written simply as E3
in hexadecimal. Much easier, right?What if you want to work with decimal numbers but store them in a way that’s easy for digital circuits to handle? That’s the idea behind Binary Coded Decimal (BCD).
In BCD, you don’t convert the entire decimal number to binary. Instead, you convert each decimal digit into its own four-bit binary equivalent.
97
.
97
is 01100001
.9
and the 7
separately:
9
= 1001
7
= 0111
97
in BCD is 1001
0111
.BCD makes converting to and from decimal very easy, which is why it’s often used in devices with decimal displays like digital clocks and multimeters.
Beyond just representing numbers, computers need codes for other things:
Understanding these different systems and codes is fundamental to digital electronics. Each one has a specific purpose, whether it’s for the core operation of the computer (binary), for human convenience (hexadecimal), for easy display (BCD), or for reliable operation (Gray code).
Let's connect with me
2025 Muhamad Rizki Kadafi. All Rights Reserved.