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: I MADE A BINARY CONVERTER SCRIPT

Previous Thread :: Next Thread 
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 07:33 AM
http://www.roblox.com/uomevip-39-s-Binary-Converter-item?id=152794964
Report Abuse
TaaRt is online. TaaRt
Joined: 26 Apr 2009
Total Posts: 5039
09 Apr 2014 07:34 AM
ya uhmn that's rly useful if I ever feel too lazy to modulo 2
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
09 Apr 2014 07:35 AM
The problem is that is so easy :/.
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 07:36 AM
@Taa
You can't module binary
@flat
You need knowledge of converting binary, tables, and more
Report Abuse
TaaRt is online. TaaRt
Joined: 26 Apr 2009
Total Posts: 5039
09 Apr 2014 07:37 AM
recursively modulo a number with 2, rest 1 or rest 0. Done
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
09 Apr 2014 07:39 AM
You need knowledge of converting binary, tables, and more
--------------------------
You need the binary alphabet, tables for that alphabet, a loop that looks like this: for x in string.gmatch("pattern", string) do another for loop and that is about it.
Report Abuse
TaaRt is online. TaaRt
Joined: 26 Apr 2009
Total Posts: 5039
09 Apr 2014 07:40 AM
It's a 5 line script if you modulo 2 a number and return the rest each time, no tables whatsoever
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 07:41 AM
@Taa
No...
To convert 1111 to decimal you need to make like a chart, I don't need to cause I memberized it, but it needs to be like this: 1|2|4|8
1|1|1|1
Since there is a one in each 8 + 4 + 2 + 1 = 15
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 07:44 AM
@Flat
Binary "Alphabet"? Get out please.
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
09 Apr 2014 07:45 AM
Binary "Alphabet"? Get out please.
-----------
http://www.convertbinary.com/alphabet.php

-_-
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 07:46 AM
@Flat
This thread is about converting to DECIMAL.
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
09 Apr 2014 07:47 AM
This thread is about converting to DECIMAL.
----------------
Good job on explicitly stating this in the OP or any other post besides this one.
Report Abuse
TaaRt is online. TaaRt
Joined: 26 Apr 2009
Total Posts: 5039
09 Apr 2014 07:48 AM
You are a bit moronic if you write it down instead of using math.pow(i,2)
Report Abuse
TaaRt is online. TaaRt
Joined: 26 Apr 2009
Total Posts: 5039
09 Apr 2014 08:01 AM
function tonumer(bin)
s = string.reverse(bin)
temp = 0
for i = 1,string.len(s) do
if tonumber(string.sub(s,i,i)) == 1 then
temp = temp + math.pow(2,i)
end
end
return temp
end


print(tonumer(1111))
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
09 Apr 2014 08:24 AM
CANT SET A FUNCTION NAME AFTER AN ACTUAL THING
lel,caps

print (tonumber(685h854t))
685854
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
09 Apr 2014 09:38 AM
Binary to Decimal, it's modulo 2 to modulo 10.

If you want it even quicker, write hex to dec (Modulo 16 to modulo 10).


0xffffff <--- White, or three bytes of 1's.

--Shira
Report Abuse
Articulating is not online. Articulating
Joined: 12 Nov 2011
Total Posts: 708
09 Apr 2014 09:49 AM
The peak of my scripting career; a binary to decimal converter;
function toDecimal(Binary)
return tonumber(Binary, 2)
end
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 09:54 AM
All your binary functions did not work
@Art
10:53:01.556 - Workspace.Script:4: attempt to call global 'todecimal' (a nil value)
10:53:01.557 - Script 'Workspace.Script', Line 4
10:53:01.558 - stack end
@Taa
16383, Witch is the wrong answer
BTW, I was using 0101
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 09:56 AM
Wait nvm
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 09:58 AM
@Taa
Your's is WAY off.
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 09:59 AM
@Art
Your's is close
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
09 Apr 2014 10:00 AM
local decimal = 504
local hex
local bin

function tobin(dec)
bin = tonumber(dec, 0x2)
end

function tohex(dec)
hex = tonumber(dec, 0xf1)
end
Report Abuse
uomevip is not online. uomevip
Joined: 31 Jul 2011
Total Posts: 1695
09 Apr 2014 10:00 AM
@Art
I can't tell witch is your's, just ignore my comments
Report Abuse
TaaRt is online. TaaRt
Joined: 26 Apr 2009
Total Posts: 5039
09 Apr 2014 04:37 PM
I wrote it in a minute and in the hurry forgot to make it start with 2^0, it does 2^1 as the first digit and thus ends up wrong by one bit
Report Abuse
zomg44 is not online. zomg44
Joined: 30 Sep 2008
Total Posts: 5678
09 Apr 2014 04:47 PM
Seems legit.
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