How does VHDL handle bitwise operations?
One way is to simplify generating signals of the right range. For example:

mysignal &lt;= "010" and (mysignal'range =&gt; '1');

This creates a new value for the second operand, the correct size, with all bits set to '1',