generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Decimal To Binary

Previous Thread :: Next Thread 
oysi93 is not online. oysi93
Joined: 27 Apr 2008
Total Posts: 12469
31 Jul 2010 05:49 PM
For all of you who always wanted to transform regular numbers into binary...
http://www.roblox.com/Oysi93s-Decimal-To-Binary-item?id=31839057

Heck.. Maybe you'll learn from it! =D
Post what you think here!!!

If you want the zeroes to make it more bitwise, then just tell me to add that! =)
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
31 Jul 2010 06:17 PM
Ok...now what's it supposed to do/how do you use it?
Report Abuse
oysi93 is not online. oysi93
Joined: 27 Apr 2008
Total Posts: 12469
31 Jul 2010 06:35 PM
It has no purpose at all really, I made it to help out a friend.
I just thought you could learn from it, and maybe you just
want to know how you actually get the binary of a number. =P

You use it like this:
Binary(NUMBER)

For example:
Binary(3)

Which produces:
11

Which is the binary representation of the decimal number 3. =)
Report Abuse
3141592653589793 is not online. 3141592653589793
Joined: 17 Jun 2009
Total Posts: 735
31 Jul 2010 06:54 PM
" I mainly created this function for a friend of mine"
:3
I feel so special.
Report Abuse
TheSquirrel is not online. TheSquirrel
Joined: 23 Aug 2008
Total Posts: 5557
31 Jul 2010 07:01 PM
Shouldn't it be padded it out a bit?

So 3 is:

00000011

And 255 is:

11111111
Report Abuse
TheSquirrel is not online. TheSquirrel
Joined: 23 Aug 2008
Total Posts: 5557
31 Jul 2010 07:02 PM
Pun not intended, btw.
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
31 Jul 2010 07:05 PM
Shouldn't it print it or something?
Report Abuse
TheSquirrel is not online. TheSquirrel
Joined: 23 Aug 2008
Total Posts: 5557
31 Jul 2010 07:14 PM
print(Binary(1023))
Report Abuse
dallaspenguins34num2 is not online. dallaspenguins34num2
Joined: 26 Apr 2009
Total Posts: 664
31 Jul 2010 07:15 PM
Binary is easy . . .

~JONESY~
Report Abuse
3dGen is not online. 3dGen
Joined: 25 Oct 2009
Total Posts: 1478
31 Jul 2010 07:19 PM
I did that once, because Ozzypig made it has a test to join the scripters helpers group. I did it when I was eleven, and I didn't even know what Binary was... It was a super challenge for me ;-)
Report Abuse
Fungalmungal is not online. Fungalmungal
Joined: 18 Oct 2008
Total Posts: 2519
31 Jul 2010 07:20 PM
Changing two lines, the script is actually applicable to any base under 10.
Report Abuse
Thedogon11 is not online. Thedogon11
Joined: 25 Oct 2009
Total Posts: 1366
31 Jul 2010 07:30 PM
I have a joke those has to do with binary code:



010100011110101010111001010101010010110100101
110101010010101101010101010111010101001010100
100110101010001101010100101010101010101010101
101010101010101011012000101010101001010101001
101010101010010101000010101010101010101010100
100011010101010111010101010101010101010101010
000110101010101010101000011101010101010101011

Blame John.
Report Abuse
Fungalmungal is not online. Fungalmungal
Joined: 18 Oct 2008
Total Posts: 2519
31 Jul 2010 07:37 PM
5368505?
Report Abuse
Fungalmungal is not online. Fungalmungal
Joined: 18 Oct 2008
Total Posts: 2519
31 Jul 2010 07:47 PM
Oops... actually, 5.5624771141794 * 10 ^ 94...?
Report Abuse
bobbyfishstick5 is not online. bobbyfishstick5
Joined: 24 Oct 2008
Total Posts: 6713
31 Jul 2010 08:15 PM
Im learning Binary in school :D
Report Abuse
OBF is not online. OBF
Joined: 29 Sep 2009
Total Posts: 10709
31 Jul 2010 08:16 PM
@bobby
Why?
I doubt my computers teacher doesn't even know wth binary is.. T_T
Report Abuse
SuperZ590 is not online. SuperZ590
Joined: 06 Sep 2008
Total Posts: 266
31 Jul 2010 08:17 PM
I made a batch file that changes binary bits into letters or reverse
Report Abuse
Fungalmungal is not online. Fungalmungal
Joined: 18 Oct 2008
Total Posts: 2519
31 Jul 2010 08:24 PM
All characters are represented as a single byte. A bit is too small to determine a character.
Report Abuse
harutsedo is not online. harutsedo
Joined: 11 Oct 2009
Total Posts: 5150
31 Jul 2010 08:26 PM
And a program that does that would be pretty easy.
Report Abuse
3141592653589793 is not online. 3141592653589793
Joined: 17 Jun 2009
Total Posts: 735
31 Jul 2010 08:33 PM
you guys should see what I'm doing with binary XD

lots of bitwise operations :3
XOR
OR
AND
NOT
ShiftRight
ShiftLeft
RotateRight

I had to create those to operate on strings of 32 bits, to try and create SHA256 on Lua, I'm still working on perfecting everything :c
Report Abuse
harutsedo is not online. harutsedo
Joined: 11 Oct 2009
Total Posts: 5150
31 Jul 2010 08:36 PM
When I said making a program to do that would be easy, I meant program. Not a script. I'm not trying to bring down your script, Oysi.
Report Abuse
oysi93 is not online. oysi93
Joined: 27 Apr 2008
Total Posts: 12469
01 Aug 2010 06:41 AM
I'mma add the padding right away! =D
Thanks for your response! =)
Report Abuse
oysi93 is not online. oysi93
Joined: 27 Apr 2008
Total Posts: 12469
01 Aug 2010 06:48 AM
Padding is now added, you can even decide which bit to perform it on. (8 default)
So now, it's like this: " Binary(Decimal [, Bit]) "

Binary(3) --> 00000011
Binary(1024, 32) --> [That's for you to figure out =P]

Oh, and harutsedo, it was REALLY easy to make it. =P
Heh, just look at the script, it's very small, it doesn't take much to accomplish this. xP
I kinda just wanted to share this. xD
Report Abuse
void0 is not online. void0
Joined: 13 Jul 2010
Total Posts: 72
01 Aug 2010 08:15 AM
@3141592653589793:

I already wrote all of those in a extremely efficient way.

Back when I wrote my MD5 Script for Roblox.
Report Abuse
3141592653589793 is not online. 3141592653589793
Joined: 17 Jun 2009
Total Posts: 735
01 Aug 2010 08:18 AM
you wrote MD5 for ROBLOX :o ? Did you get the right digests ? Cuase my SHA256 script is way off >.< And I'm having trouble figuring out why :c

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image