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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 31 Jul 2010 06:54 PM |
" I mainly created this function for a friend of mine" :3 I feel so special. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 31 Jul 2010 07:05 PM |
| Shouldn't it print it or something? |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Jul 2010 07:15 PM |
Binary is easy . . .
~JONESY~ |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 31 Jul 2010 07:20 PM |
| Changing two lines, the script is actually applicable to any base under 10. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 31 Jul 2010 07:47 PM |
| Oops... actually, 5.5624771141794 * 10 ^ 94...? |
|
|
| Report Abuse |
|
|
|
| 31 Jul 2010 08:15 PM |
| Im learning Binary in school :D |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|