To maximize the anti-aircraft capability with a limited number of cannons and guns, barrage* fire was utilized.
Simply put, each gun's alignment and angle is set beforehand according to its effective range. When the order is sent by wire from the center of the ship, each gun will fire simultaneously creating a barrage.
* japanese danmaku, yes same as TouhouDuring the Battle of Leyte Gulf, Ise's 36cm main guns was set to fire forward around 15000 meters.
The twelve 7cm high elevation guns: 8000 meters.
The machine guns: 3500 meters.
Shrapnel rockets: 2000 meters.
Each creating a curtain of barrage fire.