The past tense is negated simply by negating the helping verb, while the participle remains the same. To negate the verb to be, we simply add the prefix ni-.
Red reči u negaciji / Word order in the negation
Word order for the negative forms is a bit different. In the word nisam, „sam“ has already got a crutch: „ni“. So nisam normally appears in the beginning of any sentence. We never say „bio nisam“, it’s always „nisam bio“.
(With a note that unusual word order is possible in poetry, songs and jokes.)
Ja juče nisam bio na poslu. Nisam ja juče bio na poslu. Na poslu ja nisam bio juče. Ja na poslu juče nisam bio. – I wasn’t at work yesterday.