Decimal and Binary Numbering Systems


This section starts with a description of the familiar decimal numbering system, followed by the binary numbering system.

Decimal Numbering System

The decimal numbering system should be familiar to everyone reading this book, because it's what you've been taught since early childhood. However, unless you love math, there are a few details that you might have forgotten about decimals that will help you better appreciate binary numbering; those details will be covered in this section.

Consider, for example, the number 235. The number is made up of three numerals2, 3, and 5. Numerals are simply symbols that represent a number; the word digit, short for decimal digit, is often used instead of numeral. For instance, 3 is the second digit of the number 235.

What does the number 235 really mean? Well, if you say the equivalent in English, you say something like "two-hundred thirty-five." To better appreciate how other numbering systemssuch as binarywork, consider a contrived and unusual expansion of the English language version of 235, as follows:

Two 100s, three 10s, and five 1s

It's a lot easier to say "two-hundred thirty-five" than "two 100s, three 10s, and five 1s." However, they both basically mean the same thing. You could even think of it in mathematical terms:

(2*100) + (3*10) + (5*1) = 235

Both the contrived English phrasing and the mathematical formula describe the core meaning of a multidigit decimal number. Each decimal digit represents its own value multiplied by a value associated with that digit's position in the number. It's more obvious with a table, such as Table B-1.

Table B-1. Decimal Numbering: 1s, 10s, and 100s Digits

Value Associated with That Digit or Column

100

10

1

The digits

2

3

5


With decimal numbering, the right-most digit in a number represents a value of that digit times 1; the second from the right represents the value of the digit times 10; and the third from the right represents a value of that digit times 100. This same logic continues for larger numbers, with each successive digit to the left having a value 10 times the digit to its right. In this example, the 5 means 5 times 1 because it's in the 1s column. Similarly, the single digit in the 10s column represents 3 times 10. Finally, the 2 in the 100s digit column means 2 times 100.

With decimal, each digit, going right-to-left, represents a multiple of an increasing power of 10. The rightmost digit of a decimal number lists the number of 1s, if you will, because 100 = 1. That digit is called the 1s digit. The second digit from the right is the number of 10s, called the 10s digit, because 101 = 10; the third from the right is the 100s digit, because 102 = 100; and so on.

Because you've used it all your life, the math is probably so intuitive that you really don't need to think about it to this depth. However, thinking about decimal in this way will help you appreciate binary. For instance, decimal numbering works with the 1s, 10s, and 100s digits because you only have 10 numerals to work with0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. If you count starting at 0, after you reach 9, you're out of numerals; there is no single symbol or numeral that represents the idea behind the number 10. So, to write down a number bigger than 9, you need at least two digitsone that represents a multiple of 10 and another that represents a multiple of 1.

Next, you'll see how binary numbering works on the same basic premise, but with just two numerals or digits.

Binary Numbering System

Binary numbering is just a different way to represent numbers than decimal numbering. Both decimal numbering and binary numbering use numerals or digits to represent the idea of a particular number. However, binary uses just two digits0 and 1.

Binary numbering works on the same general principles as decimal numbering, but with differences in the details. The best way to understand the similarities and differences is to look at a sample binary number. Binary is simply another way to write a number. For each decimal number, you can write the same number in binary. For instance, the following binary number is the equivalent of the decimal number 235:

11101011

If you worked with numbers a lot, it would probably be more convenient to use a three-digit decimal number, instead of this eight-digit binary number. However, sometimes it's better to work with the binary number. In particular, computers tend to process things using binary, so many computing topics require you to be able to examine and understand binary numbers. Also, when you work with networks and plan and implement IP subnetting, you need to be able to work with binary numbers.

Like with decimal, a multidigit binary number has assigned values for each digit in the number. For instance, Table B-2 shows 11101011, with values assigned to each digit.

Table B-2. Binary Numbering: 1s, 2s, 4s, 8s (and so on) Digits

Value Associated with That Digit or Column

128

64

32

16

8

4

2

1

The number itself

1

1

1

0

1

0

0

1


With decimal, the digits in a multidigit decimal number represent various powers of 10. The same kind of thing happens in binary, with the rightmost binary digit meaning the number of 1s (20), the second from the right representing the number of 2s (21), the third from the right representing the number of 4s (22), and so on.

Table B-2 shows the value associated with each digit (or column), with each being a consecutive power of 2, increasing from left to right. So, what does this really mean? Well, just like the decimal number 235 means (2*100) + (3*10) + (5*1) = 235, the binary number 11101011 means the following:

(1*128) + (1*64) + (1*32) + (0*16) + (1*8) + (0*4) + (1*2) + (1*1) = 235 decimal

If you add up the numbers, you actually get the number 235 in decimal. The numbers 235 (decimal) and 11101011 (binary) both represent the same number; they're just written in different formats.




Computer Networking first-step
Computer Networking First-Step
ISBN: 1587201011
EAN: 2147483647
Year: 2004
Pages: 173
Authors: Wendell Odom

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