|
Figure 1.
The number 37 is shown in nonpositional notation with
groupings of 5.
|
|
Doing the Math: Computers and
Binary Numbers
Numbers and
Notations
Number is an abstract concept. To talk about, record, and work with numbers,
we use representations of numbers--called a notation. In everyday
life, we use the notation based on decimal digits. But the decimal system
is only one of many possible notations that can be used to represent numbers.
Nonpositional
Notations
The earliest notations used a single mark (|) to represent the quantity
'one.' Greater quantities were composed of additional marks like this
| | | = 3
| | | | = 4
and so on
Larger quantities might employ grouping. For example,
Figure 1 depicts the decimal number 37. As you can see, a nonpositional
notation like this one has some decided drawbacks.
- representing large quantities is inconvenient because the size of
the representation grows on the same scale as the quantity itself.
- there is no way to represent 0, negative values, or
fractions.
- arithmetic operations are simple, but inconvenient
and cumbersome--especially for larger quantities.
Roman numerals offered some improvements offer
a simple nonpositional notation. Namely, the size of the representation
could be reduced even when the scale of the quantity increased. For example,
XXXVII = 37
Each
X = 10,
V = 5,
I = 1
The Roman numeral notation offered another innovation
as well. Normally, the symbols in a Roman numeral expression are sorted
or arranged in descending order. But, there is an important exception.
The position or location of some symbols conveyed a special meaning. For
instance,
IV does not equal VI
Specifically, a I before a symbol denoting a larger value
signifies -1; whereas a I after a symbol denoting a larger
value signifies +1.
The Roman numeral notation lacks the capability
of representing 0, negative numbers, and fractions. Arithmetic operations
are still tedious.
Questions
1. How would you perform the following arithmetic operations using a
simple nonpositional notation? (Hint: Don't think of this as a problem
involving decimal values. How would you solve it manipulating these symbols?)
Positional
Notations
The idea of reserving a special meaning for the order and location of
symbols in a notation is important. If we extend it to every symbol, we
can eliminate most of the problems associated with nonpositional notations.
The decimal system is a prime example of a positional notation. For example,
37 = 30 + 7 = 3 X 101 + 7
X 100
Each symbol or digit is a coefficient of a product of a
power of 10.
100 = 1
101 = 10
102 = 100
103 = 1,000
104 = 10,000
105 = 100,000
106 = 1,000,000
and so on.
Thus, a decimal digit number with n-digits expresses a
sum of the products of digits times powers of 10 from n-1,
n-2, and so on down to 0. The first digit in the sequence is
called the most significant digit because it is the
coefficient with the largest power, 10n-1. Each
succeeding digit in the sequence decreases in significance.
The last digit is the least signficant digit because
it is multiplied by 100 (or 1).
Similiarly, fractions can be represented as reciprocals
or powers with negative exponents.
10-1 = 1/101 =
1/10
10-2 = 1/102 = 1/100
10-3 = 1/103 = 1/1000
10-4 = 1/104 = 1/10000
and so on.
Here are some examples.
|
4701
|
= 4 X 103 + 7 X 102 + 0
X 101 + 1 X 100
|
|
|
= 4000 + 700 + 0 + 1
|
|
|
|
|
1.375
|
= 1 X 100 + 3 X 10-1 +
7 X 10-2 + 5 X 10-3
|
|
|
= 1 + 3/10 + 7/100 + 5/1000
|
|
|
= 1 + 300/1000 + 70/1000 + 5/1000
|
|
|
= 1 + 375/1000
|
The decimal positional notation is so second nature
to us that we seldom give a thought to such expansions. Negatives, of
course, are usually expressed with a '-' sign prefixed to the expression.
Binary
Numbering
Computers, we know, use an altogether different notation, binary numbering.
The binary system is a (weighted) positional notation like the decimal
system. The difference is that it is base-2 rather than base-10. The decimal
system uses powers of 10, as we have seen, as well as employing ten distinct
symbols for digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Binary is base-2 which means that it employs powers
of 2 for its expression of signficance and has only two distinct symbols
for digits: 0 and 1.
Here are some examples.
|
1110
|
= 1 X 23 + 1 X 22 + 1 X
21 + 0 X 20
|
|
|
= 8 + 4 + 2 + 0
|
|
|
= 14
|
|
|
|
|
0.101
|
= 0 X 20 + 1 X 2-1 + 0
X 2-2 + 1 X 2-3
|
|
|
= 0 + 1/2 + 0 + 1/8
|
|
|
= 4/8 + 1/8
|
|
|
= 5/8
|
continue
This page last updated 6/05
©Abernethy and Allen, 2003.
Furman University
|