4-Bit Adder Subtractor Quartus Prime Lite
The sense of the carry out is inverted for subtraction: COUT=1 means that the result of a subtraction is correct. Note that all of the cases you simulated yielded a correct result for subtraction...try swapping the operands and see what happens.