In the 2014 movie Unbroken, at (approximately) the 1 hour 55 minute juncture, a US B-29 flies above the PoWs who were told to bathe in the water, before other B-29s do so. I personally observe that the first B-29 dipped its port wing slightly before leveling again, after which a PoW shouts that the war is over. How did the PoW deduce or realise this?
Here is an explanation:
But then everything is interrupted as an American bomber plane flies overhead and in Morse code tells them that the war is over. All the POWs cheer.
So whatever the pilot did, was Morse code, and a lot of people back then, especially in the war, knew Morse code, and were able to decipher it when they saw or heard it.
This is an excerpt from the actual Louis Zamperini story, explaining how the plane did what it did to signal that the war was over.
Blinking its red lights to communicate in Morse code - “The war is over” - the plane returned a few hours later. Its crew dropped a package including cigarettes, chocolate candy and a magazine with an exploding atomic bomb on its cover.