Internet address(IP address)
: TCP/IP 프로토콜 제품군의 IP 계층에서 인터넷에 연결된 각 장치를 식별하는 데 사용되는 실별자
IPv4
Change the following IPv4 addresses from binary notation(2진법) to dotted-decimal notation(10진법).
| 10000001 | 00001011 | 00001011 | 11101111 |
|---|---|---|---|
| 128 + 1 | 8 + 2 + 1 | 255 - 16 |
: 129.11.11.239
11000001 10000011 00011011 11111111
: 193.131.27.255
11100111 11011011 10001011 01101111
: 231.219.139.111
11111001 10011011 11111011 00001111
: 249.155.251.15
Change the following IPv4 addresses from dotted-decimal notation to binary notation.
| 111 | 56 | 45 | 78 |
|---|---|---|---|
| 64+32+8+4+2+1 | 32+16+8 | 32+8+4+1 | 64+8+4+2 |
| 01101111 | 00111000 | 00101101 | 01001110 |

4.75.45.34.78
: 01001011 00101101 00100010 01001110
Find the error, if any, in the following Ipv4 addresses
1. 111.56.045.78
:
045에 0이 없어야 한다 (10진수 표기)
221.34.7.8.20
:
IPv4는 32비트 주소이다. 위의 주소는 8비트를 더 가지고 있다.
75.45.301.14
:
IPv4는 한 바이트 당 0 ~ 255( = 256)까지의 숫자를 가질 수 있다. 301은 255를 넘었다.
11100010.23.14.67
:
2진수와 10진수가 혼합되어 있다. 하나로 맞춰 주어야 한다. (226.23.14.67)
Change the following IPv4 addresses from binary notation to hexadecimal notation(16진수).
0X810B0BEF or
-> 16진수 표기라는 것을 나타내 주어야 함
| 11000001 | 10000011 | 00011011 | 11111111 |
|---|---|---|---|
| 1100/0001 | 1000/0011 | 0001/1011 | 1111/1111 |
| 12/1 | 8/3 | 1/11 | 15/15 |
| C1 | 83 | 1B | FF |
0XC1831BFF or
Find the number of addresses in a range if the first address is 146.102.29.0 and the last address is 146.102.32.255
(주소 범위 구하기)
:
Last address - First address
(146.102.32.255) - (146.102.29.0) = 0.0.3.255
= 0 + 0 + 768 + 255 + 1= 1024
-> +1을 하는 이유는 last address를 포함하기 위함
The first address in a range of addresses is 14.11.45.96. If the number of addresses in the range is 32, what is the last address?
(범위가 32일 때 last address는?)
:
First address + (Range -1)
14.11.45.96 + 0.0.0.31 = 14.11.45.127
-> -1을 하는 이유는 First address 하나를 제외한 것
| Input | Output |
|---|---|
| 0 | 1 |
| 1 | 0 |
| Original number | 00010001 | 01111001 | 00001110 | 00100011 |
|---|---|---|---|---|
| NOT operation | 11101110 | 10000110 | 11110001 | 11011100 |
| Original number | 17 | 121 | 14 | 35 |
|---|---|---|---|---|
| NOT operation | 238 | 134 | 241 | 220 |
| Input1 | Input2 | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
-> 둘다 1인 경우에만 1
| num1 | 00010001 | 01111001 | 00001110 | 00100011 |
|---|---|---|---|---|
| num2 | 11111111 | 11111111 | 10001100 | 00000000 |
| result | 00010001 | 01111001 | 00001100 | 00000000 |
| num1 | 17 | 121 | 14 | 35 |
|---|---|---|---|---|
| num2 | 255 | 255 | 140 | 0 |
| result | 17 | 121 | 12 | 0 |
14 && 140
14 =
140 =
-> result = = 12
| Input1 | Input2 | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
-> 둘 중 하나라도 1인 경우에 1
| num1 | 00010001 | 01111001 | 00001110 | 00100011 |
|---|---|---|---|---|
| num2 | 11111111 | 11111111 | 10001100 | 00000000 |
| result | 111111111 | 11111111 | 10001110 | 00100011 |
| num1 | 17 | 121 | 14 | 35 |
|---|---|---|---|---|
| num2 | 255 | 255 | 140 | 0 |
| result | 255 | 255 | 142 | 35 |
14 | | 140
14 =
140 =
-> result = = 142