By squawking 7600 (lost communications squawk code), ATC will know you've had a communications failure. Even if you weren't talking to ATC before, they'll notice you now if you're in a radar covered area.
In general you are going to squawk 2000 when oceanic, waiting 30 minutes after the entry waypoint is required over the North Atlantic and doesn't hurt elsewhere. There are exceptions so make sure you view the regional pages before entry.
You may have wondered how air traffic control can distinguish between different aircraft on their radar screens. The answer is through the use of squawk codes. And, some codes are more important than others! Today we will present you with a squawk codes list detailing some common codes used in aviation and a detailed explanation of their meaning. 041b061a72