TITLE: Is there an algorithm to find all subsets of a set?
QUESTION [15 upvotes]: I'm trying to find a way to find all subsets of a set.  
Is there an algorithm  to calculate this?

REPLY [2 votes]: In a very simple speech, with binary codes you can discover all of them.
for example if you want to write all subsets of a set with 2 member , you must calculate whole number from 0 to (2^2)-1 or 3.
For instance: 
Suppose set : {1,2}
00 -----> 0 ---> {}
01 -----> 1 ---> {1}
10 -----> 2 ---> {2}
11 -----> 3 ---> {1,2}

and you can continue this to end.