We were there in October and did SFO > Yosemite > Vegas > Death Valley > SFO, all within the week.
We fancied the road trip so drove both ways - which is long! - but I'd certainly recommend driving one way via Yosemite and Death Valley to Vegas, and then you could fly back to SFO (or direct to London if you can).
In San Fran, I'd also suggest cycling to Sausalito as others have said, but if you're an active type then I'd recommend cycling back too - the hill isn't that long and it's a great way to work off your lunch! Once back over the bridge, carry on along the western coastal road for aboslutely stunning views of the 'other side' of the harbour, which I imagine most tourists don't get to see.