I want to write some binary code

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

40 Replies - 3177 Views - Last Post: 05 May 2014 - 01:50 PM

#1 leibniz76  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 18
  • Joined: 02-May 14

I want to write some binary code

Posted 02 May 2014 - 09:52 PM

I'm more of a philosopher than I am a computer programmer. Understanding the limits of computers is very important for understanding the mind/body problem. If one wants to know whether computers can think, one has to know what thinking is and what computers do. To understanding what computers can do one must at least understand what a Turing Tape is and how it works. So I would like to write some binary code, so as to get a feel for what computers can do. I am also interested in looking at some of the earliest computing languages such as Fortran and Cobal.

Is This A Good Question/Topic? 0
  • +

Replies To: I want to write some binary code

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8897
  • View blog
  • Posts: 33,369
  • Joined: 12-June 08

Re: I want to write some binary code

Posted 03 May 2014 - 07:58 AM

Congratulations on the endeavor? Keep folks posted as you go.. I would suggest utilizing the blog feature!
Was This Post Helpful? 0
  • +
  • -

#3 leibniz76  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 18
  • Joined: 02-May 14

Re: I want to write some binary code

Posted 03 May 2014 - 02:26 PM

Maybe I should have been more clear about the fact that I was wondering if anyone knew how I would go about this endeavor. What's the best way? Is there any software that enables one to write some very simple program in binary?
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10364
  • View blog
  • Posts: 38,372
  • Joined: 27-December 08

Re: I want to write some binary code

Posted 03 May 2014 - 02:33 PM

On today's machines, programming in binary isn't really possible. There might be some old operating systems that support this that you could run on an emulator. The closest you'll get is Assembly language. It will be enough of a challenge for you.

If you're a philosopher type, a higher level language might be more appropriate. Prolog and Lisp are probably good choices. Prolog is a logical based language. I think you'll find it up your alley.

Also, if you haven't already looked into the works of Godel, you may find those relevant to your interests.
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8897
  • View blog
  • Posts: 33,369
  • Joined: 12-June 08

Re: I want to write some binary code

Posted 03 May 2014 - 02:34 PM

That seems.. silly, but sure.. what ever gets your kicks. Find a hex editor and start writing some assembly.

Now if you feel like getting all sorts of hardcore and actually want to type in the zeros and ones, well.. that would be machine (and chip) dependent.
Was This Post Helpful? 0
  • +
  • -

#6 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1010
  • View blog
  • Posts: 2,444
  • Joined: 04-October 09

Re: I want to write some binary code

Posted 03 May 2014 - 04:15 PM

You could always get yourself an IMSAI 8080. First computer I ever programmed on, and input is done through front panel switches. It's all binary!
Was This Post Helpful? 0
  • +
  • -

#7 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,276
  • Joined: 28-March 11

Re: I want to write some binary code

Posted 03 May 2014 - 05:17 PM

Most Assemblers will let you enter the opcodes directly instead of using mnemonics. It is very tedious and error prone to do it this way instead of using mnemonics.

In X86 Assembly, the following uses mnemonics:
.code
start:
    int     3
    mov     eax, 1
    push    eax
    pop     eax
end start

Instead of the above, I could write the same instructions using the opcodes directly:

.code
start:
    db  0CCH        ; int 3
    db  0B8H        ; mov eax
    dd  01H         ; 1
    db  050H        ; push eax
    db  058H        ; pop eax
end start

This will Assemble and Link without errors and run without issue. Once you start using jumps, calls, ret, etc... it becomes tougher to use the opcodes since you need to calculate and use the correct offsets and addresses.
Was This Post Helpful? 0
  • +
  • -

#8 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7562
  • View blog
  • Posts: 12,680
  • Joined: 19-March 11

Re: I want to write some binary code

Posted 03 May 2014 - 06:59 PM

I would suggest you find an Altair 8800 or a replica. These beasts were actually programmable by entering binary instructions via switches on the front of the machine. The originals might be a little spendy, but surely you could find someone who's made a convincing replica. (there's someone who seems to have sold a kit at one point, but the site seems to have a lot of cobwebs on it - don't know if they're still in business)

More interesting might be the study of Automata Theory, which leads you up through "machines" of various complexity until you reach turing machines - this is more about the mathematics of computation, but by the time you've understood it you should be in a position to devise and run turing machines on some emulator of your choice, and certainly to understand how the binary code would work and why you really don't want to write more than the simplest do-nothing example of a TM in binary. The Hopcroft, Ullman, and Motwani textbook on Automata theory is excellent, and Jeff Ullman's course on the subject follows this book very closely - his lectures are good expositions of the material, and supplement the book well. No programming knowledge is required to understand this material, and the only math that is required is covered in the textbook, so it should be doable for anyone interested enough to pursue it.
Was This Post Helpful? 1
  • +
  • -

#9 leibniz76  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 18
  • Joined: 02-May 14

Re: I want to write some binary code

Posted 04 May 2014 - 12:55 AM

View Postmacosxnerd101, on 03 May 2014 - 02:33 PM, said:

On today's machines, programming in binary isn't really possible. There might be some old operating systems that support this that you could run on an emulator. The closest you'll get is Assembly language. It will be enough of a challenge for you.

If you're a philosopher type, a higher level language might be more appropriate. Prolog and Lisp are probably good choices. Prolog is a logical based language.


Yea, I looked at prolog but since I want to insert so many innovations I decided that it would be best to just write my own program. Thanks for the tip though.


I think you'll find it up your alley.


Quote

Also, if you haven't already looked into the works of Godel, you may find those relevant to your interests.


One of my main ambitions in life is to refute Godel's theorems. They're so obviously false, I can't believe anyone believes them. Let's just go ahead and do the refute Godel in less than 300 words.

Do you believe that the following are sentences:

1. Red
2. Dog
3. Start
4. G

Probably not. Well, Godel believes that 4 is a sentence.

Here is how I will falsify Godel's theorems in my machine. You can only prove a sentence if it is composed of a subject and a predicate. So if the sentence you're trying to prove does not have a subject and a predicate, then the machine will output: ungrammatical. Now Godel's thesis is roughly:

Any system that is rich enough to demonstrate its own consistency must be inconsistent.

And the example he used to demonstrate this was the following sentence which is roughly:

Nothing proves G.

You can input that into my machine since it has a subject and a predicate, for example, the subject is "nothing" and the predicate is "proves G". If that sentence is true then that demonstrates that the system is inconsistent and if it is false then that too proves the system is inconsistent. However, another rule that my machine has is that every sentence must ultimately have a subject and a predicate. So embedded sentences are surrounded by {} for example if you input Jack died after Oswald worked in the school book depository, then that would be symbolized something like {jD}A{oWs} and then the embedded sentences would later be substituted for single letters and the sentence would be checked against other sentences for contradictions. But what exists between the {} must be a sentence which obeys certain rules. So Godel's sentence would be symbolized as

nP{g}

but that would output the result ungrammatical because what is between {} is not a sentence with a subject and a predicate.

Let's just use common sense, how does Godel know that 'nothing proves G'? What does G assert? Why does he believe nothing proves it? He doesn't know and he can't tell us. He's just assuming it. You can only prove sentences true or false and G is not a sentence.

One possible response to my argument is that I'm just making up rules expressly designed to falsify Godel's theorems. That is not the case. Let's say that I want to invent a new language and the symbols I'm going to use are the following:

irgiuth78594**((%

I can string those symbols into any order I like but that would result in an infinite number of combinations. I therefore must come up with rules for which sentences are grammatical and which aren't. Logicians call this well-formed formulas but it's just a useless introduction of jargon. My next step after I have decided which sentences are grammatical and which aren't is to decide which are true and which are false. So I am forced to come up with rules for what is grammatical and what isn't. Now if I build a machine and someone inputs the sentence:

1. Red

and my machine outputs TRUE, I'm going to look like an idiot and no one is going to take me seriously. What you have to do is build a machine such that any sentence you input into it, it outputs either TRUE, FALSE or UNGRAMMATICAL with the click of one button and it outputs the correct result for those sentences that rational people agree on. Once the machine can output the correct result for sentences that rational people agree on then people will start to take it seriously when it outputs the results for sentences that rational people don't agree on. Moreover, when those who disagree with the outputs for the controversial sentences cannot state why they disagree with it then people will start to take it seriously.
Was This Post Helpful? 0
  • +
  • -

#10 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7562
  • View blog
  • Posts: 12,680
  • Joined: 19-March 11

Re: I want to write some binary code

Posted 04 May 2014 - 01:09 AM

View Postleibniz76, on 04 May 2014 - 02:55 AM, said:

One of my main ambitions in life is to refute Godel's theorems. They're so obviously false, I can't believe anyone believes them.


Hm. Are you sure you understand Gödel correctly? Can you explain his proof without parody? If you can't do that, then I'm not sure you can convince me you understand it well enough to disprove it. Certainly your parodies are not convincing.


Quote

What you have to do is build a machine such that any sentence you input into it, it outputs either TRUE, FALSE or UNGRAMMATICAL with the click of one button and it outputs the correct result for those sentences that rational people agree on.


Surely such a trivial problem would be easily solved, no? But what does it output for "This sentence is false."?

This post has been edited by jon.kiparsky: 04 May 2014 - 01:10 AM

Was This Post Helpful? 0
  • +
  • -

#11 leibniz76  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 18
  • Joined: 02-May 14

Re: I want to write some binary code

Posted 04 May 2014 - 05:11 AM

View Postjon.kiparsky, on 04 May 2014 - 01:09 AM, said:

View Postleibniz76, on 04 May 2014 - 02:55 AM, said:

One of my main ambitions in life is to refute Godel's theorems. They're so obviously false, I can't believe anyone believes them.


Hm. Are you sure you understand Gödel correctly? Can you explain his proof without parody? If you can't do that, then I'm not sure you can convince me you understand it well enough to disprove it. Certainly your parodies are not convincing.


Quote

What you have to do is build a machine such that any sentence you input into it, it outputs either TRUE, FALSE or UNGRAMMATICAL with the click of one button and it outputs the correct result for those sentences that rational people agree on.


Surely such a trivial problem would be easily solved, no? But what does it output for "This sentence is false."?


As for the Liar paradox that is also not a well-formed formula. That would be symbolized as:

~{p}

Between the brackets you must have a subject and a predicate and you don't so it's not a grammatical statement. Only grammatical statements are true or false. Now let's take the statement: 'this statement has five letters.' That's certainly grammatical and it's true. One prominent solution to Liar is:

1. Sentences cannot refer to themselves
2. Liar refers to itself
3. Therefore, liar, well, it's not always stated what is supposed to follow from 1 and 2.

But notice that 'this statement has five letters' is grammatical. There is a subject, this sentence, and it bears a property, namely, has five letters. We would symbolize that as

({+p}Hle) & (leHfi)

This statement, call it p has letters and letters has the property five.
The + sign denotes 'this'. 'this' refers to something in the world. You can only prove that 'this x has y' by looking at x with your own eyes and seeing that it in fact has y. A computer can't do that, so statements with the word 'this' can't be proven with logic. You have to do it with observation. All's we can do is prove that: "this sentence has five letters is not a contradiction and the computer can do that. It cannot however check to see if it conforms with the world.

Part of the problem with Godel's theorems is they are written in mathematical hocus-pocus. And it's true that my 30 hours of independent study of set theory was not enough for me to be able to understand G's theorems. But fortunately what is equally interesting is why other people think they are true and what it is that other people think Godel has proven. I have read three encapsulations of Godel's theorems and about 80 pages of Peter Smith's Godel without Tears which you can read here: http://www.logicmatters.net/.
It is clear that there is a consensus as to what Godel has proven and why he has proven it and it all rests on the fallacy that a symbol without a subject and a predicate is still a sentence. So here is David Papineau's encapsulation:

Quote

Godel’s theorem (more precisely, ‘Godel’s first incompleteness theorem’) shows that no sound theory for arithmetic can be complete. For example, take the theory that has Peano’s postulates as axioms. Assume it is sound—that is, that it contains no falsehoods. Godel showed that there is then a true SENTENCE that can be stated in the language of arithmetic, but which cannot be proved from Peano’s postulates (or from any other reasonable attempt to axiomatize arithmetic).

That's false because the sentence Godel came up with is not a sentence.

Quote

This is a very striking result. It tells us that no sound axiomatic theory can capture all the truths of arithmetic. However many truths are captured by the axioms, there will always be some that escape.
In fact Godel himself didn’t just prove that no sound theory for arithmetic can be complete, but the interestingly stronger result that no consistent theory for arithmetic can be complete.’ (His result is stronger because soundness implies consistency, but consistency does not require soundness.) However, the proof sketched below for the weaker thesis avoids some tiresome technicalities, while still conveying the essential features of Godel’s original construction.
12.6 A Sketch of Godel’s Proof
To prove the theorem, we start by ‘Godel numbering’ all the sentences that can be formulated within the vocabulary of Peano’s theory of arithmetic. (See Box 25.) Godel showed how to construct a system that will associate a unique natural number with any such sentence. The Godel numbers thus serve as labels for the theory’s sentences. (Different systems of Godel numbering can be constructed, using different numbers as labels for the sentences. Let us assume that we have fixed on one such system.)
Godel also showed how to associate a unique number with every sequence of sentences. (We will be interested in sequences of sentences because some such sequences will constitute proofs of their last members from Peano’s axioms using predicate logic rules of inference.)
Given our system of Godel-numbering, this syntactic relation of proof will be mirrored by a numerical relation between numbers—let us symbolize this as m PRF n—which holds just in case m is the Godel number of a sequence that proves the sentence whose Godel number is n.

The mistake that Godel will make is that m is not a sentence.

Quote

Given this, we can think of the numerical relation PRF as encoding the syntactic relation of proof.
While PRF encodes the syntactic relation of proof, we should also hold in mind that PRF is an ordinary relation between numbers. For example, given some specific system of Godel numbering, it might come out that the sequence numbered by m proves the sentence numbered by n if and only if m = n. (Of course, in any actual case it will be far more complicated than that. But the point remains that PRF will be some such ordinary numerical relation.)
Now, Godel showed that this numerical relation PRF can itself be represented within the formal language of arithmetic. Within this language we can write down sentences m PRF n which will be true if and only if the number m bears PRF to the number n.
(This is where most of the hard work comes in his proof.)
Consider now any arithmetic sentence of this form:
K:(There is no x such that)(x PRF k).
In effect, K ‘says’ that the sentence with Godel number k is unprovable.

I think it's fair to say that Godel allows the following sentence to be axiomatic:
Nothing proves k.
Further, Godel does not state what k refers to or why he thinks nothing proves k. Why should I take that as axiomatic? If I ask him what k refers to he won't tell me so why we should allow this strange symbol into our vocabulary if it does not refer to anything. At that Godel's theorem falls apart since it is all based on that premise. Let's keep reading though for more details.

Quote

K will be true if and only if there is no sequence which proves the sentence with Godel number k.
Of course, K doesn’t strictly say that some sentence is unprovable. K is in the first instance an ordinary arithmetical claim.

It's not an ordinary arithmetical claim since we don't know what it refers to. If I saw to someone who has never heard of Godel that 'k is an ordinary arithmetical claim' then no one is going to believe me.

Quote

(Sticking with the illustration above. K comes out as ‘(There is no x such that)(x= k) ). Still, we can happily view K as encoding the unprovability of the sentence with Godel number k, given that K will be true if and only if this sentence is indeed unprovable.
Now we do something clever. Since sentences of the form K are at bottom just ordinary sentences of arithmetic, they themselves have Godel numbers.

Again, K is not an ordinary sentence of arithmetic.

Quote

Using this fact, Godel showed that we can find some specific sentence of this form where k is the Godel number of that sentence itself. We shall call this our ‘Godel sentence' and abbreviate it as G.
So G is the sentence
G: “(There is no x such that)(x PRF g)"
where g is the Godel number of that same sentence.

Again, he's just taking as axiomatic the following:
Nothing proves G.
which no one in their right mind would consider to be axiomatic.

Quote

Observe that G ‘says’ of itself I am not provable.

G is not a sentence, that should be clear by now.

Quote

More precisely, observe that G is an arithmetical sentence that will be true if and only if there is no proof of that sentence itself.
The result now quickly follows. If G is true if and only if it has no proof, there are only two possibilities. G is true and it has no proof. Or G is false and it does have a proof. But the latter possibility is ruled out by our assumption of soundness—a sound theory contains no falsehoods. So the only option left is that G is a true sentence that is not provable in our theory. Quod erat demonstrandum.
To drive the point home, remember that the Godel sentence isn’t some esoteric philosophical claim. It’s just a sentence of arithmetic. Thus, reverting to our earlier illustration, it could be the sentence ‘(There is no x such that)(x = 17.546) where 17.546 is the Godel number of that very sentence.
And what we have done is figured out by attending to our system of Godel numbering, that this numerical sentence is true if and only if it has no proof. Which means that, if arithmetic is sound, then this straightforward arithmetic sentence must be unprovable and true— for the only alternative is for it to be provable and false, which would violate the soundness or arithmetic.

Was This Post Helpful? 0
  • +
  • -

#12 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7562
  • View blog
  • Posts: 12,680
  • Joined: 19-March 11

Re: I want to write some binary code

Posted 04 May 2014 - 07:05 AM

Quote

Part of the problem with Godel's theorems is they are written in mathematical hocus-pocus. And it's true that my 30 hours of independent study of set theory was not enough for me to be able to understand G's theorems


So you don't understand the theorems, but they're false. I see.

I want to suggest that instead of trying to prove that the theorems are false, you might want to try to understand them first. Gödel's Proof by Nagel and Newman might be good start. When you can explain why it is that the proof is considered to be sound, then you will have an easier time convincing others of why this is not actually the case, and collect your Fields medal.
Was This Post Helpful? 1
  • +
  • -

#13 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10364
  • View blog
  • Posts: 38,372
  • Joined: 27-December 08

Re: I want to write some binary code

Posted 04 May 2014 - 10:15 AM

Quote

Yea, I looked at prolog but since I want to insert so many innovations I decided that it would be best to just write my own program. Thanks for the tip though.

What does Prolog lack? I'm curious now. Not to be rude, but as someone who admits he is not a programmer, are you sure you're qualified to say Prolog is too limited for your needs?
Was This Post Helpful? 0
  • +
  • -

#14 leibniz76  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 18
  • Joined: 02-May 14

Re: I want to write some binary code

Posted 04 May 2014 - 11:06 AM

View Postjon.kiparsky, on 04 May 2014 - 07:05 AM, said:

Quote

Part of the problem with Godel's theorems is they are written in mathematical hocus-pocus. And it's true that my 30 hours of independent study of set theory was not enough for me to be able to understand G's theorems


I want to suggest that instead of trying to prove that the theorems are false, you might want to try to understand them first.


Since you understand why they're true, why don't you tell me why it is they're true and why do you accept as axiomatic: "Nothing proves G" and how about telling me why you think G is a sentence, seeing as it doesn't contain a subject and a predicate.

View Postmacosxnerd101, on 04 May 2014 - 10:15 AM, said:

Quote

Yea, I looked at prolog but since I want to insert so many innovations I decided that it would be best to just write my own program. Thanks for the tip though.

What does Prolog lack? I'm curious now. Not to be rude, but as someone who admits he is not a programmer, are you sure you're qualified to say Prolog is too limited for your needs?



Now that I think about it, I suppose the real reason is that I have experience with Excel VBA and I have no experience with any other computing language. Since all of my definitions were already written in Excel and since I understood Excel it was a no brainer to just go ahead and write the code in Excel.
Was This Post Helpful? 0
  • +
  • -

#15 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7562
  • View blog
  • Posts: 12,680
  • Joined: 19-March 11

Re: I want to write some binary code

Posted 04 May 2014 - 11:10 AM

Of course it contains a subject and a predicate. The subject is "This sentence" and the predicate is "is not provable under PM".

Just as LP = "This sentence is false" has a subject and a predicate, "This sentence" and "is false". And just as p="My dog has fleas" has a subject and a predicate.


Quote

Since you understand why they're true, why don't you tell me why it is they're true and why do you accept as axiomatic


I'm not playing that game. Nagel and Newman have written a very nice book explaining the matter, I don't propose to repeat their work. You're the one asserting that the proof is fallacious. If you want to establish that, it would help your case if you showed that you understood the proof. So far, I see little evidence of that, so I see little reason to go any further.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3