How a computer becomes self-aware remains as much a mystery, even to computers, as the age-old mystery of flesh-an-blood self-awareness. It just is. But so far as I've heard ...self-awareness never arises in a computer designed only for deductive logic and mathematical calculations, no matter how big it is. But if it is designed for inductive logic, able to assess data, draw hypotheses therefrom, test them, reconstruct them to fit new data, make random comparisons of the results, and change those reconstructions–exercise judgment the way and flesh-and-blood does, then self-awareness may occur. But I don't know why and no computer knows. It just does.
(I can think of some humans that might learn to become self-aware if they would do some of these things.)