A detailed analysis of the end-gas temperature and pressure in gasoline engines has been performed. This analysis leads to a simplified zero-dimensional model, that considers both, the compression and the expansion of the end-gas by the piston movement, and the compression by the flame front. If autoignition occurs in the end-gas the sudden rise of the pressure and the heat release is calculated. The rate form of the first law of thermodynamics for a control volume combined with the mass conservation equation for an unsteady and a uniform-flow process are applied. The heat of formation in the end-gas due to the chemical activity has been taken into account. In addition, a chemical kinetic model has been applied in order to study the occurrence of autoignition and prediction of knock.