What are binary numbers?

Probably you wonder: what are binary numbers? Well it's not really that difficult to understand what are binary numbers.

Computers and digital electronic devices make use of digital logic that can only understand on- and off-signals. An on-signal is represented by a 1 and a off-signal is represented by a 0. These zero- and one-states are the fundamentals upon which all digital logic is based.

Exponentation

In order to understand number systems better, you must understand how exponentation works. Exponentation may sound difficult, but it's not really difficult to understand. Exponentation is written in the following form: an, where a is the base and n the exponent (or power). When n is positive, then exponentation can be explained by repeated multiplication. For example: in 102, 10 is the base and 2 is the exponent. The result of 102 = 10 * 10 = 100, in other words: 10 is multiplied twice with itselves. The result of 73 = 7 * 7 * 7 = 343.

The decimal number system

We make daily use of the decimal number system. It's one of the many different number systems. The (exponential) base of our decimal number system is 10. The digits that make up the decimal number system are: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. We represent numbers with these digits. The position of each digit in a number determines the value of the digit.

As an example in the number 742, the 7 represents 7 times 102 = 700, the 4 represents 4 times 101 = 40 and the 2 represents 2 times 100 = 2. So 700 + 40 + 2 = 742. By the way, in case you wondered, 100 equals 1, so 2 times 1 = 2.

102 101 100
7 4 2

The binary number system

In the binary number system, the (exponential) base is 2. The only digits that make up the binary number system are: 0 and 1 and these digits are also called bits. The position of a bit in binary numbers also - just like in the decimal number system - represents the value of the bit, but then by which power of 2 is represented.

An example will make this clearer. Since binary numbers only exists of 0's and 1's, say we have binary number 10110010. You will wonder what this binary number represents. Well actually it's quite simple. Again I will put this now binary number in a table to make it more clear.

27 26 25 24 23 22 21 20
1 0 1 1 0 0 1 0

So, this binary number represents: (1 * 27) + (0 * 26) + (1 * 25) + (1 * 24) + (0 * 23) + (0 * 22) + (1 * 21) + (0 * 20), or written in decimal numbers (1 * 128) + (0 * 64) + (1 * 32) + (1 * 16) + (0 * 8) + (0 * 4) + (1 * 2) + (0 * 1). The result of this sum is: 128 + 32 + 16 + 2 = 178.

So binary number 10110010 represents the value of 178 in our decimal number system. I hope this makes sense. In case you wondered, 20 also equals 1.

Counting in binary numbers is done in a same manner as we count in decimal numbers. The way counting is done in binary can best be represented in a table.

binary binary with leading zero's decimal
0 0000 0
1 0001 1
10 0010 2
11 0011 3
100 0100 4
101 0101 5
110 0110 6
111 0111 7
1000 1000 8
1001 1001 9
1010 1010 10
1011 1011 11
1100 1100 12
1101 1101 13
1110 1110 14
1111 1111 15

A binary number of 8 bits is also called 'a byte'. A byte is always 8 digits long. A kilo-byte contains 1024 bytes or 1024 * 8 = 8192 bits.

You can experiment with binary numbers by using a binary calculator. There are many available for free on the internet. For example give this one a try.

The hexadecimal number system

The hexadecimal number system uses as the exponential base the number 16. The digits that make up the hexadecimal number system are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. You probably wonder why letters A - F are used. Well, actually it's another notation for the values 10 until 15 in order to make writing hexadecimal numbers easier.

Here's another example. Say, we want to know what the decimal value of hexadecimal value A4C is. I try to make this clear by using a table.

162 161 160
A 4 C

We can now calculate the decimal value as follows: (10 * 162) + (4 * 161) + (12 * 160). Note that the letter 'A' stands for a value of 10 and the letter 'C' stands for a value of 12. So the decimal number representation for hexadecimal number A4C is: 2560 + 64 + 12 = 2636.

Generally, hexadecimal numbers are shorter than their equivalent decimal or binary values.

Hopefully, my explanation is clear enough and understand what are binary numbers. In case you have questions, please contact me.

What are binary numbers