When flying instrument approaches in a rented plane, Approach called out an altitude discrepancy between the assigned altitude which is being flown using the altimeter and the altitude being reported by the Mode 3/C transponder. Back at the hangar, the question is: does the aircraft have or need an encoding altimeter interfaced to the transponder to report altitude, is it built into some transponders; or was the Approach controller using altitude as reported by the radar if it has height finding capabilities?
does the aircraft have or need an encoding altimeter interfaced to the transponder to report altitude, is it built into some transponders
In order to squawk mode C, you need an encoding altimeter connected to your transponder and the transponder needs to be set to transmit mode C. Does that transponder have a build-in encoding altimeter? That requires a check through the logs and/ or manuals. In my aircraft they are separate, in yours I have no idea.
or was the Approach controller using altitude as reported by the radar if it has height finding capabilities?
Maybe. It depends upon the specifics of the airport. If your transponder's altimeter was calibrated incorrectly or otherwise bad (extremely difficult for you as the pilot to verify in a rental aircraft during preflight) then they may have been trusting your transponder for your altitude data, which was incorrect. If they were using radar with vertical capabilities (precision approach radar is, depending upon your viewpoint of part 91 vs part 121, either relatively rare or everywhere you might need it where I live) they may have been comparing that to your transponder's altitude reported.
All of this depends upon if you checked your altimeter using the current local setting on the runway threshold prior to takeoff. Have I always done that? Yes. Does everyone? No. If your panel altimeter checked out, you used the proper setting during the approach, and your transponder is telling them you are at the wrong altitude the transponder's altimeter appears to be the problem.
I'm no expert, but from what I gather the transponder has a direct connection to the altimeter pre-Kollsman window. Not sure how that's possible but it's something along those lines.
Essentially the transponder reports your flight level to ATC no matter what— it always reports your altitude assuming an altimeter setting of 29.92. Then the radar system on the ground corrects that given the current altimeter setting in your area, which can be manually entered by the controller but is usually updated automatically. The controller asks you what you're seeing in the cockpit, and hopes that 1) you've entered the altimeter setting properly and 2) what you see matches what the scope shows (bearing in mind it only displays to the nearest hundred feet).
The two numbers might not match perfectly because of issues in the transponder's calibration or other such problems. If the mismatch is 300 feet or more, you will be asked to discontinue altitude squawk (squawk ON or NORMAL instead of ALT) and the controller will manually input a "pilot-reported altitude" on your data tag and ask you to report prior to changing your altitude. They're assuming what you see in the cockpit is correct and what the transponder reports isn't, so please make sure you have the correct altimeter setting!
Unless you were talking to a super-fancy military approach control, they were not using the actual radar system to determine your height above the radar site. Civilian radar systems only provide azimuth and range, not elevation; they rely on aircraft-reported SSR for altitude information.
Mode A/C Transponders were originally implemented because the best you could get from skin reflection radar was a slant range altitude that wasn't very accurate. The altitude that a mode A/C transponder transmits with when swept by a Secondary Surveillance Radar or that a Mode S transponder autonomously squits (transmits every 1/4 sec) is pressure altitude.
Pressure altitude is the altitude indicated by a barometric altimeter with the Kollsman window or barometretric offsett set to 29.92 inches HG.
In older aircraft, there could be an encoder that provides the signal to the transponder over a parallel bus using machine code. In more modern aircraft it would come from an air data computer over a serial bus like ARINC 429 OR 629.