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

Username:   Password: 
 RegisterRegister   
 Conversion from binary to decimal ???Help?????
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
*GoGeTa*




PostPosted: Mon Oct 18, 2004 5:16 pm   Post subject: Conversion from binary to decimal ???Help?????

Hi, this is my first post on this forum. I am new to turing because recently i have been studying C programming language. Can someone please develop a very simple turing program that converts binary into decimal................. thanks in advance I am not worthy
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Mon Oct 18, 2004 5:20 pm   Post subject: (No subject)

Of course someone can. And that person just happens to be you!

For a start, you'll want to look into your keyboard, and find the F10 button. This will be your friend in Turing. Press it and you'll get an API!

Look around for strint, intstr, ord, and chr. Once you've figured those out, make some code, post it, and then we can do more...
Good luck!
Andy




PostPosted: Mon Oct 18, 2004 5:39 pm   Post subject: (No subject)

Since u've been learning C, post your C code and we'll help you translate it
*GoGeTa*




PostPosted: Tue Oct 19, 2004 4:25 pm   Post subject: (No subject)

ok forget that- ---- Doh! -- im converting a decimal a binary so far i have this..... and btw the teacher wants us to use division and loop it please correct and help..........please make it so that it is one statement repeating in a loop until a certain condition is met........

Here is turing source code.... thanks in advance Puppy Dog Eyes

var num1 : int
var binary : int
var temp : int

put "What is the first number?"
get num1

loop
temp := num1 mod 2
put temp..

binary := num1 div 2
temp := binary mod 2
put temp..

binary := binary div 2
temp := binary mod 2
put temp..

binary := binary div 2
temp := binary mod 2
put temp..

binary := binary div 2
temp := binary mod 2
put temp..

binary := binary div 2
temp := binary mod 2
put temp..

binary := binary div 2
temp := binary mod 2
put temp..

binary := binary div 2
temp := binary mod 2
put temp..
if temp=0 then
exit
end if
end loop
Tony




PostPosted: Tue Oct 19, 2004 4:28 pm   Post subject: (No subject)

just curious - what kind of programming have you done in C? Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Andy




PostPosted: Tue Oct 19, 2004 4:38 pm   Post subject: (No subject)

i was gona say the exact samething... i think by C he means, Crap
*GoGeTa*




PostPosted: Wed Oct 20, 2004 4:32 pm   Post subject: (No subject)

dodge_tomahawk wrote:
i was gona say the exact samething... i think by C he means, Crap


Listen buddy, when you began Turing language i bet you knew nothing, so who you trying to bullshit.....the program i posted, it wasnt mine but it didnt work properly.....so a little help wouldnt kill......unless your the one who nothing but CRAP........ Naughty
wtd




PostPosted: Wed Oct 20, 2004 4:40 pm   Post subject: (No subject)

My first question would be: do you understand how number bases work in general?
Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: Wed Oct 20, 2004 4:42 pm   Post subject: (No subject)

*GoGeTa* wrote:

Listen buddy, when you began Turing language i bet you knew nothing, so who you trying to bullshit....unless your the one who nothing but CRAP........ Naughty


ROFL.. look at the lil fukn dumb noob trying to act all big.. i was refering to the fact that u stated u knew C.. any competent C programmer would know how to do something called while and noe how to write a binary conversion program.. and u dont know sh!t about me, for your info, i was better than you'll ever be when i first started programing so STFU Evil or Very Mad

o, and learn proper grammar before you post again
*GoGeTa*




PostPosted: Wed Oct 20, 2004 5:32 pm   Post subject: (No subject)

dodge_tomahawk wrote:
*GoGeTa* wrote:

Listen buddy, when you began Turing language i bet you knew nothing, so who you trying to bullshit....unless your the one who nothing but CRAP........ Naughty


ROFL.. look at the lil fukn dumb noob trying to act all big.. i was refering to the fact that u stated u knew C.. any competent C programmer would know how to do something called while and noe how to write a binary conversion program.. and u dont know sh!t about me, for your info, i was better than you'll ever be when i first started programing so STFU Evil or Very Mad

o, and learn proper grammar before you post again


I'm with stupid

FYI assho!e, this is turing not C..... There is a difference....If you have a fuckn brain you would have realized that by now...When i said "please make it so that it is one statement repeating in a loop until a certain condition is met........" i knew it was a while or do while loop but i never knew if it existed in turing... instead of answering or telling me that......no... you like to think that ur high and holy ass is better, so why not make fun of them........I got a recommendation, wh dont you just STFU and let someone who has manners talk
Andy




PostPosted: Wed Oct 20, 2004 5:33 pm   Post subject: (No subject)

ROFL.. just read ur program.. it is the most unstructured sh!t ever posted on this site... if u think ur all that, write it in C, and i'll translate it for you

and FYI, i am better
Mazer




PostPosted: Wed Oct 20, 2004 5:36 pm   Post subject: (No subject)

OMG OMG! LOOK!
It's a flying purple turtle topiclocker! Ah you missed it while you were arguing.
Martin




PostPosted: Thu Oct 21, 2004 12:01 pm   Post subject: (No subject)

You guys fucking suck. Mods, please stop flaming, even if you think a person really deserves it. We need to show a level of professionalism here.
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 1  [ 13 Posts ]
Jump to:   


Style:  
Search: