Choose two examples to explain the usage of Hexadecimal to IP conversion and vice versa, and also briefly explain why we use it?
IP addressing 1p4 4 to 1pv6 need:
In this era the number of devices
increase which communicate via internet and whenever we communicate via intent
we must requires ip, the usage is increasing day by day and there is a lot of
devices introduce in the market which work via internet and which handle and
control via internet and every device requires specific ip for this purpose.
There for ipv4 is address limited and ipv6 is released which is four time address
length in Ipv and its 128 bit and 16 byte address.
Why we need hexa to binary conversion:
As we know that our computer
system only understand the language of binary which is (0,1) every digital
device, circuits chips build via this 0,1 series and circuits, computer only
understand this language. We use as front end human near language but in
backend of computer system conversion is automatically done very rapidly which
even took miner seconds even less then neon seconds and we human cannot detect
that speed and we never wait for the conversion because this work is done very
quickly.
For this purpose it requires to
convert the hexa address into binary o’s and 1’s
As we know in hexa for
representation 0-10 we use decimal other represent as English word like A to F.
10 |
A |
11 |
B |
12 |
C |
13 |
D |
14 |
E |
15 |
F |
HEXA TO BINRY CONVERSION:
For this conversion we suppose ip
address of any class
Like
192.168.2.4 Which is address of class c and there is 4 octet
Conversion
Step1
Separate every octet
Step2
Every octet write 8 bit binary
using 1 2 4 table method
Step 3
Then write in the form of hexa
notation
Example:
Let’s convert the above ip in
hexa
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
1 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
For 192 above bit on other will off.
So binary for 192: 1100000
1100 =12
8 |
4 |
2 |
1 |
0 |
1 |
1 |
0 |
0000 = 0
8 |
4 |
2 |
1 |
0 |
0 |
0 |
0 |
In the same way convert other as
well
Let’s convert the above ip in
hexa
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
For 192 above bit on other will off.
So binary for 168 : 10101000
1010 =10
1000 =8
Let’s convert the above ip in
hexa
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
For 2 above bit on other will off.
So binary for 2 : 00000010
0000 =0
0010 =2
Let’s convert the above ip in
hexa
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
For 4 above bit on other will off.
So binary for 4: 00001000
0000 =0
0100 =4
After this separate 8 bit into
nibble take pair of 4, 4 bit and write it as hexa
1100 =12 0000
= 0
8 |
4 |
2 |
1 |
0 |
1 |
1 |
0 |
8 |
4 |
2 |
1 |
0 |
0 |
0 |
0 |
1010 =10
8 |
4 |
2 |
1 |
1 |
0 |
1 |
1 |
0000 = 0
1000 = 8
8 |
4 |
2 |
1 |
1 |
0 |
0 |
0 |
0010 =
2
8 |
4 |
2 |
1 |
0 |
0 |
0 |
0 |
0000 = 0
8 |
4 |
2 |
1 |
0 |
0 |
1 |
0 |
0100 = 4
8 |
4 |
2 |
1 |
0 |
0 |
0 |
0 |
8 |
4 |
2 |
1 |
0 |
1 |
0 |
0 |
192.168.2.4 after conversion:
Binary:
11000000.10101000.00000100.00000010
Hexa: 00C0.00A8.0004.0002
0 comments:
Post a Comment