Programmers learn & share
+1 vote

Problem :

Need solution on bellow problem
there are 4 bytes in an ipv4 address. what is the highest decimal value you can have for one byte?
by (6.9k points)   | 197 views

1 Answer

0 votes

Solution :

IPv4 uses 32-bit (four-byte) addresses, so it limits the address space to 4228250626 (232) addresses.

4 bytes means 32 bits so each byte can have 8 bits and maximum value of 8 bits number is 255. 11111111 in binary is equal to 255 in decimal. Therefore, is maximum range of IPv4.

And reason for this limitation may be because at that time not much IPv4 addresses were required so specs were designed this way.

by (36.1k points)  
2,183 questions
2,483 answers
241 users