I am looking for writing a program to achieve this. The video: https://tidalhifi.com/in/video/lossless-explained demonstrates what I am asking about. Thanks in advance.
That depends on what you mean by audible. You can invert the phase of one and add it back to the other and it will play only what the difference between the two is, however you will hear artifacts that might not have been detectable to normal hearing in the original file since they were previously buried underneath other sounds.
It is also important to make sure you have things perfectly in sync when doing this. Any variation in position will result in issues as will any additional anti-aliasing that was done on the files during processing, so it may not be an exactly accurate comparison.
Audible differences is something different than electrically measurable differences. The techniques mentioned (by computing the difference between the two signals) allow to measure differences between two signals but don't give real details about the perceived difference.
The correct way to evaluate audible differences is to setup a panel of listener, and have them run a blind test on several samples in random order. Note that the test might be run differently depending on the scale of the differences. That is not an easy task.
Here's an example : the ITU BS 1116 Methods for the subjective assessment of small impairments in audio systems.