title: Bitwise ANDING Of Two STD_LOGIC_VECTORS
body: <p>Hey I was wondering if it was at all possible in VHDL to AND two <code>STD_LOGIC_VECTORS</code> together. For example, I'm writing a VHDL program that will output a character to a VGA monitor. I have a vector <code>PixelRow: IN STD_LOGIC_VECTOR(9 DOWNTO 0)</code> and <code>PixelColumn: IN STD_LOGIC_VECTOR(9 DOWNTO 0)</code>. What I'm trying to do is have a <code>STD_LOGIC</code> Output that takes the two pixel vectors and ANDs them with another vector eg.</p>
  
  <pre><code>    Output &lt;= (PixelRow AND NOT "0000000000") OR (PixelColumn AND NOT "0000000000") OR      
                (PixelRow AND NOT "0111011111") OR (PixelColumn AND NOT "1001111111");
  </code></pre>
  
  <p>This code I'm hoping can be used to simplify the following code:</p>
  
  <pre><code>    Output &lt;= ((NOT PixelRow(0) AND NOT PixelRow(1) AND NOT PixelRow(2) AND NOT   
                PixelRow(3) AND NOT PixelRow(4) AND NOT PixelRow(5) AND NOT PixelRow(6)      
                AND NOT PixelRow(7) AND NOT PixelRow(8) AND NOT PixelRow(9)))
            OR ((NOT PixelRow(0) AND PixelRow(1) AND PixelRow(2) AND PixelRow(3) AND 
                NOT PixelRow(4) AND PixelRow(5) AND PixelRow(6) AND PixelRow(7) AND 
                PixelRow(8) AND PixelRow(9)))
            OR ((NOT PixelColumn(0) AND NOT PixelColumn(1) AND NOT PixelColumn(2) AND 
                NOT PixelColumn(3) AND NOT PixelColumn(4) AND NOT PixelColumn(5) AND NOT 
                PixelColumn(6) AND NOT PixelColumn(7) AND NOT PixelColumn(8) AND NOT 
                PixelColumn(9)))
            OR ((PixelColumn(0) AND NOT PixelColumn(1) AND NOT PixelColumn(2) AND 
                PixelColumn(3) AND PixelColumn(4) AND PixelColumn(5) AND PixelColumn(6) 
                AND PixelColumn(7) AND PixelColumn(8) AND PixelColumn(9)));
  </code></pre>
  
  <p>The bigger block of code draws a box around the screen. I'm hoping there's a MUCH easier way to do this. Does anybody know how to simplify this code?</p>
  
  <p>Thanks</p>