# Binary to Hexidecimal

#### zrobbb

##### Distinguished
Hello guys,

I know this probably is not the site for this and if any mods think the thread should be deleted then please do so, I just figured as I am a member of this forum I may as well post as I am sure a lot of you will be able to answer. It is part of my Cisco exam and I am slightly confused

to convert binary to hexidecimal, the numbers must be grouped in to groups of 4 and then each group is converted to hexidecimal repsectively.

For example:
101100110010 should be split into groups of 4 and will look like this
1011 | 0011 | 0010 and then it is easily converted to B32

But what if the number cannot be divided into groups of 4 such as
1111000001. If that is grouped into 4 it will look like this 1111 | 0000 | 01, this cannot be converted to hexidecimal.

I have a feeling you add 0's to start until there is an amount of numbers that can be divided by 4.

Can someone please just confirm or deny this.

Thanks very much
Rob

##### Titan
Moderator
You start grouping from the right, not the left. Pad with 0's on the left to make a 4 bit group. From your example above:

1111000001 = 0011 | 1100 | 0001 = 0x3C1

Question Coax Ethernet
Replies
7
Views
1K
Replies
2
Views
621
Replies
8
Views
1K
Replies
16
Views
1K
Replies
2
Views
786