Assign result of comparison to std_logic
The return type of a comparison operation is boolean. 

For std_logic output try this:

borrowOut &lt;= '1' when unsigned(r1) &lt; unsigned(r2) else '0';


If you are planning to use this frequently, you can overload the operator &lt;

function "&lt;"(L: STD_LOGIC_VECTOR; R: STD_LOGIC_VECTOR) return STD_LOGIC is
 variable result : std_logic;
begin
    result &lt;= '1' when unsigned(r1) &lt; unsigned(r2) else '0';
    return result; 
end;