Re: TCAS II operational logic
ACAS II (Airborne Collision Avoidance System) is specified in ICAO SARPs (Standards And Recommended Practices) - Annex 10, Volume IV.
TCAS II (Traffic alert and Collision Avoidance System) is a specific implementation of the ACAS standard (and as far as I know the only implementation). It is specified in MOPS (Minimum Operational Performance Standards) - RTCA DO-185B = EUROCAE ED-143.
The MOPS contain a state diagram description of the collision avoidance logic. They also contain a pseudocode version of the logic which has been verified as a valid represntation of the state diagrams. Manufacturers implement either the state diagrams or the pseudocode as software in their TCAS equipment.