I find nothing wrong with your code. I took the liberty to expand on your code to verify. It turns on and off the on board led every 2 seconds so it should be good.
void setup()
{
Serial.begin(9600);
DDRB = B00111111; // digital pins -,-,13,12,11,10,9,8
PORTB = B00111000; // turns on 13,12,11; turns off 10,9,8
}
void loop()
{
Serial.println(PINB, BIN);
Serial.println(PINB, HEX);
delay(2000);
PORTB = ~PINB;
}