Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Encryption / encoding

Author
Message
Mizipzor
20
Years of Service
User Offline
Joined: 24th May 2004
Location: Sweden
Posted: 31st May 2004 10:18
Heres what i want: I want to be able to make numbers into binary code. Not the real binary though, i simply want 1 and 0.

For example:
0001 would be 1
0010 would be 2
0100 could be 3

I only going to use the number 0 to 9 now when im trying it out.

The part i need help with is that when you convert from the binary to the real numbers. Getting it from the string im going to store it in.

For example, heres a string:
010001011101

12 numbers, of each character were translate to four 1's or 0's this should be three characters.

Whats the command to take the four first characters in a string and look at them and then the next? And how should the actuall translation be done? An endless of nested if statements? If the first character=0 then if the second character=0 then...

Sorry for the long post but im not good at explaining stuff...

Dreaming of creating a highly advanced AI mind
DeepBlue
21
Years of Service
User Offline
Joined: 17th May 2003
Location: A little box in the UK
Posted: 31st May 2004 11:45
Quick example below



Twynklet

Login to post a reply

Server time is: 2024-09-22 11:27:02
Your offset time is: 2024-09-22 11:27:02