For all N>0, if N & (N-1) != 0, then at least two bits are set.
--------+---------+-
|SUB |
| N | //Subtract 1 from N
| 1 |
| A | //Store result in A
+---------+
--------+---------+-
|AND |
| N | //Bitwise And N and A
| A |
| B | //Store result in B
+---------+
ALARM
--+---------+---------{ )-
|NEQ |
| B | //If B != 0 then alarm
| 0 |
+---------+
------------------------------------------
edit:
Ooops, I should have read the post a little better, the OP was looking for
MORE than two bits.
(N&(N-1)) & ((N&(N-1))-1)) != 0 should do the trick to test if three or more bits are set.
--------+---------+-
|SUB |
| N | //Subtract 1 from N
| 1 |
| A | //Store result in A
+---------+
--------+---------+-
|AND |
| N | //Bitwise And N and A
| A |
| B | //Store result in B
+---------+
--------+---------+-
|SUB |
| B | //Subtract 1 from B
| 1 |
| C | //Store result in C
+---------+
--------+---------+-
|AND |
| B | //Bitwise And B and C
| C |
| D | //Store result in D
+---------+
ALARM
--+---------+---------{ )-
|NEQ |
| D | //If D != 0 then Alarm
| 0 |
+---------+