Talk:Octal
From Wikipedia, the free encyclopedia
Contents |
[edit] octal
snip:
For example, the binary representation for decimal 74 is 1001010, which groups into 1 001 010 — so the octal representation is 112.
-end-
Can anyone explain this "representation?" -- Anonymous
It may help to first understand the binary numeral system. Put simply, 1001010 binary is equivalent to 1 × 26 + 1 × 23 + 1 × 21 = 64 + 8 + 2 = 74. Since each octal digit directly corresponds to a group of three binary digits, any binary representation can be condensed into an octal form. The octal numeral 112 above can be expanded to mean 1 × 82 + 1 × 81 + 2 × 80 = 64 + 8 + 2 = 74. -- Wapcaplet 01:40, 10 Dec 2004 (UTC)
I changed the above quoted paragraph to be slightly clearer, I hope.
I'm not sure about a couple of things in the article though. First, Knuth/TAOCP says Karl ("Charles") XII "hit on the idea of radix-8 arithmetic about 1717" and that this "was probably his own invention, although he had met Leibniz briefly in 1707". The article makes it sound like Knuth is certain about this, and forgets the .. well, qualified statement. Perhaps it should not even mention it at all?
Second, novem/novus. Any specific reason to believe this is true? Most of these kind of similarities are entirely random.
Third, fractions. Why should octal be better for fractions? (I'm assuming the author really meant numbers like 0.25, not fractions like 1/4, but then English is not my first language.) It has all the advantages and disadvantages of binary, but if anything it is worse than most bases: it has fewer divisors, so more numbers would tend to "expand into infinity". (Compare with radix 12, that would be nice considering how common 1/3 is.)
Fourth, does the "8" in "base 8 number system" really need to be an article link?
magetoo 16:36, 12 Dec 2004 (UTC)
- I can't answer for the Knuth reference or novem/novus, but I agree on the matter of fractions; I don't think fractions should even be brought into the picture. When octal is the preferred numeral system, fractions aren't likely to be of much interest. I raised a similar question about the hexadecimal article a while back (the author in that case had claimed that hexadecimal was "quite good" for fractions, which is only true if one considers infinitely repeating expansions desirable). If it were up to me, discussion of fractions would be removed from both articles. In fact, I think I will go ahead and do so... -- Wapcaplet 17:48, 12 Dec 2004 (UTC)
Think I made it a bit more clear. Pseudoanonymous 20:44, 9 August 2007 (UTC)
[edit] Number prefixes
Please add description of 0x = hexadecimal, 0b = binary, 0 = octal. - Omegatron 16:48, Jun 23, 2005 (UTC)
This is just a C rule. Why then not use the '$' prefix, as in Pascal? ;) —Preceding unsigned comment added by 141.35.8.117 (talk) 2005-10-11T19:02:42
[edit] move Knuth?
Seems like that reference to Knuth (that King Charles XII of Sweden was the inventor of octal in Europe) should be removed from the "By Native Americans" section and placed in its own section. Perhaps "Historically" or "In History"? Meonkeys 01:00, 14 November 2006 (UTC)
[edit] Benefits of octal
Here's some original research of mine (though easily verifiable by anyone) that I wisely refrained from adding to the article. I'm placing it here for purposes of discussion.
Octal has three specific and distinct properties that decimal does not:
- Easy powers of two: The powers of two, which in decimal are written 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, etc., would be written as 1, 2, 4, 10, 20, 40, 100, 200, 400, 1000, 2000, 4000, etc. Also, inverse powers of two, decimal .5, .25, .125, .625 (equivalent to 1/2, 1/4, 1/8, 1/16) would be just as simply written .4, .2, .1, .04, .02, .01, etc., or 1/2, 1/4, 1/10, 1/20, 1/40, etc.
- Rational appearance of nonprimes: The first nonprime that is not divisible by two is nine (3x3). In octal, it would be written 11. Thus, single-digit numbers' primality is easily found just by checking evenness. 3, 5, and 7 would be easily seen as prime, while 4 and 6 would be obviously nonprime.
- Easy divisibility by 7 and 9: Take a multiple-digit number in octal, such as 527 (decimal 343). Take the sum of the digits (16 octal, 14 decimal), and repeat the process if the result also has multiple digits. If the resulting single digit is 7, the original number is divisible by seven. Also, since nine is written 11, it has the same property of eleven in decimal, namely that multiples are visually obvious: 22, 55, 121, etc. In octal, 374 is thus obviously a product of nine, seven, and two, since it is even, its digits eventually add up to 7, and it is obviously the sum of 340 and 34.
However, octal loses the easy divisibility by five, three, and eleven. Anyone else have other such? --205.201.141.146 22:58, 22 May 2007 (UTC)
- You mean easy divisibility checking, not divisibility itself. If you prefer powers of two, you must give up divisibility by any prime but two. - TAKASUGI Shinji (talk) 03:53, 25 April 2008 (UTC)
[edit] Wiki page for "significant digit"
Is there any page we can link to for the line "most significant octal digit"? I gather that this refers to the leftmost digit out of the three, but I've never seen a definition of "significant digit" in this sense - it certainly does not mean the same thing as significant figure. --Keflavich 21:50, 24 August 2007 (UTC)
[edit] The Simpson's should use Base 8
As the animated cartoon series, The Simpon's, have only four fingers on each hand their numeral system should be octal. It is not. —Preceding unsigned comment added by 208.3.66.29 (talk) 2008-04-24T19:25:16