Converting a Decimal number to a Binary number
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
Converting a Decimal number to a Binary number
Rating:
As we all know that computer runs on Binary numeral system. The binary numeral system, also called the base-2 number system, is a numeral system that represents numeric values using two symbols, 0 and 1. In computers, 0 and 1 are called bits. Bits are grouped in bytes to form binary numbers.
Nibble is a group of four bits. Sometimes it is also called a half-byte number. An example of a nibble is 1010.
Byte is a group of eight bits. An example of a byte is 10100111.
Let us have a look at the table given below:
| Position | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| Weightage | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 |
| Decimal Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
The table shows the individual values (weight) of eight bits according to their positions. Let's change a decimal number to a binary number.
To convert a binary number (a byte) to a decimal number, make a table with positional values and a blank row, as shown below:
| Positional Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Binary Symbol |
Place symbol 1 to the maximum weightage position that is not greater than the decimal number.
| Positional Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Binary Symbol | 1 |
Subtract the positional value from the original one.
201 - 128 = 73
Fill the next available maximum weightage position.
| Positional Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Binary Symbol | 1 | 1 |
Subtract the positional value from the remaining one.
73 - 64 = 9
Now the next available position to accommodate 9 is 8, as 32 and 16 are greater than 9. Place the symbol 0 to the position 32 and 16 and 1 at the position 8.
| Positional Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Binary Symbol | 1 | 1 | 0 | 0 |
9 - 8 = 1
Again...
1 is lesser than 4 and 2 so place symbol 0 at their position and put symbol 1 at position 1.
| Positional Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Binary Symbol | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 |
Here is your binary equivalent of decimal number 201 -
Isn't it easy? Ok! Practice hard to make it quick.
Rating:
Was this information helpful?
Other articles
- What is logical address?
- What is IDS?
- What is 802.11i?
- What is decapsulation?
- Tip for network security