Rabu, 25 Oktober 2017

180

The following is the entire conversion of 172.16.4.20 from dotted decimal notation to bina-ry notation, showing the math in all steps. Although you will learn to short-cut some of these steps, you should study this process carefully to ensure that you can perform these conversions.

To make the conversion, you need to convert each octet individually. This process begins with the conversion of the most significant octet. The following describes the steps of the conversion of decimal 172, as shown in Figure 6-2.



How To



Step 1.      Because 172 is NOT less than 128, place a 1 in the 128 position and subtract 128 (1 * 128).

Step 2.      Because 44 is less than 64, place a 0 in the 64 position and subtract 0 (0 * 64).

Step 3.      Because 44 is NOT less than 32, place a 1 in the 32 position and subtract 32 (1 * 32).



Step 4.      Because 12 is less than 16, place a 0 in the 16 position and subtract 0 (0 * 16).

Step 5.      Because 12 is NOT less than 8, place a 1 in the 8 position and subtract 8 (1 * 8).

Step 6.      Because 4 is NOT less than 4, place a 1 in the 4 position and subtract 4 (1 * 4).

Step 7.      Because 0 is less than 2, place a 0 in the 2 position and subtract 0 (0 * 2).

Step 8.      Because 0 is less than 1, place a 0 in the 1 position and subtract 0 (0 * 1).

Figure 6-2       Conversion of Decimal 172 to Binary


Step 1
172
1







172 NOT < 128
– 128
128

















Step 2
44

0






44 < 64
– 0

64
















Step 3
44


1





44 NOT < 32
– 32


32















Step 4
12



0




12 < 16
– 0



16














Step 5
12




1



12 NOT < 8
– 8




8













Step 6
4





1


4 NOT < 4
– 4





4












Step 7
0






0

0 < 2
– 0






2











Step 8
0







0
0 < 1
– 0







1











0




















1
0
1
0
1
1
0
0










Tidak ada komentar:

Posting Komentar