#30daysofcybersecurity Day 24: BINARY, HEXADECIMAL, AND DECIMAL NUMBERING SYSTEMS
Several networking features and protocols rely on binary and hexadecimal numbers to code bit maps, subnet masks, and network addresses. So understanding numbering systems is vital because they affect many networking features and protocols.
DECIMAL NUMBERS
They are built using digits 0 to 9. Ten digits can build a number, that’s why it’s called the decimal system (deci meaning ten in Latin). It is also called the base 10 numbering system because all numbers in the decimal system are based on a power of 10.
The position of a digit in a decimal number determines its value. We learned in school that two-digit decimal numbers are worth 10 or more, three-digit numbers are 100 or more, four-digit numbers are 1,000 or more, and so on. For example, 11 and 36 are two-digit numbers, 120 and 250 are three-digit numbers, and 1,492 and 2,009 are four-digit numbers.
BINARY SYSTEM
Binary numbers only contain 0s and 1s. They are called binaries because they can only have two possible digits, 1 and 0 can easily represent “electrical signal” and “no electrical signal” respectively. That’s why all computer systems operate on binary numbers at their most basic level. Everything is convertible to 1s and 0s represented electrically by “signal” and “no signal” in electronic circuits.
The binary system is similar to the decimal system
- The position of a digit in a binary number determines the value
- The binary system is built on 2 because you only have 2 digits to work with
- The binary system is also called a 2-based numbering system or simply, base 2
HEXADECIMAL NUMBERS
They are built using 16 digits, 0 to 9 and A to F. Digits 0–9 represent values up to 9 digits, and A to F represent values 10 to 15. Sixteen possible digits exist in the hexadecimal numbering system. Every hexadecimal number represents exactly 16 bits or 2 bytes made up of 8 bits each. 1 byte can be represented with a single hexadecimal value.
BITS, NIBBLES AND BYTES
- A bit is one single binary value, either 0 or 1
- A nibble is a group of 4 bits, also a single hexadecimal digit
- A byte is a group of 8 bits. A byte is also 2 nibbles. This is the basic unit of measurement in the computer industry. Memory size and hard drive space are measured in megabytes (million bytes), gigabytes (billion bytes), and terabytes (trillion bytes).
CF: Visit the videos on how to convert hexadecimal numbers to binary numbers and vice versa.