Binary and IP Address
Binary and IP Address
8 bits = 1 byte
0 1 1 0 1 1 1 0
1 byte
20 --> 1 x 1 = 1
21 --> 2 x 1 = 2
22 --> 2 x 2 = 4
23 --> 2 x 2 x 2 =8
HEXADECIMAL
23 22 21 20
8 4 2 1
8 + 4 = 12
8 + 4 + 2 =14
8 + 4 + 2 +1 = 15
Do note that IN THE CHART, anywhere you see 1, it means it is on.
If you see 0, then it means it is off.
8 + 4 = 12
8 + 4 + 2 =14
8 + 4 + 2 +1 = 15
HEXADECIMAL
23 22 21 20 DECIMAL
8 4 2 1
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 A (10)
1 0 1 1 B (11)
1 1 0 0 C (12)
1 1 0 1 D (13)
1 1 1 0 E (14)
1 1 1 1 F (15)
CONVERTING DECIMAL TO BINARY
BINARY
27 26 25 24 23 22 21 20
20 --> 1 x 1 = 1
21 --> 2 x 1 = 2
22 --> 2 x 2 = 4
23 --> 2 x 2 x 2 =8
24 --> 2 x 2 x 2 x 2 = 16
25 --> 2 x 2 x 2 x 2 x 2 = 32
26 --> 2 x 2 x 2 x 2 x 2 x 2 = 64
27 --> 2 x 2 x 2 x 2 x 2 x 2 x 2 = 128
BINARY
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
20 --> 1 x 1 = 1
21 --> 2 x 1 = 2
22 --> 2 x 2 = 4
23 --> 2 x 2 x 2 =8
24 --> 2 x 2 x 2 x 2 = 16
25 --> 2 x 2 x 2 x 2 x 2 = 32
26 --> 2 x 2 x 2 x 2 x 2 x 2 = 64
27 --> 2 x 2 x 2 x 2 x 2 x 2 x 2 = 128
BINARY
27 26 25 24 23 22 21 20 DECIMAL
128 64 32 16 8 4 2 1
1 1 1 1 1 0 1 0 250
1 0 0 0 0 0 1 0 130
1 1 1 1 1 1 1 1 255
0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 255
IP ADDRESS
There are two main type of IP Address
Internet Protocol version 4 (IPv4)
Internet Protocol version 6 (IPv6)
We will be looking at the IPv4 since that is what is currently mostly used
as at now.
IPv4 address is divided into four parts with each of the parts called an
octet.
IPv4 ADDRESS OCTETS
192.168.2.1 192.168.10.20 10.15.8.1 172.9.254.220
0.0.2.0 255.255.255.255