If someone creates a logo of 100% mirrored logo (180 degress) or upside down version (180 degrees) of an existing trademark, is it illegal? is that infringing any copyright or trademark laws? or that new logo cannot be protected by copyright law or any trademark law? I want to know this just for educational purposes.
In the U.S. the purpose of trademarks is to avoid confusion. You can use another's trademark as long as you are not doing so in a manner that will confuse. You can use someone else's trademark to refer to their product as long as you do not do so in a manner that is confusing (e.g., falsely suggesting an endorsement of your product).
The question you need to ask is whether you are doing something that would cause confusion?