## Positional Notation Drill

yaya@bernstein-plus-sons.com

## Representing Numbers

People have used representations for numbers at least since the beginnings of recorded history. For a discussion on this history see:

• D. E. Smith and J. Ginsburg, "From Numbers to Numerals and From Numerals to Computation" pp. 442-464 in "The World of Mathematics", J. R. Newman, Volume 1, Simon and Schuster 1956.
We will consider some aspects just two of the many systems of numerals: Roman numerals and Arabic numerals.

Number are a powerful, abstract concept. The number "3" represents what is common in a pile of 3 rocks, a gathering of 3 people, a set of three marks on a wall. It is the "cardinality" of each of these sets.

We could use any set of 3 objects as a representative of the idea of the number 3. For example, the Romans used, III, three I's in a row to represent three. They used a simple set of symbols for 1, 5, 10, 50, 100, 500 and 1,000:

Roman
Numeral
Arabic
Number
I 1
V 5
X 10
L 50
C 100
D 500
M 1000

These symbols were combined by addition and subtraction. When a smaller symbol was to the left of a larger symbol, it was subtracted. The rules for permitted combinations are complex. See Paul Lewis' explanation at http://www.wilkiecollins.demon.co.uk/roman/front.htm. When a smaller symbol was to the right of a larger symbol, it was added. For numbers smaller than 1000, no more than three of one symbol were placed together. Since there is no Roman numeral for a number larger than 1000, at first this rule was relaxed for number larger than 1000. Eventually symbols for larger number were created by placing a line over the existing symbols, multiplying them by 1000. For the smaller number, however, except for the sign, each Roman numeral had the same meaning no matter where it was placed.

Note that there is no symbol for a set with no objects.

Roman
Numerals
Arabic
Number
Roman
Numerals
Arabic
Number
Roman
Numerals
Arabic
Number
Roman
Numerals
Arabic
Number
I 1 XI 11 XXI 21 XXXI 31
II 2 XII 12 XXII 22 XXXII 32
III 3 XIII 13 XXIII 23 XXXIII 33
IV 4 XIV 14 XXIV 24 XXXIV 34
V 5 XV 15 XXV 25 XXXV 35
VI 6 XVI 16 XXVI 26 XXXVI 36
VII 7 XVII 17 XXVII 27 XXXVII 37
VIII 8 XVIII 18 XXVIII 28 XXXVIII 38
IX 9 XIX 19 XXIX 29 XXXIX 39
X 10 XX 20 XXX 30 XL 40

Arabic numerals (so called because they were developed by Arab mathematicians, working from a decimal system which may have come from India) greatly simplified the representation of numbers. There were two major differences between the use of Arabic numberals and the use of Roman numerals: the inclusion of a symbol for a set with no object and the use of the same simple set of 10 symbols for different numeric values depending on their position.

The forms of the numbers have changed over time. We now use 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. When writing in Arabic, words go from right to left. Therefore we start our number on the right with the units digit, and work to the left with increasing powers of ten. It is the zero which makes it possible to do this. If we have the number, CCXIII in Roman numerals, we have no trouble writing 213 in Arabic numerals, but if we had CCIII and did not have a zero, we would have 23, which would not be what we intend. Indeed, an early form of Arabic numerals would have written this is 2.3, with the period simply holding the place of the missing number, as if it were a rod in an abacus.

The use of 10 digits may be natural for people, having two hands of 5 fingers each, but computers are more economically built using numbers based on powers of 2. Fortunately the idea of positional notation extends easily to other numbers of digits.

We could use just two digits, 0 and 1. This would give us a binary number system. This is a very natural numbering system for a machine made up of switches that simply turn on and off. A numeric position that can hold just one binary digit is called a bit.

We could group three bits together. This would allow us to run through the following numbers:

Bit 2 Bit 1 Bit 0 Decimal
Value
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7

This grouping of three bits, allowing us to work with digits 0 through 7, is called octal notation. The number 8 is called the radix of octal notation and we say that we are writing numbers base-8.

We also could group four bits together. This would allow us to run through sixteen digits, but we need to invent characters to use for the digits past 9. The convention for this hexadecimal notation and for all the numbering systems with radixes 11 through 36 is to use the letters from the corresponding portion of the alpahbet.

Bit 3 Bit 2 Bit 1 Bit 0 Decimal
Value
Digit
0 0 0 0 0 0
0 0 0 1 1 1
0 0 1 0 2 2
0 0 1 1 3 3
0 1 0 0 4 4
0 1 0 1 5 5
0 1 1 0 6 6
0 1 1 1 7 7
1 0 0 0 8 8
1 0 0 1 9 9
1 0 1 0 10 A
1 0 1 1 11 B
1 1 0 0 12 C
1 1 0 1 13 D
1 1 1 0 14 E
1 1 1 1 15 F

A numeric position that can hold just one hexadecimal digit is called a nibble.

## NOTICE

Some of the software and documents included within this software package are the intellectual property of various parties, and placement in this package does not in anyway imply that any such rights have in any way been waived or diminished.

With respect to any software or documents for which a copyright exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT.

Even though the authors of the various documents and software found here have made a good faith effort to ensure that the documents are correct and that the software performs according to its documentation, and we would greatly appreciate hearing of any problems you may encounter, the programs and documents any files created by the programs are provided **AS IS** without any warranty as to correctness, merchantability or fitness for any particular or general use.

THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE PROGRAMS OR DOCUMENTS.

Page last updated 11 September 2003
Herbert J. Bernstein

yaya@bernstein-plus-sons.com