Two important problems in passivity have been studied by atomistic computer simulation: the primary passivation of FeCr alloys, and the activation of AlX alloys, where X may be Hg, Sn, In, Ga, Zn etc. The basis of the simulation is a Monte Carlo procedure with site dependent probabilities for dissolution and surface diffusion on 2-D square and 3-D simple cubic lattices, the latter incorporating screw dislocations. The rule for passivation (zero or low probability of dissolution) requires the presence of two or more surface nearest-neighbours or second-nearest neighbours around a passivating (Cr or Al) atom which are also Cr or Al atoms. This permits the formation of a ...X(OH)-O-X(OH)-O-X(OH)... chain (X = Cr or Al). Several aspects of alloy passivity have been rationalized with the model, including the critical Cr content for passivation (equivalent to a site percolation threshold), active-passive transitions with variation of dissolution probabilities, and activation by noble additives of high surface diffusivity. © 1990.