Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Why do computers use binary?

  1. #1
    Join Date
    Jul 2009
    Posts
    449

    Default Why do computers use binary?

    Exactly the title. Wouldn't it be easier to have them use something like base 1 million?
    The RNG is the source of chaos and corruption.
    "You talk to molest, the female dwarven child. Molest, the female dwarven child, grunts: "Me wanna sugar, please?"

  2. #2
    Join Date
    May 2008
    Posts
    356

    Default

    because there are only 2 states: current on and current off.

    its built-in.

  3. #3
    Join Date
    Aug 2009
    Location
    Canada
    Posts
    1,099

    Default

    Because computers are dumb.
    I said it before, and I'll say it again. If I knew scripture like you, I'd prolly be an athiest too.. -gut

     /l、
    (゚、 。 7  
     l、 ~ヽ   
     じしf_, )ノ

  4. #4
    Join Date
    Mar 2009
    Posts
    13

    Default My answer.

    Your question seems to be focused on why computers don't operate in a higher base than 2. Let's consider for a moment how it is that computers can perform pre-programmed logical operations:

    1) Mathematicians realized long ago that it is useful to apply binary partitioning to all sorts of concepts to facilitate thinking about them. By "binary partitioning" I mean dividing a set into members that do and members that do not have some particular property. For instance, mathematicians might say that there are two kinds of people in the world: those who like math and those who don't.

    For instance: The set S consists of Jack, John and Ryan. The property is liking math. Jack likes math. John likes math. Ryan does not like math. So, the set can be partitioned into two subsets based on the property: The set L of Jack and John (who like math) and the set N of Ryan (who does not like math)

    2) Mathematicians noticed that there are some relationships that can be distinguished from each other between pairs of members of a set that can be partitioned in such a fashion. For instance, the "and" relationship applies to a pair of set members when both members of the set have the property.

    For instance: in terms of the liking math property, the "and" relationship applies to the pair "Jack and John" because Jack AND John like math (that is, because Jack likes math AND John likes math).

    Another such relationship is the "xor" relationship. The "xor" relationship applies to a pair of set members when one member has the property and the other member does not.

    If we were to discuss for a moment the pair of "Jack and Ryan" we could say that Jack XOR Ryan like math. This would still be true if suddenly Jack did not like math but Ryan did.

    Another: the "equals" relationship. This is another relationship that would apply to "Jack and John" because they either both have or both do not have the property (in this case both have).

    3) Mathematicians then found it useful to apply the concept of "testing" a pair for various different relationships.

    For instance, they can test "Jack and John", "Jack and Ryan" or "John and "Ryan" each to see if the "and" relationship applies in terms of the "liking math" property.

    Jack and John: AND applies.
    Jack and Ryan: AND does not apply
    John and Ryan: AND does not apply.

    Or another test for the "xor" relationship:

    Jack and John: XOR does not apply
    Jack and Ryan: XOR applies
    John and Ryan: XOR applies

    4) Next comes the concept of chaining together these tests. What if you really need to know whether or not a set of three people all like math? Based on a simple twist in our pairwise logic, you can test the first two members for the "and" relationship regarding liking math, then you can test the third member against the result of the first test. To illustrate:

    S is the set containing Jack, John and Ryan. Jack and John like math, Ryan does not. First test Jack and John for the AND relationship:

    Jack AND John like math, since Jack likes math and John likes math.

    Now you get to define a new set, S'. S' is the set containing "Jack and John" and Ryan. That's right, it contains an aggregation of the two members of the initial pair!

    Test the two members of S' and you have your answer regarding S:

    "Jack and John" AND Ryan don't like math, since Ryan doesn't like math.

    5) So, based on a simple binary relationship we can create complicated tests and interconnect them logically to understand various things. So why not create even more complex tests based on ternary relationships to understand even more complicated things?

    The answer is simple. Binary partitioning covers everything! I can divide S very easily into those who do and those who do not like math. It is impossible due to the nature of the partition I chose to find any member of S who does not fall into one of its partitions. Aggregation of binary logic allows pairwise relationships to be applied to more complicated input sets than just pairs.

    That shows that binary is sufficient, but it doesn't show that binary is necessary. Why not divide the world into those who like math a lot, a little bit or not at all? That would give us a ternary partition that would allow us to define pairwise relationships and we already know about aggregating pairwise relationships to represent bigger input sets.

    The answer is that there is consistently a way of creating a binary partition based on members of a set having or not having a property thanks to negation. What would be a consistent way of partitioning a set into three partitions rather than two? I cannot think of one. If there is one, it is probably abstractly related to some essential ternary concept just as binary partitioning is abstractly related to negation (which is essentially binary). If you think of one that is more useful than binary partitioning, please let the world know about it!!!

    6) Electronics give us a simple way of representing a binary partition. Electronic components are partitioned into those with an active voltage level running through them and those without an active voltage level running through them. Furthermore, electronic gates give us a simple way of representing the various relationships between pairs of binary inputs.

    I'm not going to actually diagram a computer because it's less interesting, but I think this is a pretty solid explanation of why computers use binary logic.

    7) In case the question gets confused with the notion of register size, I will address that for a moment:

    We all know that the old 8-bit NES was awesome. But then the 16-bit SNES was even more powerful after that, suggesting that a higher bit count may be somehow intrinsically better. Is this related to binary computers versus base-1000 or whathaveyou computers?

    No. Consider for a moment your long term memory, your short term memory and your awareness of your present surroundings. Long term memory is like a computer's hard drive space. Short term memory is like a computer's RAM. Your present awareness is like your computers CPU where the bit counts apply. Those bit counts apply to how much your computer can be thinking about at any given time and increasing them is generally a good thing when your computer needs to be thinking bigger, deeper thoughts.

    None of this has anything to do with whether it is appropriate for a computer to be thinking in terms of pairwise relationships between members of a set that was partitioned in two based on a property.

    Any other questions?
    ________
    Marijuana vaporizer
    Last edited by Nate; 02-13-2011 at 03:12 PM.

  5. #5
    Join Date
    Mar 2008
    Location
    Kentucky
    Posts
    5,067

    Default

    I studdied all this junk forever ago (~12 years), and
    asked myself the exact same question. There are many
    different answers. I know that hard drives don't actually
    store info as binary. They have different wave patterns
    that represent ones and zeros.

    Modern solid state electronics definitely have the ability
    to recognize more than just on's and off's. That may have
    been the original reason for binary use, but I think it is
    more than that now. Honestly, I'd say an entire industry
    has been built around binary, and no one wants to put
    the effort into rethinking everything from the ground up.
    "Whip me!" pleads the adom player. The rng replies... "No."

  6. #6
    Join Date
    Jul 2009
    Posts
    449

    Default

    Nate, what if you have something that is three groups. There are Jack, John, and Ryan. John likes binary. Jack is neutral towards binary. Ryan dislikes binary. What is the point of binary then?
    The RNG is the source of chaos and corruption.
    "You talk to molest, the female dwarven child. Molest, the female dwarven child, grunts: "Me wanna sugar, please?"

  7. #7
    Join Date
    Mar 2008
    Posts
    1,077

    Default

    Humans started counting with just showing a number of I's: I, II, III, IIII, ... up to 4, because without learning how to count, it would be difficult for them to tell difference between IIIII and IIIIII. Thus, they have started to using a special sign for 5 (V, like a full hand). Any yet another special signs for 10 (X, two full hands). The same system was used consistenly for larger numbers: XXXXX = L, LL = C, CCCCC = D, and so on. (I use the Roman numerals, but IIRC actually it was before Romans and they used something different.) And thus the decimal system was born.

    But actually I think binary is more logical even for humans. (Binary itself is of course impractical because it leads to very long numbers. But hexadecimal and octal systems combine the terseness of decimal with the doubling philosophy of binary.)

    In music there are notes of length 1/2, 1/4, 1/8, ..., 1/64th of the full note. Why not 1/100th? Because the rhythm is naturally about doubles and halves. You are much more likely to hear powers of 2 in music than powers of 10. Somehow it is easier to compose a bigger part of melody from two smaller parts, than from 3 or 10.

    In the US system of coins and banknotes (for example) you have 1 Cent, 2, 5, 10, 25, 50, $1, $2, $5, $10, $20, $50, $100. Why not 1$, 2$, 3$, 4$, 5$, 6$, 7$, 8$, 9$? Again, doubles and halves, except they had to be adjusted to the decimal system, since it would be difficult to count the money otherwise. If humans used a binary (or octal, or hexadecimal) system, the coins would be just powers of two, and the foreigners in US would not be confused with this two-digit quarterdollar.

    Some of the early computers (e.g. ENIAC) used decimal system, but it turned out to be a bad idea. A transistor naturally works in binary (either there is power on input or not; it will produce power on its output only if there is power on input A but no power on input B). You can encode a single ternary digit with two bits (transistors or binary digits), or a single decimal with 4 bits, but such circuits would be much more complicated than the usual binary ones. It's better to perform all the calculations in binary and use decimal only for human input and output.

    In your example of three people: it is true that the binary system is less efficient at expressing trichotomies (3 possibilities) than ternary (only 79% power of the two binary digits is used, while ternary of course uses 100%; the 79% value is for the trivial encoding with two bits, simple Huffman encoding (if possible) uses 95% power). But ternary is even worse at expressing dichotomies (2 possibilities): only 63% power of the ternary digit is used, and dichotomies are also much more common than trichotomies. Binary is not the best for everything in particular, but it is the best in general.
    Last edited by Zeno; 11-01-2009 at 01:14 PM.

  8. #8
    Join Date
    Jul 2009
    Posts
    449

    Default

    Quote Originally Posted by Zeno View Post
    Humans started counting with just showing a number of I's: I, II, III, IIII, ... up to 4, because without learning how to count, it would be difficult for them to tell difference between IIIII and IIIIII. Thus, they have started to using a special sign for 5 (V, like a full hand). Any yet another special signs for 10 (X, two full hands). The same system was used consistenly for larger numbers: XXXXX = L, LL = C, CCCCC = D, and so on. (I use the Roman numerals, but IIRC actually it was before Romans and they used something different.) And thus the decimal system was born.

    But actually I think binary is more logical even for humans. (Binary itself is of course impractical because it leads to very long numbers. But hexadecimal and octal systems combine the terseness of decimal with the doubling philosophy of binary.)

    In music there are notes of length 1/2, 1/4, 1/8, ..., 1/64th of the full note. Why not 1/100th? Because the rhythm is naturally about doubles and halves. You are much more likely to hear powers of 2 in music than powers of 10. Somehow it is easier to compose a bigger part of melody from two smaller parts, than from 3 or 10.

    In the US system of coins and banknotes (for example) you have 1 Cent, 2, 5, 10, 25, 50, $1, $2, $5, $10, $20, $50, $100. Why not 1$, 2$, 3$, 4$, 5$, 6$, 7$, 8$, 9$? Again, doubles and halves, except they had to be adjusted to the decimal system, since it would be difficult to count the money otherwise. If humans used a binary (or octal, or hexadecimal) system, the coins would be just powers of two, and the foreigners in US would not be confused with this two-digit quarterdollar.

    Some of the early computers (e.g. ENIAC) used decimal system, but it turned out to be a bad idea. A transistor naturally works in binary (either there is power on input or not; it will produce power on its output only if there is power on input A but no power on input B). You can encode a single ternary digit with two bits (transistors or binary digits), or a single decimal with 4 bits, but such circuits would be much more complicated than the usual binary ones. It's better to perform all the calculations in binary and use decimal only for human input and output.

    In your example of three people: it is true that the binary system is less efficient at expressing trichotomies (3 possibilities) than ternary (only 79% power of the two binary digits is used, while ternary of course uses 100%; the 79% value is without simple Huffman encoding, which makes it more effective at 95%). But ternary is even worse at expressing dichotomies (2 possibilities): only 63% power of the ternary digit is used, and dichotomies are also much more common than trichotomies. Binary is not the best for everything in particular, but it is the best in general.
    OK, thank you, ZENO! What do you know, Zeno saved the day! But what about calculators... Do they use binary?
    The RNG is the source of chaos and corruption.
    "You talk to molest, the female dwarven child. Molest, the female dwarven child, grunts: "Me wanna sugar, please?"

  9. #9
    Join Date
    Mar 2008
    Posts
    1,077

    Default

    The tradeoff between binary and decimal is that binary is more natural for electronics, but requires some work to translate to/from decimal. Sometimes, when I had to do (quite simple) calculations on a computer using very large numbers, I did them in base 1000000000 (numbers in this base are straightforwardly translated to base 10 which I wanted my output to use, and 32-bit processors are designed to add numbers smaller than 2^31 = 2147483648 with a single operation). So, I suppose that for simple calculators which can do only + - * /, performing calculations in decimal might be actually more practical, while for the complicated ones, binary is better. But these are only my guesses.

  10. #10
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    80

    Default

    There are other possibilities to store and work with information, indeed,
    you can have a look at

    http://en.wikipedia.org/wiki/Analog_computer

    http://en.wikipedia.org/wiki/Binary-coded_decimal
    (still it is based on binary)

    but the most efficient and fundamental base is the binary system.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •