title: How to determine if all set bits in one number is also set in another number?
body: <p>Given 2 binary strings <code>a</code> and <code>b</code> of the same length (e.g. <code>111000</code> and <code>110000</code>), is it possible to check if all set bits in <code>b</code> is also set in <code>a</code> using bitwise operations? In the above example, <code>b = 110000</code> has two set bits in position 1 and 2 (from left to right), and those bits are also set in <code>a = 111000</code>.</p>
  
  <p>I can compare two strings character-wise but that would be too slow. I know I can turn the strings into number with something like <code>Integer.parseInt(a, 2);</code> but I don't know the bitwise operations to use to achieve the task.</p>