You can use these tutorials to get an idea. I don't really understand what you mean by "test 4 bit in a time". Please clarify. If you have an idea of PICs, then take some time and read the second tutorial, hopefully you should be able to start programming by weekend. Also, make sure you have the relevant data sheet.
actually I know the assembly language, but the things is how to program the infra red sensor is the problem. i don't know when will it be receive the signal.
let say i using 4 IR sensor together for the robot line following purpose. is that the PIC 16F877 microcontroller will receive the signal in the same time? how could I test the bit? if i just use btfss / btfsc instruction for the retrieve the IR signal data?
OK. Strictly speaking, you can't monitor 4 bits at the same time. The program would actually have to scan the sensor data lines one by one, but it would do it so fast that it would appear as if you were scanning all the 4 bits. That obviously will depend on your clock frequency (4 MHz is typical). If your sensor has a digital output, then interfacing with the PICmicro is easy, otherwise you might need additional interfacing circuits.
That's probably the simplest way of doing it. A slightly better way would be to read the port to a temporary location and then do the bit tests on that. That way if something changes in between tests (and it will) it doesn't affect the result.