The aspect particle 了 is added to the end of a verb to indicate the completion of an action. In general, Chinese perfect aspect is equivalent to perfect tenses (present perfect, past perfect or future perfect) in English. So, the completion of an action can take place in the past or in the future. For instance:
A: 你下了課去哪兒﹖
B: 我下了課去圖書館。
On the other hand, a past action is not always followed by the aspect particle 了, if it is a simple statement or a habitual action and there is no need to emphasise its completion:
去年他常常去書店。
以前我住在學生宿舍。
Affirmative sentence
Subject + verb + 了 (+ object)
e.g. 電影開始了。 我買了兩本書。
Negative sentence (note 了 is dropped here)
Subject + 沒(有) + verb (+ object)
or subject + 還沒(有) + verb (+ 呢)
e.g. 我沒有買書。 電影還沒開始呢。
Interrogative sentence
Subject + verb + 了 (+ object) + 沒有﹖
or Subject + verb + 了嗎﹖
or Subject + verb + 沒 + verb (+ object)﹖ (here the verb is
usually monosyllabic)
e.g. 你今天買了詞典沒有﹖ 她來了嗎﹖ 你們談沒談這個問題﹖
Notes
If the verb has an object and there is no adverbial in the sentence, the object should normally carry some modifiers (e.g. numeral + measure-word or other attributives). Otherwise the sentence sounds incomplete:
我買了三本書。
我在書店里買了書。
but not simply 我買了書。
If a sentence carries several verbs and the actions indicated by those verbs are related, then the perfect aspect particle 了 is usually placed after the /last/ verb.
A: 我用中文給媽媽寫了一封信。
B: 他們昨天進城買了一些中文詞典。
In sentence a, "write" is related to "use" because the letter is written by using Chinese; in sentence b, similarly, "buy" is related to "enter the city" because the purpose of entering the city is to buy the dictionaries. Compare the above sentences with the following, with a different structure:
我下了課去圖書館。
Here "class is over" (下課) and "go to the library" are unrelated. They are contained in the sentence simply to indicate their sequence. Hence it is wrong to say
我下課去了圖書館。
When the verb is reduplicated, the perfect aspect particle 了 is placed /before/ the reduplicated verb:
我試了試那條裙子﹐真漂亮﹗