Hello Suresh,
There are a variety of ways to accomplish this. If you are using LabVIEW, you will use the DIO Port Config VI and the DIO Port Read VI. You will use the line direction map input of the DIO Port Config VI to setup which 4 lines you want to be the input lines. The LabVIEW shipping example entitled 'Dig Multi-line Direction (E) VI' shows how to use the lines of the digital port on an E-Series device for input and output.
If you are using NI-DAQ function calls, you can use the Dig_Line_Config and Dig_In_Line calls to configure a digital line for input and then read from that line.
I hope this helps.
Regards,
Todd D.
NI Applications Engineer