View Single Post
  #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...)
__________________

It's not a car, it's an addiction.
The only carb that matters is under the hood.
There's an option for most vehicles that increases brake horsepower, increases mileage, increases driver control, lasts longer than the alternative, and even reduces the price of the vehicle. Despite all this, most people in this country choose the alternative, an automatic transmission.

Reply With Quote