Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 turing to binary
Index -> Programming, Turing -> Turing Help
Goto page 1, 2, 3, 4  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
person




PostPosted: Sun Jan 30, 2005 11:12 am   Post subject: turing to binary

how do i convert turing code to binary, or binary to turing code by hand?
Sponsor
Sponsor
Sponsor
sponsor
Bacchus




PostPosted: Sun Jan 30, 2005 11:13 am   Post subject: (No subject)

wat are you trying to do? see other ppls code still?
person




PostPosted: Sun Jan 30, 2005 11:29 am   Post subject: (No subject)

Quote:
wat are you trying to do? see other ppls code still?


no, im just curious on how a computer works only reading binary

btw, even if i were trying to see other ppls codes, this method would probably take too long
Delos




PostPosted: Sun Jan 30, 2005 11:44 am   Post subject: (No subject)

Well....

Considering that "Turing code" is nothing more than plain text, which an interpretter turns into instructions a computer can understand...

You'd probably be working w/ ASCII here. Each character is assigned an 8-digit binary number (the first is used for something...umm...non-ID Related, AFAIK), so there's 128 possible characters. Of course, with more advanced things like Unicode and the like more than 128 are possible.
Anyway, all of that is irrelevant. The point here is the that you convert any given character into a corresponding integer, and convert that integer into its binary equibalent. And there you have it. Text to binary. So good it's gotta be fattening.
person




PostPosted: Sun Jan 30, 2005 12:00 pm   Post subject: (No subject)

Quote:
Well....

Considering that "Turing code" is nothing more than plain text, which an interpretter turns into instructions a computer can understand...

You'd probably be working w/ ASCII here. Each character is assigned an 8-digit binary number (the first is used for something...umm...non-ID Related, AFAIK), so there's 128 possible characters. Of course, with more advanced things like Unicode and the like more than 128 are possible.
Anyway, all of that is irrelevant. The point here is the that you convert any given character into a corresponding integer, and convert that integer into its binary equibalent. And there you have it. Text to binary. So good it's gotta be fattening.


i sort of get it, but im also sort of slow, so can u give me an example of an alphabetical letter such as "a" converted into binary? thanx in advance
basketball4ever




PostPosted: Sun Jan 30, 2005 1:27 pm   Post subject: (No subject)

person wrote:
Quote:
Well....

Considering that "Turing code" is nothing more than plain text, which an interpretter turns into instructions a computer can understand...

You'd probably be working w/ ASCII here. Each character is assigned an 8-digit binary number (the first is used for something...umm...non-ID Related, AFAIK), so there's 128 possible characters. Of course, with more advanced things like Unicode and the like more than 128 are possible.
Anyway, all of that is irrelevant. The point here is the that you convert any given character into a corresponding integer, and convert that integer into its binary equibalent. And there you have it. Text to binary. So good it's gotta be fattening.


i sort of get it, but im also sort of slow, so can u give me an example of an alphabetical letter such as "a" converted into binary? thanx in advance


an easy way to learn binary (but i don't see why you actually want that) is to convert it using a binary converter. Theres ALOT of these on the web, just search on google, binary converter and u'll find one for sure, i guarntee it.

As for why you need it, i think it actually might work, if you can convert a program into binary, then convert it back to text and play it on any other program language processor... meaning... if you get something in binary for turing... maybe you can even make it into a c++ game Question though i also think thats useless and well... chances are it doesn't work Very Happy
person




PostPosted: Sun Jan 30, 2005 2:54 pm   Post subject: (No subject)

thanx, but i just want to know how to do it by hand
basketball4ever




PostPosted: Sun Jan 30, 2005 3:15 pm   Post subject: (No subject)

person wrote:
thanx, but i just want to know how to do it by hand


a better question is... why would u want to do binary by hand... ???
i just dont see the point in that.
Sponsor
Sponsor
Sponsor
sponsor
md




PostPosted: Sun Jan 30, 2005 3:36 pm   Post subject: (No subject)

turing is compiled to binary code by translating each turning instruction into one or more assembly instructions; which are then converted into binary strings which tell the cpu what to do.

Just a note:Binary instructions are different for each procesor architecture.

delos wrote:

Well....

Considering that "Turing code" is nothing more than plain text, which an interpretter turns into instructions a computer can understand...

You'd probably be working w/ ASCII here. Each character is assigned an 8-digit binary number (the first is used for something...umm...non-ID Related, AFAIK), so there's 128 possible characters. Of course, with more advanced things like Unicode and the like more than 128 are possible.
Anyway, all of that is irrelevant. The point here is the that you convert any given character into a corresponding integer, and convert that integer into its binary equibalent. And there you have it. Text to binary. So good it's gotta be fattening.


er... infact ASCII character are 8 bits becuase there are 256 possible characters... the standard simply defines the frist 128... and by converting a character into an integer all your doing is getting it's ascii code; which happens to be how it is stored anyway... and if you then store that in binary, guess what! you get THE VERY SAME BIT PATTERN THAT WAS USED TO REPRESENT THAT CHARACTER!

Your description simple tells how to convert a text file to *GASP* A TEXT FILE! Bravo!

basketball4ever wrote:


an easy way to learn binary (but i don't see why you actually want that) is to convert it using a binary converter. Theres ALOT of these on the web, just search on google, binary converter and u'll find one for sure, i guarntee it.

As for why you need it, i think it actually might work, if you can convert a program into binary, then convert it back to text and play it on any other program language processor... meaning... if you get something in binary for turing... maybe you can even make it into a c++ game Question though i also think thats useless and well... chances are it doesn't work Very Happy

This does not work, not should it as it's based upon some VERY flawed ideas. However you say that you don't hink it should work, so I hold out some hope for you.

As for the original question, you would need to know assembly, and probably the operating system's interfaces. Then you can translate turning to assembly, and then to binary. This will take you a VERY long time, as most turing instructions must be turned into a lot of assembly instructions.
basketball4ever




PostPosted: Sun Jan 30, 2005 4:49 pm   Post subject: (No subject)

Quote:
This does not work, not should it as it's based upon some VERY flawed ideas. However you say that you don't hink it should work, so I hold out some hope for you.


Wink nice flame

but if i were to someone hack into a program, and look at the binary functions. I'm sure theres a complier that rewrites the binary form, into a c++ or java format. It's not impossible, its just time consuming and not worth it.[/quote]
person




PostPosted: Sun Jan 30, 2005 4:56 pm   Post subject: (No subject)

can someone give me an example of turning something with an ASCII value of...o i dont know...lets say...97 into binary please, or where i can find an example of something turned into binary by hand.
md




PostPosted: Sun Jan 30, 2005 5:28 pm   Post subject: (No subject)

to turn ASCII text into binary strings simply turn each characters decimal number into a binary number...
person




PostPosted: Sun Jan 30, 2005 6:43 pm   Post subject: (No subject)

so let me get this straight, "10" in binary should be "111110", right? or would it be something else? Question
basketball4ever




PostPosted: Sun Jan 30, 2005 8:15 pm   Post subject: (No subject)

Nope. "10" is actually two binary numbers... 1 and 0. To make 10 Razz... it would be something like this.

00110001 00110000

00110001 = 1
00110000 = 0
Wink
person




PostPosted: Sun Jan 30, 2005 8:49 pm   Post subject: (No subject)

sorry, i meant an ASCII value of 10

EDIT: nvm, i know that my previous value was wrong
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 4  [ 48 Posts ]
Goto page 1, 2, 3, 4  Next
Jump to:   


Style:  
Search: