21
3
You have a 3x3 grid. Each cell can be colored black or white. Display all 512 of these colorings. Fewest bytes wins.
You can display the grids in any formation as long as they are visually separated and the spacing looks regular. You may use ASCII art or images. Any two distinct visible symbols or colors can be used for black and white. Any whitespace is fine as long as the result is visually correct.
Example output:
...
...
...
...
...
..X
...
...
.X.
...
...
.XX
...
...
X..
...
...
X.X
...
...
XX.
...
...
XXX
...
..X
...
...
..X
..X
...
..X
.X.
...
..X
.XX
...
..X
X..
...
..X
X.X
...
..X
XX.
...
..X
XXX
...
.X.
...
...
.X.
..X
...
.X.
.X.
...
.X.
.XX
...
.X.
X..
...
.X.
X.X
...
.X.
XX.
...
.X.
XXX
...
.XX
...
...
.XX
..X
...
.XX
.X.
...
.XX
.XX
...
.XX
X..
...
.XX
X.X
...
.XX
XX.
...
.XX
XXX
...
X..
...
...
X..
..X
...
X..
.X.
...
X..
.XX
...
X..
X..
...
X..
X.X
...
X..
XX.
...
X..
XXX
...
X.X
...
...
X.X
..X
...
X.X
.X.
...
X.X
.XX
...
X.X
X..
...
X.X
X.X
...
X.X
XX.
...
X.X
XXX
...
XX.
...
...
XX.
..X
...
XX.
.X.
...
XX.
.XX
...
XX.
X..
...
XX.
X.X
...
XX.
XX.
...
XX.
XXX
...
XXX
...
...
XXX
..X
...
XXX
.X.
...
XXX
.XX
...
XXX
X..
...
XXX
X.X
...
XXX
XX.
...
XXX
XXX
..X
...
...
..X
...
..X
..X
...
.X.
..X
...
.XX
..X
...
X..
..X
...
X.X
..X
...
XX.
..X
...
XXX
..X
..X
...
..X
..X
..X
..X
..X
.X.
..X
..X
.XX
..X
..X
X..
..X
..X
X.X
..X
..X
XX.
..X
..X
XXX
..X
.X.
...
..X
.X.
..X
..X
.X.
.X.
..X
.X.
.XX
..X
.X.
X..
..X
.X.
X.X
..X
.X.
XX.
..X
.X.
XXX
..X
.XX
...
..X
.XX
..X
..X
.XX
.X.
..X
.XX
.XX
..X
.XX
X..
..X
.XX
X.X
..X
.XX
XX.
..X
.XX
XXX
..X
X..
...
..X
X..
..X
..X
X..
.X.
..X
X..
.XX
..X
X..
X..
..X
X..
X.X
..X
X..
XX.
..X
X..
XXX
..X
X.X
...
..X
X.X
..X
..X
X.X
.X.
..X
X.X
.XX
..X
X.X
X..
..X
X.X
X.X
..X
X.X
XX.
..X
X.X
XXX
..X
XX.
...
..X
XX.
..X
..X
XX.
.X.
..X
XX.
.XX
..X
XX.
X..
..X
XX.
X.X
..X
XX.
XX.
..X
XX.
XXX
..X
XXX
...
..X
XXX
..X
..X
XXX
.X.
..X
XXX
.XX
..X
XXX
X..
..X
XXX
X.X
..X
XXX
XX.
..X
XXX
XXX
.X.
...
...
.X.
...
..X
.X.
...
.X.
.X.
...
.XX
.X.
...
X..
.X.
...
X.X
.X.
...
XX.
.X.
...
XXX
.X.
..X
...
.X.
..X
..X
.X.
..X
.X.
.X.
..X
.XX
.X.
..X
X..
.X.
..X
X.X
.X.
..X
XX.
.X.
..X
XXX
.X.
.X.
...
.X.
.X.
..X
.X.
.X.
.X.
.X.
.X.
.XX
.X.
.X.
X..
.X.
.X.
X.X
.X.
.X.
XX.
.X.
.X.
XXX
.X.
.XX
...
.X.
.XX
..X
.X.
.XX
.X.
.X.
.XX
.XX
.X.
.XX
X..
.X.
.XX
X.X
.X.
.XX
XX.
.X.
.XX
XXX
.X.
X..
...
.X.
X..
..X
.X.
X..
.X.
.X.
X..
.XX
.X.
X..
X..
.X.
X..
X.X
.X.
X..
XX.
.X.
X..
XXX
.X.
X.X
...
.X.
X.X
..X
.X.
X.X
.X.
.X.
X.X
.XX
.X.
X.X
X..
.X.
X.X
X.X
.X.
X.X
XX.
.X.
X.X
XXX
.X.
XX.
...
.X.
XX.
..X
.X.
XX.
.X.
.X.
XX.
.XX
.X.
XX.
X..
.X.
XX.
X.X
.X.
XX.
XX.
.X.
XX.
XXX
.X.
XXX
...
.X.
XXX
..X
.X.
XXX
.X.
.X.
XXX
.XX
.X.
XXX
X..
.X.
XXX
X.X
.X.
XXX
XX.
.X.
XXX
XXX
.XX
...
...
.XX
...
..X
.XX
...
.X.
.XX
...
.XX
.XX
...
X..
.XX
...
X.X
.XX
...
XX.
.XX
...
XXX
.XX
..X
...
.XX
..X
..X
.XX
..X
.X.
.XX
..X
.XX
.XX
..X
X..
.XX
..X
X.X
.XX
..X
XX.
.XX
..X
XXX
.XX
.X.
...
.XX
.X.
..X
.XX
.X.
.X.
.XX
.X.
.XX
.XX
.X.
X..
.XX
.X.
X.X
.XX
.X.
XX.
.XX
.X.
XXX
.XX
.XX
...
.XX
.XX
..X
.XX
.XX
.X.
.XX
.XX
.XX
.XX
.XX
X..
.XX
.XX
X.X
.XX
.XX
XX.
.XX
.XX
XXX
.XX
X..
...
.XX
X..
..X
.XX
X..
.X.
.XX
X..
.XX
.XX
X..
X..
.XX
X..
X.X
.XX
X..
XX.
.XX
X..
XXX
.XX
X.X
...
.XX
X.X
..X
.XX
X.X
.X.
.XX
X.X
.XX
.XX
X.X
X..
.XX
X.X
X.X
.XX
X.X
XX.
.XX
X.X
XXX
.XX
XX.
...
.XX
XX.
..X
.XX
XX.
.X.
.XX
XX.
.XX
.XX
XX.
X..
.XX
XX.
X.X
.XX
XX.
XX.
.XX
XX.
XXX
.XX
XXX
...
.XX
XXX
..X
.XX
XXX
.X.
.XX
XXX
.XX
.XX
XXX
X..
.XX
XXX
X.X
.XX
XXX
XX.
.XX
XXX
XXX
X..
...
...
X..
...
..X
X..
...
.X.
X..
...
.XX
X..
...
X..
X..
...
X.X
X..
...
XX.
X..
...
XXX
X..
..X
...
X..
..X
..X
X..
..X
.X.
X..
..X
.XX
X..
..X
X..
X..
..X
X.X
X..
..X
XX.
X..
..X
XXX
X..
.X.
...
X..
.X.
..X
X..
.X.
.X.
X..
.X.
.XX
X..
.X.
X..
X..
.X.
X.X
X..
.X.
XX.
X..
.X.
XXX
X..
.XX
...
X..
.XX
..X
X..
.XX
.X.
X..
.XX
.XX
X..
.XX
X..
X..
.XX
X.X
X..
.XX
XX.
X..
.XX
XXX
X..
X..
...
X..
X..
..X
X..
X..
.X.
X..
X..
.XX
X..
X..
X..
X..
X..
X.X
X..
X..
XX.
X..
X..
XXX
X..
X.X
...
X..
X.X
..X
X..
X.X
.X.
X..
X.X
.XX
X..
X.X
X..
X..
X.X
X.X
X..
X.X
XX.
X..
X.X
XXX
X..
XX.
...
X..
XX.
..X
X..
XX.
.X.
X..
XX.
.XX
X..
XX.
X..
X..
XX.
X.X
X..
XX.
XX.
X..
XX.
XXX
X..
XXX
...
X..
XXX
..X
X..
XXX
.X.
X..
XXX
.XX
X..
XXX
X..
X..
XXX
X.X
X..
XXX
XX.
X..
XXX
XXX
X.X
...
...
X.X
...
..X
X.X
...
.X.
X.X
...
.XX
X.X
...
X..
X.X
...
X.X
X.X
...
XX.
X.X
...
XXX
X.X
..X
...
X.X
..X
..X
X.X
..X
.X.
X.X
..X
.XX
X.X
..X
X..
X.X
..X
X.X
X.X
..X
XX.
X.X
..X
XXX
X.X
.X.
...
X.X
.X.
..X
X.X
.X.
.X.
X.X
.X.
.XX
X.X
.X.
X..
X.X
.X.
X.X
X.X
.X.
XX.
X.X
.X.
XXX
X.X
.XX
...
X.X
.XX
..X
X.X
.XX
.X.
X.X
.XX
.XX
X.X
.XX
X..
X.X
.XX
X.X
X.X
.XX
XX.
X.X
.XX
XXX
X.X
X..
...
X.X
X..
..X
X.X
X..
.X.
X.X
X..
.XX
X.X
X..
X..
X.X
X..
X.X
X.X
X..
XX.
X.X
X..
XXX
X.X
X.X
...
X.X
X.X
..X
X.X
X.X
.X.
X.X
X.X
.XX
X.X
X.X
X..
X.X
X.X
X.X
X.X
X.X
XX.
X.X
X.X
XXX
X.X
XX.
...
X.X
XX.
..X
X.X
XX.
.X.
X.X
XX.
.XX
X.X
XX.
X..
X.X
XX.
X.X
X.X
XX.
XX.
X.X
XX.
XXX
X.X
XXX
...
X.X
XXX
..X
X.X
XXX
.X.
X.X
XXX
.XX
X.X
XXX
X..
X.X
XXX
X.X
X.X
XXX
XX.
X.X
XXX
XXX
XX.
...
...
XX.
...
..X
XX.
...
.X.
XX.
...
.XX
XX.
...
X..
XX.
...
X.X
XX.
...
XX.
XX.
...
XXX
XX.
..X
...
XX.
..X
..X
XX.
..X
.X.
XX.
..X
.XX
XX.
..X
X..
XX.
..X
X.X
XX.
..X
XX.
XX.
..X
XXX
XX.
.X.
...
XX.
.X.
..X
XX.
.X.
.X.
XX.
.X.
.XX
XX.
.X.
X..
XX.
.X.
X.X
XX.
.X.
XX.
XX.
.X.
XXX
XX.
.XX
...
XX.
.XX
..X
XX.
.XX
.X.
XX.
.XX
.XX
XX.
.XX
X..
XX.
.XX
X.X
XX.
.XX
XX.
XX.
.XX
XXX
XX.
X..
...
XX.
X..
..X
XX.
X..
.X.
XX.
X..
.XX
XX.
X..
X..
XX.
X..
X.X
XX.
X..
XX.
XX.
X..
XXX
XX.
X.X
...
XX.
X.X
..X
XX.
X.X
.X.
XX.
X.X
.XX
XX.
X.X
X..
XX.
X.X
X.X
XX.
X.X
XX.
XX.
X.X
XXX
XX.
XX.
...
XX.
XX.
..X
XX.
XX.
.X.
XX.
XX.
.XX
XX.
XX.
X..
XX.
XX.
X.X
XX.
XX.
XX.
XX.
XX.
XXX
XX.
XXX
...
XX.
XXX
..X
XX.
XXX
.X.
XX.
XXX
.XX
XX.
XXX
X..
XX.
XXX
X.X
XX.
XXX
XX.
XX.
XXX
XXX
XXX
...
...
XXX
...
..X
XXX
...
.X.
XXX
...
.XX
XXX
...
X..
XXX
...
X.X
XXX
...
XX.
XXX
...
XXX
XXX
..X
...
XXX
..X
..X
XXX
..X
.X.
XXX
..X
.XX
XXX
..X
X..
XXX
..X
X.X
XXX
..X
XX.
XXX
..X
XXX
XXX
.X.
...
XXX
.X.
..X
XXX
.X.
.X.
XXX
.X.
.XX
XXX
.X.
X..
XXX
.X.
X.X
XXX
.X.
XX.
XXX
.X.
XXX
XXX
.XX
...
XXX
.XX
..X
XXX
.XX
.X.
XXX
.XX
.XX
XXX
.XX
X..
XXX
.XX
X.X
XXX
.XX
XX.
XXX
.XX
XXX
XXX
X..
...
XXX
X..
..X
XXX
X..
.X.
XXX
X..
.XX
XXX
X..
X..
XXX
X..
X.X
XXX
X..
XX.
XXX
X..
XXX
XXX
X.X
...
XXX
X.X
..X
XXX
X.X
.X.
XXX
X.X
.XX
XXX
X.X
X..
XXX
X.X
X.X
XXX
X.X
XX.
XXX
X.X
XXX
XXX
XX.
...
XXX
XX.
..X
XXX
XX.
.X.
XXX
XX.
.XX
XXX
XX.
X..
XXX
XX.
X.X
XXX
XX.
XX.
XXX
XX.
XXX
XXX
XXX
...
XXX
XXX
..X
XXX
XXX
.X.
XXX
XXX
.XX
XXX
XXX
X..
XXX
XXX
X.X
XXX
XXX
XX.
XXX
XXX
XXX
@edc65 xnor made the edit, and Filipe approved it (after which I purged the comments). I just added tags. – Martin Ender – 2015-06-09T21:41:28.110
Can we move the example to a PasteBin? It’s anemic to scroll as of right now. Besides, this is just the power set of the input squared, divided into lines of the input where the
1
s and0
s are replaced byX
and.
– Stan Strum – 2018-04-14T21:30:43.210