Appendix A. Tutorial: Working with Binary and Hex


The best way to gain an understanding of binary and hexadecimal numbering is to begin by examining the decimal numbering system. The decimal system is a base 10 numbering system. (The root deci means ten.) Base 10 means that there are 10 digits with which to represent numbers: 0 through 9. Most likely, we work in base 10 because our ancient ancestors began counting their cattle and childrenand enemieson their fingers (in fact, the word digit means finger).

The use of place values allows the representation of large numbers with a few digits, such as the 10 decimal digits. The place values of all numbering systems begin at the right, with the base raised to the power of 0. Reading to the left, each place value is the base raised to a power that is one more than the power of the previous place value:


    B4 B3 B2 B1 B0

In base 10, the first five place values are


    104 103 102 101 100

The first two place values are easy to calculate for any base. Any number raised to the power of 0 is 1; so 100 = 1. Any number raised to the power of 1 is simply that number; so 101 = 10. The third place value is easy to calculate. Simply multiply the second place value by the base. In fact, each place value can be calculated by multiplying the previous place value by the base. So, given the five place values above,


    100 = 1
    101 = 1 x 10 = 10
    102 = 10 x 10 = 100
    103 = 100 x 10 = 1000
    104 = 1000 x 10 = 10,000

So, the first five place values of the base 10 numbering system are


    10,000  1000  100  10  1

Reading a number such as 57,258 in terms of place values means there are five quantities of 10,000, seven quantities of 1000, two quantities of 100, five quantities of 10, and eight quantities of 1. That is,


    5 x 10,000 = 50,000
    7 x 1000 = 7000
    2 x 100 = 200
    5 x 10 = 50
    8 x 1 = 8

Adding these individual results together, the result is 50,000 + 7000 + 200 + 50 + 8 = 57,258.

All of us are so acquainted with working in base 10 that we seldom think of breaking a number down into its place values. However, this technique is essential to decipher numbers in other bases.




CCIE Professional Development Routing TCP/IP (Vol. 12005)
Routing TCP/IP, Volume 1 (2nd Edition)
ISBN: 1587052024
EAN: 2147483647
Year: 2005
Pages: 233

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net