Check the first sentence because the last word has to be plural.
Je porte des pantalons. (I am wearing some trousers/pants.)
Je ne porte pas de pantalon. (I am wearing no trousers/pants.)
Just memorize PAS DE. ("ne...pas" is not the only negative you'll meet but it's the first.) Sometimes there isn't a reason; it just IS! Well, here's the "why" of it.
The Partitive: the idea of "some" or "any" with a noun is expressed in French by:
de + the definite article of the noun.
de beurre frais = some (any) fresh butter
de la soie = some (any) silk
de l'herbe verte = some (any) green grass
des camions = some (any) trucks
de, without the article after a negative.
Je n'ai pas fait de fautes. = I didn't make any mistakes.
Il n'a guère d'amis. = He has hardly any friends.
de, without the article , when an adjective precedes a plural noun.
de vieux souliers = some old shoes
de longues rues = long streets
de, with or without the areticle, when an adjective precedes a singular noun.
*du bon cidre OR
de bon cidre. = some good cider.
* This is the more common form in the spoken language in France today.
NOTE: 1. The words for "some" and any" must be expressed in French, and must be repeated before each noun even though they are often omitted in English.
Voulez-vous du poisson? Non, je préfère de la viande et des légumes. = Do you want some fish? No, I prefer meat and vegetables.
2. Special uses of the Partitive are:
a. The definite article is retained before an adjective in the plural when the adjective is considered part of the noun.
des jeunes filles = girls
des petits pains = rolls
des petits pois = green peas
b. After "ne...que" (only), de is used with the article, provided there is no adjective preceding the noun.
Nous ne lisons que des romans. = We read only novels.
c. After "sans" (without), "ne...ne...ne" (neither...nor), and expressions taking de, the partitive is omitted.
C'est un livre sans images. = It is a book without any pictures.
Nanette ne boit ni thé ni café. = Nancy drinks neither tea nor coffee.
As-tu besoin de billets? = Do you need (any_ tickets?
The idea of "some" or "any" is translated by "en" if the noun is omitted. "En," like personal pronoun objects, precedes the verb, except in affirmative commands.
A-t-il écrit ds lettres? = Has he written any letters?
Oui, il en a écrit. = Yes, he has written some.
Ecrivez-en. = Write some
ADVERBS OF QUANTITY: Certain adverbns expressing quantity are followed by "de," without the article, before a noun.
assez de (enough), autant de (as much, as many), beaucoup de (muchk many), combien de (how much, how many), combien de (how much, ho0w lany), moins de (less, fewer), peu de (little, few), plus de (mor), que de (how much, how many, used only in exclamations), tant de (so much, so many), trop de (too much, too many)
Avez-vous assez de temps et d'énergie? = Have you enouygh time and energy?
Que de fois je l'ai grondé! = How many times I've scolded him!
There are other things with "de" but I doubt you are ready at this time.
Nouns of Quantity
Nouns of Material
Possession and Relationship with "de" = you might be ready for this; let me know (Le livre de Marie, etc.)