|
-
February 1st, 2009, 03:08 AM
#1
using recursion to generate all possible bitstrings of length n
I'm trying to make a 2d array filled with the truth table for n amount of variables
ex. 3 variables will create an array that looks like this
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
i'm having trouble coming up with a recursive algorithm to generate all possible bitstrings.
any help would be appreciated. thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|