Three Columbia University students who picked up a discarded, rolled-up carpet from a West Side sidewalk yesterday discovered a corpse inside when they took it home, the police said.

''They thought they were going to decorate their little dorm room,'' said police Lieut. James McKenna. ''Then they unrolled it and found a body.''

The unidentified body was described as a black male in his 20's with two bullet wounds to the head. Authorities said the students found the carpet in the Morningside Heights section, near the Columbia campus.