how do you code in binary...

This is a discussion on how do you code in binary... within the A Brief History of Cprogramming.com forums, part of the Community Boards category; How do you actually physically get to a place in the computer that lets you code in binary... To code ...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738

    Question how do you code in binary...

    How do you actually physically get to a place in the computer that lets you code in binary...

    To code in C++, you go to a text editor or a compiler.
    To code in Pascal, you do the same.
    To code in BASIC, you do the same.
    To code in Assembly, you enter Debug in DOS, an assembler, a text editor, etc...

    But what about binary?

    A hex editor is hex...not binary...
    An assembler is assembly...not binary...

    Where can you actually physically code in binary in a computer...
    My Website

    "Circular logic is good because it is."

  2. #2
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078

    Re: how do you code in binary...

    Originally posted by DavidP
    But what about binary?

    A hex editor is hex...not binary...
    An assembler is assembly...not binary...

    Where can you actually physically code in binary in a computer...
    Binary isn't a language, machine codes are. Programming in assembly is generally one-to-one with programming in machine code so there really isn't a need to program in machine code using binary.

    You can program in machine code using binary, hex, octal, decimal -- any base you want. They're all just number systems. What makes you think you think doing it in hex is any different from binary? Coding in machine code using hex does the exactly the same thing as using binary. There is no difference when it's stored in the computer, they're just two different ways of writing numbers for people, not software.
    Last edited by Polymorphic OOP; 01-26-2003 at 10:58 PM.

  3. #3
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    The reason we have hex codes, and octal codes are so that we don't have to use binary

  4. #4
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    i suppose you'd use a compiler...

    >Binary isn't a language,

    i think your wrong here, binary(aka. machine code) is the computers language, its all it understands, and you can also program in binary, both would classify it as a language, but, again if you want to argue we fall in to symantics, and therefore its pointless.

    an example of what binary, hex, ect... would probably look like.

    http://www.otterbein.edu/home/fac/DP...apter6asm.html
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  5. #5
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    Originally posted by no-one
    i think your wrong here, binary(aka. machine code) is the computers language, its all it understands, and you can also program in binary, both would classify it as a language, but, again if you want to argue we fall in to symantics, and therefore its pointless.
    No, binary isn't AKA machine code. There are two completely different things. They are just refered to as the same thing out of ignorance.

    Binary isn't a language, it's just the medium. Binary by itself just represents numbers or combinations, it's not a language. An infinite number of languages can be "built from" binary. It's simply a way of representing different values. Machine code is NOT binary, it's just the "alphabet" or "number system" that machine code uses.

    If binary was a language then 1001010011 would have a specific meaning, but in actuality, it doesn't. It all depends on which machine code you are using. If binary were a language, then I could say "this is binary code, tell me what it means," but that is not possible because it can be used to represent an infinite number of languages, all binary is is a medium. Binary itself is just a number system, nothing more.

  6. #6
    npc
    npc is offline
    Registered User
    Join Date
    Nov 2002
    Posts
    8
    uh oh, here we go again... lol, I think I was debating this issue with you a while ago, poly. eventually i agreed with you. anyways, i was looking through an algorithms book i used last semester (referencing to pg. 975 of "intro. to algorithms"; cormen, leiserson, rivest, stein; 2nd edition; great book by the way!) and it states:

    "an alphabet sigma is a finite set of symbols. a language L over sigma is any set of strings made up of symbols from sigma. for example, if sigma = {0, 1}, the set L = {10, 11, 101, 111, 1011, 10001, ...} is the language of binary representations of prime numbers".

    my intepretation of this is that what we call binary is really used as an alphabet, not a language. It's when you start creating strings, out of the symbols provided by the alphabet, and representing these strings with meaning (i.e. encoding information within these strings) that you have a language. for example, the language of prime numbers mentioned.

    but something else interesting also popped in my mind. poly, you state that:

    "You can program in machine code using binary, hex, octal, decimal -- any base you want. They're all just number systems."

    But i think this is just as wrong as stating that binary is a language! I would have to argue that the term binary, by itself, shouldn't be thought of as a number system. because numbers, like op codes for some processor, is also a language. we use the binary alphabet (just a set of 2 symbols) and we encode this concept of numbers in that alphabet. another way of thinking about this is like not only do we encode op codes in binary, but we also encode data that we wish to process with op codes in binary. data, which can mean numbers.

    To the original post: "How do you actually physically get to a place in the computer that lets you code in binary..." open up your case, remove your heatsink + fan, remove the cpu from its socket, apply ground and 5 volts vcc to various cpu pins and hope something's going on inside. edited: i forgot, you also need a clock signal!
    Last edited by npc; 01-27-2003 at 04:19 AM.

  7. #7
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    >
    No, binary isn't AKA machine code. There are two completely different things. They are just refered to as the same thing out of ignorance.
    <

    Look, your wrong, binary however you want to define it is machine code plain and simple.

    >
    If binary was a language then 1001010011 would have a specific meaning, but in actuality, it doesn't. It all depends on which machine code you are using. If binary were a language, then I could say "this is binary code, tell me what it means," but that is not possible because it can be used to represent an infinite number of languages, all binary is is a medium. Binary itself is just a number system, nothing more.
    <

    Your logic is total wrong and contradictory. silently to yourself try and make some sense out of what you've said, think about each part, your not correct.

    now i reiterate
    "if you want to argue we fall in to symantics, and therefore its pointless."

    so, im done arguing with you, arguing over symantics it useless stupid and worthless, thats why i said it the first time so as to stop any arguement, NOTE THE "i think" AS THE FIRST TWO WORDS!, this is to SIGNIFY AND OPINION AND THAT I DONT WANT TO ARGUE, i stated it in that way so as to prevent just this, and to KEEP THE THREAD ON TOPIC!
    it was a contridictory opinion not an arguement.

    i'm gonna avoid a lecture here as much as i can, but im starting to get ........ed here. Your over defensive and comming off like a smart ass telling people who have been doing this many years longer than you wrong or not they're ignorant, and im not just refering to me.

    let it die, so his question might get an answered.
    Last edited by no-one; 01-27-2003 at 04:44 AM.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  8. #8
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Hmm normally i wouldn't contribute to a disagreement, but its two on one so i feel my position valueable, as it evens things out. The way we were taught in CS, and the way i understand it in my daily life, poly is totally correct here.

  9. #9
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    The "is binary a language or not" was done to death here...

    binary

    ... there was no concensus, just a lot of semantic juggling. This discussion is not relevent to the question.

    Enough.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  10. #10
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    Originally posted by no-one
    Look, your wrong, binary however you want to define it is machine code plain and simple.

    Your logic is total wrong and contradictory. silently to yourself try and make some sense out of what you've said, think about each part, your not correct.

    now i reiterate
    "if you want to argue we fall in to symantics, and therefore its pointless."

    Your over defensive and comming off like a smart ass telling people who have been doing this many years longer than you wrong or not they're ignorant, and im not just refering to me.

    let it die, so his question might get an answered.
    You're the one who's making a big deal out of things here. I gave several reasons why not to call binary a language, and all you say is "I'm wrong and you're right" without any backing. People come here looking for precise answers and I don't see anything wrong in them hearing multiple views on the subject. Pardon me if I disagree with you, people are entitled to their own views and their ability to express them.

    I agree, let's end the this particular discussion.

    However, I do have something else to say...

    I can't stand your attitude. Every single time I've disagreed with you or someone else on the boards and you've posted a reply, you resort to just bringing up experience. I respect you and Sayeh (and anyone else with a lot of experience) for this, however, "experience" doesn't mean you're right and someone with less experience is wrong. There have been times that I've been right and there have been times when I've been wrong. There have also been times where people with lots of experience here have been proven wrong as well. If you have an opinion, state it and explain why. "I have experience so you are therefore wrong" isn't backing to an opinion. I may not be as old to you or have been programming as long, but at least I'm not a jerk to other people in the boards (well, not usually ) and at least I take the time to explain my views. If you disagree then say so, but then give a reason why.

    I wasn't trying to attack you here and I'm sorry that you took it as that. I agree, let's end this now. My point is that everyone has something to learn here, whether you are very experienced or not. Don't pass things off that other people say as wrong when you don't explain why you disagree. Otherwise you're just flaming.

    Again, if you are offended, I'm sorry. This isn't the first time something like this has happened and I had to get that off my chest.

  11. #11
    Registered User Scourfish's Avatar
    Join Date
    Mar 2002
    Posts
    397
    very carefully
    -486SX-20
    -Some random Debian Distro
    -Some version of MS-Dos
    -Day of the Tentacle

  12. #12
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Originally posted by Scourfish
    very carefully
    LMAO!

  13. #13
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    Poly, I fully understand that binary is a number system....HOWEVER....there are things in this world that go by several different names and nicknames.

    If you are anal about everything in the world just like you are about calling machine code by its proper name, you wont be getting anywhere, and for this purpose, I am calling machine code binary. Why? Because it is binary in essence. Computer only respond to a true or false value, not to a hexidecimal number. So...now that we have that established...once again I ask my question:

    How do you get to a place in the computer that actually lets you code in binary.
    My Website

    "Circular logic is good because it is."

  14. #14
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    David (et al):

    I have entered code in binary. I will not be drawn again into a semantic dispute as to whether binary is or is not a language. The machines I "programmed" in binary, note the quotes had no other form of input. Today, that is not necessary. If you want to "program" your machine in binary, note the quotes then write a simple program that will allow you to say "11001100 carriage return", and write/append the resulting byte to a file you have opened for binary writing, and given a ".exe" extension.

    Now all you have to do is read and understand enough about the format of a .exe or whatever the executable format is for your target operating system, to know exactly what it is you need to enter at your prompt. Then you can just run it.

    You really don't want to do this.

    General:

    One more crack and it's deleted - OKAY.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dec to Binary code
    By 4dice in forum C Programming
    Replies: 7
    Last Post: 01-12-2009, 03:40 PM
  2. Replies: 4
    Last Post: 01-18-2008, 07:05 PM
  3. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  4. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Windows Programming
    Replies: 0
    Last Post: 10-14-2002, 02:29 PM
  5. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM

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