![]() |
Answer: The IPv6 address is basically represented in binary by converting the each hexadecimal segment into its 16-bit binary, which is separated by colons.IPv6 Address FormatThe IPv6 address has the 128 bits, which are grouped into the eight-16 bits. Hexadecimal to BinaryThe each block of an IPv6 address is represented into the four-digit hexadecimal number. Example: Hexadecimal of digit “A” is “1010” in Binary. Pad ZerosWe need to make sure that each binary representation of the hexadecimal address digit is four bits long by adding the leading zeros if required. Group Binary DigitsWe need to group the binary digits of each 16-bit block into the sets of four, separated by the spaces. Representation in BinaryThen lastly, write the binary representation of each 16-bit block separated by the colons, for maintaining the original grouping and spacing. Example:IPv6 Address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 1. Convert each hexadecimal digit to binary: 2001: 0010 0000 0000 0001 2. Combine the binary representations with colons: 0010 0000 0000 0001 : 0000 1101 1011 1000 : 1000 0101 1010 0011 : 0000 0000 0000 0000 : |
Reffered: https://www.geeksforgeeks.org
GATE CS |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |