binary

This is a discussion on binary within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Originally posted by Polymorphic OOP Binary is in no way a programming language. If you were to consider binary a ...

  1. #46
    cereal killer dP munky's Avatar
    Join Date
    Nov 2002
    Posts
    655
    Originally posted by Polymorphic OOP
    Binary is in no way a programming language.

    If you were to consider binary a language, then you'd just as well be saying that the arabic base 10 number system was a programming language. Binary just happens to be the medium.
    i thought he made it pretty clear w/this quote right here!
    guns dont kill people, abortion clinics kill people.

  2. #47
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    >>And I still didn't get a straight answer....

    Sure you did. It's not a language. However, the term is sometimes used to refer to machine level programming.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #48
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    Well than you missed the whole first part of the topic. It's not a matter of opinion -- Binary is not a language, it's just a nubmer system on which languages can be formed.
    Stop being so anal, Poly. Binary is not only a number system, but in the computer world it is also a slang form of machine code. We all know that officially the lowest level of programming is "machine code", but we like to call it binary. So just stop being so anal about it.

    Oh and also, in objection one of your earlier posts, you made an analogy to binary being the alphabet. No it's not. 1 and 0 is the alphabet, just like A and B. Binary is the "language" that uses the alphabet. Ha.
    My Website

    "Circular logic is good because it is."

  4. #49
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    For instance -- if binary were a language, you would be able to tell me, without a doubt, what this meant

    1101000101101010111
    your right i cant because im not fluent in binary...but i sure can tell you what this means:

    10111000000100110000000011001101000100001011101000 00011001011110011111111100000000101110100000000000 00000010001000110010001100110100010000111000101111 10101011010011001101000101101011100000000011000000 0011001101000100001100110100100001

    what it means:

    initialize 13h
    call put pixel function
    start loop
    tell coordinates and color of pixel
    plot pixel
    go back to start of loop until loop counter hits 0
    wait until a key is pressed
    go back to text mode
    end program
    My Website

    "Circular logic is good because it is."

  5. #50
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    Originally posted by DavidP
    Stop being so anal, Poly.
    We're being anal because the question asked was very specific -- is binary a language?

    The answer is no!

    Originally posted by DavidP
    your right i cant because im not fluent in binary...but i sure can tell you what this means:

    10111000000100110000000011001101000100001011101000
    00011001011110011111111100000000101110100000000000
    00000010001000110010001100110100010000111000101111
    10101011010011001101000101101011100000000011000000
    0011001101000100001100110100100001

    what it means:

    initialize 13h
    call put pixel function
    start loop
    tell coordinates and color of pixel
    plot pixel
    go back to start of loop until loop counter hits 0
    wait until a key is pressed
    go back to text mode
    end program
    No, in binary it's a number. Even if you were to say "binary is slang for machine code" the fact is that not all "machine code" is the same. Saying "the value above in binary means [such and such] set of instructions in the programming language of binary" is not accurate at all. Not all "machine code" is the same. If you were to say "in this type of machine code, this means..." then you would be accurate. It's not even being that anal! It's just like the analogy between an alphabet and a language. If you understand that, then I can't see how you don't understand this.
    Last edited by Polymorphic OOP; 12-04-2002 at 04:48 PM.

  6. #51
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    Originally posted by DavidP
    Oh and also, in objection one of your earlier posts, you made an analogy to binary being the alphabet. No it's not. 1 and 0 is the alphabet, just like A and B. Binary is the "language" that uses the alphabet. Ha.
    Haha, wow, you really just don't get it!

    Depending on how the LANGUAGE written using binary as a medium interperets the data is what determines what a "letter" or "word" or "sentence" is -- 1 and 0 aren't any more letters than 10 and 11. Just the fact that it's more than one digit doesn't make it a "letter" and multiple bits "words." The anology wasn't that every digit in binary represents a letter or a string represents a letter, or anything like that. The point is it's all up to the LANGUAGE that the program is written in to determine how the data is interpretted!

    IE in one langauage it's possible that

    1010101010101010

    represents multiplication

    but in another language

    11101100

    might represent multiplication.

    What you call a "letter" means nothing -- you can call a letter a digit or you can call a letter a group of digits. I won't extend the analogy any further because that's all it is is an analogy! There's not going to be a 1 to 1 correspondence to everything in a written language using an alphabet to one based on numbers. The point is the concept is the same. "Binary" means nothing in terms of "vocabulary" or "syntax" or what a "letter" is. It's just how data is stored. The language that it's written in is what tells you that other information.

  7. #52
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    Simplify:

    1. Machine code is technically a language.

    2. Binary is machine code.

    extrapolate:

    "Binary" code is technically a language.

    now for the question!

    is Binary a programming language?

    well lemmie see here... can i program with it? yes.

    but god only knows why you would want to!
    Last edited by no-one; 12-05-2002 at 01:25 AM.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  8. #53
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    Originally posted by no-one
    2. Binary is machine code.
    No it's not.

    Machine code is written with binary as a medium. Binary is NOT machine code.

Page 4 of 4 FirstFirst 1234
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. arrays vs lists? And containers in general!
    By clegs in forum C++ Programming
    Replies: 22
    Last Post: 12-03-2007, 01:02 PM
  2. Replies: 0
    Last Post: 11-04-2006, 10:07 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 08:40 PM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21