This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 2001 November–December 1 C OMPUTING S CIENCE T HIRD B ASE Brian Hayes A reprint from American Scientist the magazine of Sigma Xi, the Scientific Research Society Volume 89, Number 6 November–December, 2001 pages 490–494 This reprint is provided for personal and noncommercial use. For any other use, please send a request to Permissions, American Scientist , P.O. Box 13975, Research Triangle Park, NC, 27709, U.S.A., or by electronic mail to [email protected] © 2001 Brian Hayes. P eople count by tens and machines count by twos—that pretty much sums up the way we do arithmetic on this planet. But there are countless other ways to count. Here I want to offer three cheers for base 3, the ternary system. The numerals in this sequence—beginning 0, 1, 2, 10, 11, 12, 20, 21, 22, 100, 101—are not as widely known or widely used as their decimal and bina ry cousins, but they have charms all their own. They are the Goldilocks choice among number ing systems: When base 2 is too small and base 10 is too big, base 3 is just right. Cheaper by the Threesome Under the skin, numbering systems are all alike. Numerals in various bases may well look differ ent, but the numbers they represent are the same. In decimal notation, the numeral 19 is shorthand for this expression: 1 × 10 1 + 9 × 10 . Likewise the binary numeral 10011 is understood to mean: 1 × 2 4 + 0 × 2 3 + 0 × 2 2 + 1 × 2 1 + 1 × 2 , which adds up to the same value. So does the ternary version, 201: 2 × 3 2 + 0 × 3 1 + 1 × 3 . The general formula for a numeral in any po sitional notation goes something like this: … d 3 r 3 + d 2 r 2 + d 1 r 1 + d r .… Here r is the base, or radix , and the coefficients d i are the digits of the number. Usually, r is a posi tive integer and the digits are integers in the range from 0 to r –1, but neither of these restrictions is strictly necessary. (You can build perfectly good numbers on a negative or an irrational base, and below we’ll meet numbers with negative digits.) To say that all bases represent the same num bers, however, is not to say that all numeric repre sentations are equally good for all purposes. Base 10 is famously well suited to those of us who count on our fingers. Base 2 dominates computing technology because binary devices are simple and reliable, with just two stable states—on or off, full or empty. Computer circuitry also exploits a coin cidence between binary arithmetic and binary log ic: The same signal can represent either a numeric value (1 or 0) or a logical value ( true or false ). The cultural preference for base 10 and the en gineering advantages of base 2 have nothing to do with any intrinsic properties of the decimal and binary numbering systems. Base 3, on the other hand, does have a genuine mathematical distinc tion in its favor. By one plausible measure, it is the most efficient of all integer bases; it offers the most economical way of representing numbers....
View
Full
Document
This note was uploaded on 04/10/2010 for the course ELEC 326 taught by Professor  during the Spring '10 term at Rice.
 Spring '10
 

Click to edit the document details