Techware Labs Header

Forums have moved

See this announcement for more details, or just go directly there.


Go Back   Techwarelabs Community > Tech > General Board

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-25-2002, 12:22 AM
Keefe Keefe is offline
Administrator
 
Join Date: May 2002
Location: Wisconsin
Posts: 2,337
Send a message via ICQ to Keefe Send a message via AIM to Keefe Send a message via MSN to Keefe Send a message via Yahoo to Keefe
Default 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
Reply With Quote
  #2  
Old 05-25-2002, 03:31 PM
vee_ess's Avatar
vee_ess vee_ess is offline
Super Moderator
 
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
Send a message via ICQ to vee_ess Send a message via AIM to vee_ess Send a message via MSN to vee_ess Send a message via Yahoo to vee_ess
Default 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.
Reply With Quote
  #3  
Old 05-25-2002, 03:37 PM
vee_ess's Avatar
vee_ess vee_ess is offline
Super Moderator
 
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
Send a message via ICQ to vee_ess Send a message via AIM to vee_ess Send a message via MSN to vee_ess Send a message via Yahoo to vee_ess
Default 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.
Reply With Quote
  #4  
Old 05-25-2002, 03:40 PM
vee_ess's Avatar
vee_ess vee_ess is offline
Super Moderator
 
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
Send a message via ICQ to vee_ess Send a message via AIM to vee_ess Send a message via MSN to vee_ess Send a message via Yahoo to vee_ess
Default 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.
Reply With Quote
  #5  
Old 05-25-2002, 11:36 PM
Uranium-235's Avatar
Uranium-235 Uranium-235 is offline
Administrator
 
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
Send a message via ICQ to Uranium-235 Send a message via AIM to Uranium-235
Default 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
Reply With Quote
  #6  
Old 05-25-2002, 11:39 PM
Keefe Keefe is offline
Administrator
 
Join Date: May 2002
Location: Wisconsin
Posts: 2,337
Send a message via ICQ to Keefe Send a message via AIM to Keefe Send a message via MSN to Keefe Send a message via Yahoo to Keefe
Default 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
Reply With Quote
  #7  
Old 05-25-2002, 11:42 PM
Uranium-235's Avatar
Uranium-235 Uranium-235 is offline
Administrator
 
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
Send a message via ICQ to Uranium-235 Send a message via AIM to Uranium-235
Default 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;
}





?>
Reply With Quote
  #8  
Old 05-26-2002, 12:22 AM
vee_ess's Avatar
vee_ess vee_ess is offline
Super Moderator
 
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
Send a message via ICQ to vee_ess Send a message via AIM to vee_ess Send a message via MSN to vee_ess Send a message via Yahoo to vee_ess
Default 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
Reply With Quote
  #9  
Old 05-26-2002, 12:33 AM
vee_ess's Avatar
vee_ess vee_ess is offline
Super Moderator
 
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
Send a message via ICQ to vee_ess Send a message via AIM to vee_ess Send a message via MSN to vee_ess Send a message via Yahoo to vee_ess
Default 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...)
Reply With Quote
  #10  
Old 05-26-2002, 03:45 PM
Uranium-235's Avatar
Uranium-235 Uranium-235 is offline
Administrator
 
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
Send a message via ICQ to Uranium-235 Send a message via AIM to Uranium-235
Default Re: 01000010 01101001 01101110 01100001 01110010 0

are you telling me to change mine? I don't see anything wrong with it
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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.
Forum style by ForumMonkeys.