M17-M20 are invertig the current how is it inverting.
They don't invert.
Is it inverting the ac current?
No, not the transistors. The ac current "inversion" is evoked by feeding a (e.g.) VDD-referenced ac current from the upper PMOS to the lower NMOS, where this very same ac current gets GND-referenced, which causes the "inversion" (same current, but now referenced to the opposite terminal).
No, if you think of absolute value, or current direction. Of course you could say: VDD via the PMOS
sources the current, and the NMOS
sinks the current to GND. If you refer this (same) current to its associated terminal, so it's sourced by VDD and sunk by GND, which you also might consider as inversion, like in the ac case.
M12, M14, M15 and M16 is producing positive current io+ and M17-M20 is producing negative current io-
Here, we must differentiate between the DC & the ac path:
The mirror master M11 from the left Vi- branch reproduces its both DC & ac currents (possibly multiplied by the ratio of the W/L ratios of the involved MOSFETs) by mirror slave M12, which feeds these currents to NMOS mirror master M15, which - on its part - feeds this same current to NMOS mirror slave M16. The PMOS mirror master M13 from the right Vi+ branch via the PMOS mirror slave M14 closes this DC path.
The ac current part from the left Vi- branch (let's call it i
-) via M11 & M12-M15-M16 arrives
inverted (GND-referenced) as -i
- at node Io1, whereas the ac current part from the right Vi+ branch (i
+) - which is
inverted itself compared to the left part - arrives via M13-M14
non-inverted as i
+ at node Io1, where they get added:
-i
- + i
+ = i
+ - i
- = 2i
+ (as i
- = -i
+).
Similar argumentation applies to the Io2 node.
The current comming from the load transistors ar now coming from the source transistors thats why?
It's the same current, s. above!