Airspeed and pressure altitude both come from the air data box. Would be 429 data between the air data and instruments and transponders.
Mode S sends altitude out 2 different ways the mode C reply in 100' increments and in mode S in 25' increments. If they agree ( say 35,000 and 35,025) the reply is considered valid. If they disagree ( 35,000 and 31,475) the reply is invalid.