We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionGeneral Discussion,  Status › text to bit code
Page Index Toggle Pages: 1
text to bit code (Read 1543 times)
text to bit code
Apr 20th, 2010, 3:46am
 
Hello,
i recently went through a Java program that converted text files [strings] into bit code.
I'm a noob and looking for tips to understand where to start in processing for building a sketch that takes strings from an external text and converts it (visualize it) in bitcode.
Any help is welcome!
sh
Re: text to bit code
Reply #1 - Apr 20th, 2010, 4:47am
 
Can you explain what is bitcode please?

You mention visualizing. Do you mean you want to convert chars to 0s and 1s and, for example, display nothing for zero and ellipses for one (or two different colors, other shapes, etc.)?

If so, you can convert a String to a byte array (getBytes()), and these bytes are just a bunch of bits, which you can analyze with boolean operations (&, >>>).
Re: text to bit code
Reply #2 - Apr 20th, 2010, 8:12am
 
Yes,
Thank You again,
it's about text to 01 translation.
I just read i can even implement java code.
Look forward to see how it works.
Thanx for now.
sh
Page Index Toggle Pages: 1