If you are going to central Beijing, this area is quite different to the rest of China. Security around Tiananmen Square is very tight, and all pedestrians in the area are searched airport-style in large white tents that block the pavement. Here you will be required to present identification (in the form of either a Chinese ID card or a valid passport) before you can get into the main tourist parts. Museums and major places also demand passports to gain entry; as I recall the National Museum of China took my passport away for several minutes of inspection before they allowed me entry.
Most of this work is undertaken by surprisingly young members of the People's Liberation Army rather than by police, and usually they are not interested in your visas, but just want to confirm your picture. Still I am sure they would refer any irregularities to their superiors.
Personally I would strongly discourage you from breaking the rules; a Chinese visa is cheap and easy to obtain. The consequences for breaking the visa conditions may be expulsion from China via the nearest airport, at your expense (after a brief period of detention) and a five year ban. It is, in my opinion, a mistake to think of China as a westernised place where minor infractions of the law by foreigners will be tolerated.