translate the following IP addresses to 32 bit binary

2007-10-20 6:07 am
translate the following IP addresses to 32 bit binary formats.

1. 127.0.1.7
2. 192.2.16.3

Please give steps

回答 (1)

2007-10-24 3:42 am
✔ 最佳答案
首先, 有兩件事你要知道:
(1) ipv4的ip address以8bit為一組, 共有4組數字.
即: 32 bit = 8bit + 8bit + 8bit + 8bit;
也就是說, 最大的ip address共有32個1. 即:
11111111.11111111.11111111.11111111
= 255.255.255.255
(2) 2^0=1; 2^1=2; 2^2=4; 2^3=8; 2^4=16; 2^5 = 32; 2^6 = 64; 2^7 = 128;
任何二進制的數字都可以轉成十進制.例如:
11111111 = 2^7 + 2^6 +2^5+2^4+2^3+2^2+2^1+2^0 = 255
1011= 2^3+2^1+2^0 = 8+2+1=11
10001 = 2^4+2^0 = 16+1=17
************************
因此,
127.0.1.7
=01111111.00000000.00000001.00000111
192.2.16.3
=11000000.00000010.00010000.00000011


收錄日期: 2021-04-26 11:58:44
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20071019000051KK04959

檢視 Wayback Machine 備份