05-25-2002, 12:22 AM
|
Administrator
|
|
Join Date: May 2002
Location: Wisconsin
Posts: 2,337
|
|
01000010 01101001 01101110 01100001 01110010 01111
01001001 01100110 00100000 01111001 01101111 01110101 00100000 01100011 01100001 01101110 00100000 01110010 01100101 01100001 01100100 00100000 01110100 01101000 01101001 01110011 00100000 01111001 01101111 01110101 00100000 01100001 01110010 01100101 00100000 01101111 01110110 01100101 01110010 00101101 01100101 01100100 01110101 01100011 01100001 01110100 01100101 01100100 00101110
__________________
It's crazy I'm thinking, just knowing that the world is round.
-http://www.techwarepc.com/ - The Technology Experts
|
05-25-2002, 03:31 PM
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
|
|
Re: 01000010 01101001 01101110 01100001 01110010 0
01101000 01100101 00100000 01101000 01100101 00100000 01101000 01100101 00101110 00100000 01001001 00100000 01100001 01101101 00100000 01110011 01101111 00100000 01100011 01101111 01101111 01101100
it says: he he he. I am so cool.
|
05-25-2002, 03:37 PM
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
|
|
Re: 01000010 01101001 01101110 01100001 01110010 0
01101000 01100101 01110010 01100101 00100000 01101001 01110011 00100000 01110100 01101000 01100101 00100000 01100100 01100101 01100011 01101111 01100100 01100101 01110010 00101110
it says: here is the decoder.
use the decoder in qbasic which is provided in previous message.
|
05-25-2002, 03:40 PM
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
|
|
Re: 01000010 01101001 01101110 01100001 01110010 0
01101000 01100101 01110010 01100101 00100000 01101001 01110011 00100000 01110100 01101000 01100101 00100000 01100101 01101110 01100011 01101111 01100100 01100101 01110010 00101110
it says: here is the encoder.
which you also use in qbasic, and it self-explanatory...IM me for any questions.
|
05-25-2002, 11:36 PM
|
|
Administrator
|
|
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
|
|
Re: 01000010 01101001 01101110 01100001 01110010 0
01001000/01100101/01110010/01100101/00100000/01101001/01110011/00100000/01100001 01101110/01101111/01110100/01101000/01100101/01110010/00100000/01100101/01101110/01100011/01101111/01100100/01100101/01110010/00101110/00100000/01001001/00100000/01110111/01110010/01101111/01110100/01100101/00100000/01100001/00100000/01101100 01101111/01101110/01100111 00100000/01110100/01101001/01101101/01100101/00100000/01100001/01100111/01101111/00101110/00100000/01000001/01101100/01110100/01101000/01101111/01110101/01100111/01101000/00100000/01101001/01110100/00100000/01110101/01110011/01100101/01110011 00100000/01100110/01101111/01110010/01100101/01110111/01100001/01110010/01100100/00100000/01110011/01101100/01100001/01110011/01101000/01100101/01110011/00100000/01100010/01100101/01110100/01110111/01100101/01100101/01101110/00100000/01100101/01100001/01100011/01101000/00100000/01100010/01101001/01101110/00101101/01100001/01110011/01100011/01101001/01101001/00100000/01100100/01101001/01100111/01101001/01110100
it says: Here is another encoder. I wrote a long time ago. Although it uses foreward slashes between each bin-ascii digit
http://dynamic2.gamespy.com/~extreme/scripts/binary.php
|
05-25-2002, 11:39 PM
|
Administrator
|
|
Join Date: May 2002
Location: Wisconsin
Posts: 2,337
|
|
Re: 01000010 01101001 01101110 01100001 01110010 0
01000110 01110101 01100011 01101011 00100000 01111001 01101111 01110101 00100001
__________________
It's crazy I'm thinking, just knowing that the world is round.
-http://www.techwarepc.com/ - The Technology Experts
|
05-25-2002, 11:42 PM
|
|
Administrator
|
|
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
|
|
Re: 01000010 01101001 01101110 01100001 01110010 0
oh yeah and the source
Code:
<?php
//binary.php
//binary, the way it should be (ascii -> binary str)
//8-bit ONLY (characters)
switch($convert)
{
case true:
for($i = 0; $i < strlen($ascii); $i++)
$strarr[$i] = ord(substr($ascii, $i, 1));
for($i = 0; $i < count($strarr); $i++)
$binary_str_pre[$i] = dec_2_bin($strarr[$i]);
$ascii_bin_str = implode("/", $binary_str_pre);
?><input type="text" size="150" value="<?php print($ascii_bin_str); ?>"><?php
break;
default:
?>
<title>ASCII to binary</title>
<form action="binary.php" method="post">
<input type="hidden" name="convert" value=true>
String to Convert: <input type="text" name="ascii" size=70><input type="submit">
</form>
<?php
break;
}
function dec_2_bin($dec)
{
$base = 128;
for($i = 0; $i < 8; $i++)
{
if ($dec >= $base)
{
$dec -= $base;
$bin .= '1';
}
else
$bin .= '0';
$base /= 2;
}
return $bin;
}
?>
|
05-26-2002, 12:22 AM
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
|
|
Re: 01000010 01101001 01101110 01100001 01110010 0
you guys aren't using ascii, are you? ??? I thought the prog was bugged but i did it by hand and that isn't ascii at all.
10101110 11001110 10100110 00000100 10000110 11001110 11000110 10010110 10010110 00000100 11110110 01001110 00000100 00101110 10100110 00110110 00110110 00000100 11001110 00101110 10000110 01110110 00100110 10000110 01001110 00100110
|
05-26-2002, 12:33 AM
|
|
Super Moderator
|
|
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
|
|
Re: 01000010 01101001 01101110 01100001 01110010 0
I figured it out...I had the same problem. to encode ASCII, you must start out with the last bit and move over to the first one in each byte, but in you go through the bytes in order. what you link does is place each of the bytes backwards because you are most likely using one variable, check my prog...
FOR y = 8 TO 1 STEP -1
IF total >= (2 ^ (y - 1)) THEN
total = total - (2 ^ (y - 1))
byte$ = "1" + byte$
ELSE
byte$ = "0" + byte$
END IF
NEXT y
binary$ = binary$ + byte$
notice i put the "1" + byte$ instead of byte$ + "1": the 1 needs to go before the other ones in the byte because it is going in reverse order...
11000110 00010110 10000110 01110110 11100110 10100110 00000100 10011110 11110110 10101110 01001110 00000100 11000110 11110110 00100110 10100110 00000100 00001110 00110110 10100110 10000110 11001110 10100110
it says: change your code please
(cuz it will be more convenient than mine then...)
|
05-26-2002, 03:45 PM
|
|
Administrator
|
|
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
|
|
Re: 01000010 01101001 01101110 01100001 01110010 0
are you telling me to change mine? I don't see anything wrong with it
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:01 PM.
Powered by vBulletin® Version 3.6.5 Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
|