I am trying to design a comparator using a 741 IC, with a single supply of 12V. I have set the reference to 2V and I require the output to toggle between 12V to 0V. but the problem I am facing is the output is only going to 11V max and min of 2V. What is the reason behind the output saturation?
When selecting a comparator, it is always best to choose a part that is specifically designed for the job. Op amps can be used as comparators, but really, it is usually best to just buy a comparator!
As for the 741 IC, this has many features that are undesirable for a comparator, as a lot of people will tell you. However, we can focus on your specific problem.
You are wanting a device that can saturate to the (power supply) rails. What you need, is a device that can go 'rail to rail' comparator. A google search will give you quite a few options, better yet, go to a website such as Digikey or Farnell and use the search tools there to find the part you require with all the characteristics you need.
As pointed out by Bob in his answer, the datasheet says the guaranteed output is +/- 12V. Typically, it is +/- 14V, but this can depend on the load. The part of the datasheet you are looking for is here:
All datasheets will have this Electrical Characteristics page. you just need to find the Output Voltage Swing. This will tell you how close it can get to the rails.
Note the supply voltage at the top. You can then see how close this IC can get to the rails.
Now you know what to look for, you should be able to find an IC that can do the job you need it to do!
P.S, the 741 is only really good for educational purposes, it isn't great for practical usage! There is always something better!
The 741 is generally not able to go from power rail to power rail, usually falling short by a couple volts.
Page 6 of the rev G data sheet shows this. For a +/-15v supply, the max guaranteed output is only +/-12v.
If you really need a wider swing, you need a different part, or a follower stage of some kind.