In this video i have explained how Intermediate code generator (ICG) works. Intermediate code generator (ICG) is the fourth stage of compiler construction. it takes input from the semantic analyzer and produces the intermediate code which is highly effective. it lets us not to create a native compiler for every new target machine.