title: Whats the logic to print the truth table values given the x in 2^x?
body: <p>given </p>
  
  <p>x=2 rows= pow(2,2)=4 and colums=2</p>
  
  <p>output:</p>
  
  <pre><code>T T
  T F
  F T
  F F
  </code></pre>
  
  <p>x=3 rows= pow(2,3)=8 and colums=8</p>
  
  <p>output:</p>
  
  <pre><code>T T T
  T T F
  T F T
  T F F
  F T T
  F T F
  F F T
  F F F
  </code></pre>
  
  <p>and so on.
  it could be to print like this or to create an char array with 2^x rows and x columns and  with T/F as values.</p>
  
  <p>I can think of it as for say column number j - change should occur after pow(2,x-(j+1))</p>
  
  <p>thanks;
  pseudo code or java is preferred </p>