I am using MDF 1/2 inch thick.
The cutting tool I am using is a Handsaw (brand: stanley)
Often I need to cut small pieces. and most of the time, it does not come up really straight.
is it possible to use handsaw and do straight cuts?
OK, here's more than you wanted to know on the subject of hand saws, from someone who is a hand tool snob...
The first thing to realize is that sharpness has little to do with whether your saw cuts straight. The primary factors are how the teeth are filed (rip cut, versus cross cut) and how they are "set". Of these, "set" is the most important factor. While it may look like the teeth of a saw are all even with the blade, this isn't actually the case. The teeth are actually bent sideways by a slight amount. Usually, the bends alternate: one tooth is bent left, the next is bent right, and so on. The teeth are bent this way so that the saw cuts a kerf that is slightly wider than the blade; if the teeth were all lined up with the blade, the kerf would be exactly as wide as the blade and it would soon become very difficult to move the blade because it would be constantly rubbing on the wood. The problem is that if the teeth aren't all bent the same amount, the saw will tend to wander to one direction or the other. Once the saw wanders off the cut line, it will be difficult or impossible to get it back on track.
The second thing to realize is that most hand saws are designed to cut solid wood. They are very well suited to this task and even a complete newbie can achieve good results with a good saw. Simplifying greatly, the reason for this is that the saw is designed to sort of work with the properties of the wood to make the job easier. Unfortunately, MDF doesn't have anything in common with solid wood. The result is that cutting a straight line in MDF will be more difficult than in real wood.
Finally, realize that you can't buy a decent Western-style hand saw for less than $80-100. In particular, anything you get a Lowe's, Home Depot, Menard's, or Ace Hardware will be a complete piece of junk. The teeth will be set inconsistently and will probably be sharpened for a compromise between rip cuts and cross cuts... which means that it will suck equally for both types of cuts. Because of the poor set, it will be very difficult to make a cheap saw like this cut straight.
If you need an inexpensive hand saw that will work well, go to your local woodworking store (Woodcraft, Rockler, etc) and buy a Japanese-style saw (e.g. a ryoba or dozuki). These saws have very thin blades, at large number of teeth, and cut on the pull stroke rather than the push stroke. You can get a decent one for $30-40. I find that these saws are much easier to use than a Western-style saw that cuts on the push stroke. In particular, I find it much easier to get the cut started using a Japanese-style saw. If you're only going to buy one saw, I would recommend a "ryoba". This type of saw has a bamboo handle and cutting teeth on both sides of the blade. One side is designed for rip cuts, the other for cross cuts. Generally, the side with fewer teeth is used for rip cuts. In some cases, though, both sides are sharpened for cross cutting; one just makes finer cuts than the other.