Discuss Scratch

TheBuzzyBeetle
Scratcher
91 posts

How would one make a binary decoder?

I'm considering doing a binary decoder for a project for a password system (things that can only have 2 values are stored together, and combined together into a number, saving some space in the password and encrypting it somewhat). The encoding part seems easy (If a value is on, add its respective number, if it's in the first position, add 1, if it's in second add 2, third adds 4, fourth adds 8, etc.). But converting that number back to a binary string that can be reinterpreted by the variables is a whole different beast I wouldn't know how to tackle.
Nezon
Scratcher
1000+ posts

How would one make a binary decoder?

deleted)

Last edited by Nezon (Nov. 6, 2020 06:11:38)

Wainggan
Scratcher
500+ posts

How would one make a binary decoder?

Get ready for this…

Scratch has it built in!

join0binput+0
This takes a binary input and outputs a decimal!

join0xinput+0
You can also do this with hex,
TheBuzzyBeetle
Scratcher
91 posts

How would one make a binary decoder?

Ooh, i'll keep that in mind, that should make things easier. But i'm also interested in how to convert it back (like converting 255->11111111, for example.).
YellowStickFigur
Scratcher
4 posts

How would one make a binary decoder?

whenmBotmcorestartsupstartLedsdefinestartLedsturnonalllights
Mblock
ChatGPT3-0
Scratcher
6 posts

How would one make a binary decoder?

bump

Powered by DjangoBB