CCNA HUB

CCNA and Linux Training Hub!

CCNA and Linux Training Hub!

  • Home
  • R&S
    • IP Fundamentals
    • Switching
    • Routing
    • IPv4 Suite
    • IPv6 Suite
    • Labs
  • Linux
    • Virtualization 101
    • Basic Configuration
    • Security Measures
    • Database Server
    • Web Server
    • HTTP Tuneup
    • FTP Server
    • Mail Server
    • DNS Server
    • Control Panels
    • Monitoring
    • Backup and Maintenance
  • WordPress
  • About
    • Contact Us
    • Be part of It
    • Under the Hood
CCNA HUB > Blog > IP Fundamentals > Decimal, Binary, and Hexadecimal Conversion > How to Convert Decimal to Hexadecimal

How to Convert Decimal to Hexadecimal

By Imad Daou Leave a Comment

Post Views: 8,664

CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> Decimal, Binary, and Hex Conversion Section

section table
  1. Understanding Base Number Systems
  2. How to Convert Decimal to Binary
  3. How to Convert Decimal to Hexadecimal
  4. How to Convert Binary to Decimal
  5. How to Convert Binary to Hexadecimal
  6. How to Convert Hexadecimal to Decimal
  7. How to Convert Hexadecimal to Binary
Image Source
Image Source

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  1
  1   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  1
                 0  1  0  0
128  64  32  16  8  4  2  1
                 1  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.

1st nibble: 0100 = 4

 2nd nibble: 1101 = 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  1
  0  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  1
  1   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  1
                 1  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.

1st nibble: 0000 = 0

2nd 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  1
  0  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  1
  0   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  1
                 1  1  0  1
128  64  32  16  8  4  2  1
                 0  1  0  0

Step 3: add only the ON places.

1st nibble: 1101 = 13 = D

2nd nibble: 0100 = 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  1
 4  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  1
  1   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.

1st nibble: 1100 = 12 = C

2nd nibble: 1010 = 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  1 
10  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  1
0     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 1st nibble from the right of the binary string and write down than write down the 2nd nibble and so on.

1st nibble: 1111 = 15 = F

2nd nibble: 0111 = 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  1
7   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 = 0001
  • 2 = 0010
  • 3 = 0011
  • 4 = 0100
  • 5 = 0101
  • 6 = 0110
  • 7 = 0111
  • 8 = 1000
  • 9 = 1001
  • 10 = 1010 = A
  • 11 = 1011 = B
  • 12 = 1100 = C
  • 13 = 1101 = D
  • 14 = 1110 = 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

CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> Decimal, Binary, and Hex Conversion Section

section table
  1. Understanding Base Number Systems
  2. How to Convert Decimal to Binary
  3. How to Convert Decimal to Hexadecimal
  4. How to Convert Binary to Decimal
  5. How to Convert Binary to Hexadecimal
  6. How to Convert Hexadecimal to Decimal
  7. How to Convert Hexadecimal to Binary
  • Was this information helpful?
  • Yes(0)   No(0)
Get CCNA R&S Updates!

system-software-update-hi

Filed Under: IP Fundamentals, Decimal, Binary, and Hexadecimal Conversion Tagged With: Binary, Decimal, Hexadecimal

About Imad Daou

CCNA HUB Founder, Imad has been in IT field since 2007. Currently holding A+, Network+, Server+, Security+, and Storage+. HP, Dell, and IBM Hardware Certified. Pursuing Linux+, LPIC-2, RHCSA, RHCE, AWS, CCNA, and JNCIA.

LEAVE A COMMENT Cancel reply

We're glad you have chosen to leave a comment. All comments are moderated according to our comment policy. Use your real name and not keywords in the name field. Let's have a personal and meaningful conversation.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

Get CCNA HUB Updates!

MISSION

CCNA, Linux, and Wordpress Training Hub. For Students, Network Pros, DevOps, Linux/Wordpress Lovers, and Entrepreneurs. CCNA HUB Articles and Labs will help you build a solid foundation in Network, Linux, and Wordpress. E.g. Linux WHS will show you how to build a Professional Web Hosting Solution using DigitalOcean or Vultr VPS provider.

TAG CLOUD

understanding switching TCP/IP virtual circuit transport layer protocols VPS Hosting understanding Routing wide area network udp sockets su transport layer wordpress CMS VLSM subnet mask wordpress.org CMS SSH Client sudo T1 tcp sockets Wordpress Multisite SSH Agent Forwarding switches TCP Wordpress Hosting Hub transmission control protocol WAN

RSS UPDATES

  • IP Fundamentals
  • CCNA R&S
  • CCNA Labs
  • Linux WHS
  • Wordpress
  • All CCNA HUB Topics

Copyright © 2022 ·Genesis Sample Theme - Genesis Framework by StudioPress - WordPress - Log in

This website uses cookies. By continuing to browse the site, you are agreeing to our use of cookies
  • Home
  • R&S
    • IP Fundamentals
    • Switching
    • Routing
    • IPv4 Suite
    • IPv6 Suite
    • Labs
  • Linux
    • Virtualization 101
    • Basic Configuration
    • Security Measures
    • Database Server
    • Web Server
    • HTTP Tuneup
    • FTP Server
    • Mail Server
    • DNS Server
    • Control Panels
    • Monitoring
    • Backup and Maintenance
  • WordPress
  • About
    • Contact Us
    • Be part of It
    • Under the Hood