All-optical half adder using cross gain modulation in semiconductor optical amplifiers.