I'm studying computer architecture and I wonder why the inverter is needed in this ALU?
Practically, in the ALU circuit you posted, with only defined function F[2:0] as 000 (
A AND B operation), not only inverter is not needed, but also small mux device, adder, zero extender and big mux.
As it is a picture from the learning material, you may guess that this ALU circuit diagram may have some other functions, defined by the value of vector input F[2:0]. For example:
If F[2:0]==001 then ALU outputs
A OR B;
If F[2:0]==010 then ALU outputs
A+B with no carry bit;
If F[2:0]==100 then ALU outputs
A AND (NOT B);
If F[2:0]==101 then ALU outputs
A OR (NOT B);
If F[2:0]==110 then ALU outputs
A + (NOT B).
Not all operations may have sense without understanding the context ALU is implemented in though. I also do not know the "zero extend" device and its purpose here. Seems device returns True (1) if resulting number is negative, and False (0) if positive, but it does not elaborate on overflow thus output makes no use for further binary arithmetic operations.