On the conditions of passivity and losslessness in discrete-time