
-----------------------------------
person
Sun Jan 30, 2005 11:12 am

turing to binary
-----------------------------------
how do i convert turing code to binary, or binary to turing code by hand?

-----------------------------------
Bacchus
Sun Jan 30, 2005 11:13 am


-----------------------------------
wat are you trying to do? see other ppls code still?

-----------------------------------
person
Sun Jan 30, 2005 11:29 am


-----------------------------------
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
Sun Jan 30, 2005 11:44 am


-----------------------------------
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
Sun Jan 30, 2005 12:00 pm


-----------------------------------
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
Sun Jan 30, 2005 1:27 pm


-----------------------------------
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  :?:   though i also think thats useless and well... chances are it doesn't work :D

-----------------------------------
person
Sun Jan 30, 2005 2:54 pm


-----------------------------------
thanx, but i just want to know how to do it by hand

-----------------------------------
basketball4ever
Sun Jan 30, 2005 3:15 pm


-----------------------------------
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.

-----------------------------------
md
Sun Jan 30, 2005 3:36 pm


-----------------------------------
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.


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!



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
Sun Jan 30, 2005 4:49 pm


-----------------------------------
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.

;) 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
Sun Jan 30, 2005 4:56 pm


-----------------------------------
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
Sun Jan 30, 2005 5:28 pm


-----------------------------------
to turn ASCII text into binary strings simply turn each characters decimal number into a binary number...

-----------------------------------
person
Sun Jan 30, 2005 6:43 pm


-----------------------------------
so let me get this straight, "10" in binary should be "111110", right? or would it be something else? :?:

-----------------------------------
basketball4ever
Sun Jan 30, 2005 8:15 pm


-----------------------------------
Nope.  "10" is actually two binary numbers... 1 and 0.  To make 10 :P... it would be something like this.

00110001 00110000 

00110001 = 1 
00110000 = 0 
;)

-----------------------------------
person
Sun Jan 30, 2005 8:49 pm


-----------------------------------
sorry, i meant an ASCII value of 10

EDIT: nvm, i know that my previous value was wrong

-----------------------------------
cycro1234
Mon Jan 31, 2005 10:06 am


-----------------------------------
If u got an ASCII converter and a binary converter, wouldn't ur life be much easier?

-----------------------------------
person
Mon Jan 31, 2005 10:11 am


-----------------------------------
If u got an ASCII converter and a binary converter, wouldn't ur life be much easier?

it would, but i just wanted to learn how to do it by hand. and also, where would i get those converters now that uv mentioned it?   :D

-----------------------------------
cycro1234
Mon Jan 31, 2005 10:16 am


-----------------------------------
Just go to  www.google.ca and search for "Binary to text converter" and click "I'm Feeling Lucky" 

That should do it :D

-----------------------------------
typon
Mon Jan 31, 2005 2:36 pm


-----------------------------------
uhh
why would you do it in he first place?

-----------------------------------
md
Mon Jan 31, 2005 3:38 pm


-----------------------------------
This entire thread seems kinda pointless... the OP didn't even give a good description of what he was trying to do, and his subsiquent posts have simply confused the issue.

If you would like some information on a specific area then, by all means ask away, but please ask a specific question and stick to it.

-----------------------------------
basketball4ever
Mon Jan 31, 2005 3:41 pm


-----------------------------------
its also weird... how this kinda question.. is postedin "turing Help" forum... this has nothing at all to do with turing...

request: move/delete

-----------------------------------
person
Mon Jan 31, 2005 4:13 pm


-----------------------------------
its also weird... how this kinda question.. is postedin "turing Help" forum... this has nothing at all to do with turing... 

request: move/delete

read the original question please

-----------------------------------
basketball4ever
Mon Jan 31, 2005 4:21 pm


-----------------------------------
its also weird... how this kinda question.. is postedin "turing Help" forum... this has nothing at all to do with turing... 

request: move/delete

read the original question please

i read the orginial post, turing --> binary, binary --> turing.  But its irrelevant to turing programming help.  "Discussion of programming in Turing"  i dont see how binary is gonna help you learn how to code/improve coding.

-----------------------------------
Trojan Man
Mon Jan 31, 2005 6:33 pm


-----------------------------------

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.

97 in binary code is 1100001.

so let me get this straight, "10" in binary should be "111110", right? or would it be something else?

10 in binary code is 1010

sorry, i meant an ASCII value of 10

The ASCII value of 10 is 49, 48. Did you know that a simple command in Turing called ord does it?

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.

Its possible to convert from binary to c++ or java, etc. But, think about it. As cornflake said before the intrepeter of c++\java converts the code into assembly (a low level language), then converts into binary. Converting back is not that easy. Let's use a human language as an example. Let's say you have a sentence in chinese, then you convert into english, then into a language let's say sauvages used, then if you translate back you might not even get the main idea of the sentence. Besides:

Binary instructions are different for each procesor architecture.

Its actually quite simple to convert integers into binary. You just need to know the powers of 2. Here's one way: 97=64+32+1. 64(1 x 2 to the power of 6)+32(1 x 2 to the power of 5)+0 (0 x 2 to the power of 4)+0 (0 x 2 to the power of 3)+0 (0 x 2 to the power of 2)+0 (0 x 2 to the power of 1)+1 (1 x 2 to the power of 0). And then you just record what were the the numbers that you had to miltiply with to get the value (E.g: 64(1 x 2 to the power of 6) its "1" here). So this is how we get 1100001...
If you understand this, you also understand what my signature says.
By the way: you don't have to do this by hand, your Windows calculator can do it for you in like a thousandth of a second.

-----------------------------------
basketball4ever
Mon Jan 31, 2005 6:37 pm


-----------------------------------
the binary stuff you said... isn't there a difference between what bit it is in... because i know theres various amounts of different types of binary?

-----------------------------------
1337_brad
Mon Jan 31, 2005 6:53 pm

There is know ASCII value for 10...
-----------------------------------
There is no ASCII value for numbers since... they are alreayd numberS? o.o; ASCII values convert non-numerical values such as 'a' or the enter key, into numerical values.  If you want an ASCII list, there is one in the turing help file.  Now, if you want  binary, just search on google "binary converter" and you will find tons of programs that convert text into binary.  Although this would not work for the transforming turing into C++ because the Turing compiler does not change the actual code into binary (ie "put "hi"" is not converted)  it reads these tags which have set commands in the compiler, and then a procedure in the compiler writes the actual computer code (in binary) to the computer... if that makes any sense I would be suprised, you see I know what I am saying, yet how to get it across in simple terms I have no clue.

-----------------------------------
person
Mon Jan 31, 2005 7:22 pm


-----------------------------------
There is no ASCII value for numbers

of course there is

0 = 48
1 = 49
2 = 50
3 = 51
4 = 52
5 = ..
6 = ..
7 = ..
8 = ..
9 = 57

-----------------------------------
basketball4ever
Mon Jan 31, 2005 7:27 pm


-----------------------------------
1337_brad, person is right.... theres an ascii for every single thing you see on your keyboard.  plus all the extended ascii stuff.

-----------------------------------
[Gandalf]
Tue Feb 01, 2005 12:37 pm


-----------------------------------
Is there ASCII for Chinese letters?  Or things like the *tm sign - would they be in there too?  Or would it be just a "t" and a "m"?
I don't really know much about ASCII except what it is and some of the letters/numbers.

-----------------------------------
person
Tue Feb 01, 2005 12:43 pm


-----------------------------------
1) there is no ASCII value for chinese letters
2) ASCII is just a numerical value assigned to each button on the keyboard

-----------------------------------
md
Tue Feb 01, 2005 6:15 pm


-----------------------------------


Its possible to convert from binary to c++ or java, etc. But, think about it. As cornflake said before the intrepeter of c++\java converts the code into assembly (a low level language), then converts into binary. Converting back is not that easy. Let's use a human language as an example. Let's say you have a sentence in chinese, then you convert into english, then into a language let's say sauvages used, then if you translate back you might not even get the main idea of the sentence. Besides:

Binary instructions are different for each procesor architecture.


It's actually a wee bit more complex than that...  :wink:   if your interested tell me and i'll try and write an article about it :)


1) there is no ASCII value for chinese letters
2) ASCII is just a numerical value assigned to each button on the keyboard

the ASCII standard specifies those characters needed to display common english text, and specific characters used to comunicating with serial devices. It has also been updated to include some layout and drawing characters (numbers 128-255). Not all the characters in the ASCII table are on your keyboard...

There is another format that uses two bytes to represent characters. This is the standard used for languages that can't be written using the standard ASCII symblos (for some reason the name escapes me...); note that programs must specifically be written to use the double wide character format.


the binary stuff you said... isn't there a difference between what bit it is in... because i know theres various amounts of different types of binary?
I'm not sure exactly what you mean by this, but if you reword it I'll answer your question...

-----------------------------------
typon
Tue Feb 01, 2005 6:50 pm


-----------------------------------

 i know theres various amounts of different types of binary?


not to be mean or anything, but 

 :lol:

-----------------------------------
basketball4ever
Tue Feb 01, 2005 8:14 pm


-----------------------------------
well ionno
1.i suck at binary
2. i dont care about binary

but theres two different waysto write binary...
1. you write it out number by number so 10= 
binary for 1 binary for 0
or
2. your way which i never even heard of.

tehrefore... its not a question, but a statement

-----------------------------------
cycro1234
Tue Feb 01, 2005 8:19 pm


-----------------------------------
01000011011110010110001101110010011011110000110100001010 