LM35 gives an analog output. It outputs 10mV per degree Celsius. You will need an ADC (analog to digital converter) to interface the LM35 to the microcontroller. Few 8051 microcontrollers I know of have an on-chip ADC. So, you may need to use an external ADC such as 0804.
For interfacing LM35 with 89S52 using ADC0804 check here:
**broken link removed**
If LM35 is not a strict requirement, you can use a sensor like DS18S20 to interface directly with the microcontroller without the need to use an ADC.
Hope this helps.
Tahmid.