IPv6: Base Explanations


There may be broken links in this article, the GROK staff has been notified and is working to resolve the issue.

 

Binary:

The binary number system is base 2. The only numbers in the system are 0 and 1.

In binary, numbering follows powers of 2 instead of powers of 10 like in decimal.
 

Decimal: 11000210031041 = 1234
Binary: 18141211 = 15

If a 0 is present, the value is not counted since 0 to any power is still 0.

Decimal Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111

For purposes of understanding IPv6 addressing, it is not necessary to be familiar with anything higher than the table above.


Hexadecimal:

Unlike base 10 which most people are used to, hexadecimal is base 16. So instead of carrying a 1 after counting to 9 like in decimal, you will instead place an A and go through F.

Decimal Hexadecimal
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F

F is the final letter used in hexadecimal notation. After F, hexadecimal operates like base 10 in that you carry a 1. Ex: C D E F 10 11 12 … 1F 20 21 22, etc
 

Bit and Nibble:

A bit is defined as a binary digit. This means a bit can either be 0 or 1.

A nibble is comprised of 4 bits. Ex: 0011, 0101, etc.

Bits and nibbles are important in understanding how hexadecimal notation works. Each hexadecimal digit is one nibble. So in the previous table 3 = 0011, 7 = 0111, B = 1011, etc.

To convert from a string of bits to hexadecimal, first group the bits into nibbles:
 
Initial string: 0011110110000000
Separated into nibbles: 0011 1101 1000 0000

Finally convert each nibble into its hexadecimal equivalent:
 
Hexadecimal string: 3 D 8 0
 
 
Referenced from: IPv6

 
12692
6/20/2019 11:22:01 AM