**CCNA Routing and Switching**

<< IP and Network Fundamentals Course

>> Decimal, Binary, and Hex Conversion Section

If you have mastered How to Convert Decimal to Binary, then How to Convert Decimal to Hexadecimal would be the logical next step to master. I’ll show you through examples how easy to convert from Decimal to Hexadecimal which based on easy 2 known methods. Once you master base 10 to base 2 and base 16 conversion, you will feel more confidence to move on to next articles, where this Binary to Decimal and Hexadecimal conversion take place.

**Converting Decimal to Hexadecimal**

**E.g. **Convert **212** Decimal to Hexadecimal** **

Interestingly, there are **Two** methods to convert Decimal to hexadecimal, I will demonstrate both methods below:

**Method 1:**

**Step 1:** Convert 212 decimal to **Binary first**: write down the binary chart.

128 64 32 16 8 4 2 11 1 0 1 0 1 0 0

**Step 2:** starting from the right of the binary string 11010100: split the binary string to 2 nibbles, and plug the nibbles as shown below:

128 64 32 16 8 4 2 1010 0

128 64 32 16 8 4 2 11 1 0 1

**Step 3:** Add only the **ON** places in each nibble, if the nibble happen to be all Zeros you have to write down 0.

**1 ^{st }nibble:** 0

**1**00 = 4

** 2 ^{nd} nibble: 11**0

**1**= 13 = D

**Step 4:** Always write your Hex answer starting by the **LAST Hex**: D4

Therefore, **212** decimal equal to **D4** Hex.

**Note: **It is believed that Method 1 is easier and faster than Method 2.

**Method 2:**

**Step 1: **write down the Hexadecimal Chart on piece of paper, Notice that 212 decimal is less than 256’s place, so skip 256’s place and jump to 16’s place.

**Remember:** **We are dividing:** the divisor is the Hex Place Value and the dividend is the Decimal Value.

**Step 2:** 212 / 16=13 units of 16’s place with remainder of 4 goes to 1’s place, hence 13 and 4. Now, we know 13 = D in Hex, then write 4 beside it.

**The chart will look like this one:**

256 16 10 13 4

**Verify:** 16 x 13 + 4 = 212

Therefore, **212** Decimal equal to D4 Hex.

**Reminder:** It’s important to remember that there is no such thing called 13 in Hex system. 10=A, 11=B, 12=C, 13=D, 14=E, 15=F in Hex system.

**Convert 192 Decimal to Hexadecimal**

**Method 1:**

**Step 1:** convert 192 decimal to **Binary first**: write down the binary chart.

128 64 32 16 8 4 2 11 1 0 0 0 0 0 0

**Step 2:** starting from the right of the binary string: split the string to 2 nibbles, and plug each one in a binary chart as shown below.

128 64 32 16 8 4 2 1 0 0 0 0

128 64 32 16 8 4 2 11 1 0 0

**Step 3:** Add only the **ON** places in each nibble, if the nibble happens to be all Zeros you have write down 0.

**1 ^{st} nibble: 0000** = 0

**2 ^{nd} nibble: 1100** = 12 = C

**Step 4:** Always write your Hex answer starting by the **LAST Hex**: C0

Therefore, **192** decimal equal to C0 Hex.

**Method 2:**

**Step 1:** Write down the hexadecimal chart on a piece of paper.

**Step 2:** 192 is less than 256’s place, so move to 16’s place on the chart and start your division. 192 / 16=12

256 16 10 12 0

**Verify:** 16 x 12 + 0 = 192

Therefore, **192** decimal equal to C0 Hex.

**Convert 77 Decimal to Hexadecimal
**

**Method 1:**

**Step 1:** convert 77 decimal to **Binary first**: write down the binary chart.

128 64 32 16 8 4 2 10 1 0 0 1 1 0 1

**Step 2:** starting from the right of the binary string: split the string to 2 nibbles and plug each one in its binary chart as shown below.

128 64 32 16 8 4 2 11 1 0 1

128 64 32 16 8 4 2 1010 0

**Step 3: **add only the ON places.

**1 ^{st} nibble: 11**0

**1**= 13 = D

**2 ^{nd} nibble: **0

**1**00 = 4

**Step 4:** Always write your Hex answer starting by the **LAST Hex**: 4D

Therefore, **77** decimal equal to 4D Hex.

**Method 2:**

**Step 1:** write down your Hex chart.

**Step 2:** start dividing: 77 / 16 = 4 R13. Because 80 is bigger than 77, so we have 4 units of 16s in the 16’s place with remainder of 13.

16 14 13

**Verify:** 16 x 4 + 13 = 77

Therefore, **77** decimal equal to 4D.

**Convert 172 Decimal to Hexadecimal**

**Method 1:**

**Step 1:** convert 172 decimal to **Binary first****:** write down the binary chart.

128 64 32 16 8 4 2 11 0 1 0 1 1 0 0

**Step 2:** starting from the right of the binary string: split the string to 2 nibbles. Let’s calculate instantly.

**1 ^{st} nibble:**

**11**00 = 12 = C

**2 ^{nd} nibble: 1**0

**1**0 = 10 = A

**Step 3:** Always write your Hex answer starting by the **LAST Hex**: AC

Therefore, **172** decimal equal to AC Hex.

**Method 2:**

**Step 1:** write down your hex chart.

**Step 2:** start dividing. 172 / 16= 10 with R12 quick calculation: 16 x 10=160. Therefore, we have only 10 units of 16s in the 16’s place with 12 remainder goes under the 1’s place or 12 units of 1s.

16 110 12

**Verify:** 16 x 10 + 12 = 172

Therefore, **172** decimal equal to AC Hex.

**Convert 127 Decimal to Hexadecimal
**

**Method 1: **

**Step 1:** convert 127 decimal to **Binary first**: write down the binary chart.

128 64 32 16 8 4 2 10 1 1 1 1 1 1 1

**Step 2:** starting from the right of the binary string: split the string to 2 nibbles. Save time, just pick the 1^{st} nibble from the right of the binary string and write down than write down the 2^{nd} nibble and so on.

**1 ^{st} nibble:**

**1111**= 15 = F

**2 ^{nd} nibble:** 0

**111**= 7

**Step 3:** Always write your Hex answer starting by the **LAST Hex**: 7F

Therefore, **127** decimal equal to 7F Hex.

**Method 2:**

**Step 1:** write down the Hex chart.

**Step 2:** start dividing. 127 / 16 = 7 with remainder of 15.

16 17 15

**Verify:** 16 x 7 + 15 = 127

Therefore, **127** decimal equal to 7F Hex.

**Decimal to Binary and Hexadecimal Chart**

After this practice, you should be able to know by heart all decimal value in Binary from 0 (0000) up to 15 (1111), and decimal Hex value from 10 (A) up to 15 (F).

- 0 = 0000
- 1 = 000
**1** - 2 = 00
**1**0 - 3 = 00
**11** - 4 = 0
**1**00 - 5 = 0
**1**0**1** - 6 = 0
**11**0 - 7 = 0
**111** - 8 =
**1**000 - 9 =
**1**00**1** - 10 =
**1**0**1**0 = A - 11 =
**1**0**11**= B - 12 =
**11**00 = C - 13 =
**11**0**1**= D

- 14 =
**111**0 = E - 15 =
**1111**= F

**Subject Related**

By Wikipedia Decimal | Math is Fun | Numbers Better Explained | Free Online Calculator | How to Master CCNA | R&S ICND1 and ICND2 | Network Warrior | CCNA R&S Study Guide | R&S 200-120 Official Guide | Routing and Switching Guide

"How to Convert Decimal to Hexadecimal",**CCNA Routing and Switching**

<< IP and Network Fundamentals Course

>> Decimal, Binary, and Hex Conversion Section

## LEAVE A COMMENT