Now i have got a huge problam. I want to design a circuit with a bulb connected to it. then it will be connected to my computer through the serial port and I will write a program in visual basic to switch on and switch off the bulb. Now I have a problem do i need to write code on the hardware also, cause I dont know any thing about hardwhere.
You don't have to write any hardware code for a simple turning on/off of a bulb. But u will need a decoding circuit to decode the serial port output. This although dificult to do without a UART but for simple thing like that can be done but still the circuit will be complicated not worth for just turning on/off a bulb. Better suggestion is to use a parallel port.
If just want to switch on/off, using Parallel port, just need to connect one line output to a very simple switch circuit. An aporpiate transistor, resistor and a diode may do the task. there're lots of references in internet. By sending high/low output to the selected parallel port line, you drive the transistor ON/OFF.