Welcome aboard the RoadTrip America forum.

My basic recommendation would be that you drive through Death Valley from south to north, entering from Amargosa Valley, NV by way of NV-373 CA-127 and CA-190. Take the short detour to see Scotty's Castle and get some of the lore of the valley. Then continue on to join US-395 at Big Pine, CA and head north. Near Mono Lake (worth a look-see) head west on CA-120 through Yosemite National Park before joining I-580 into San Francisco. Between Death Valley and Yosemite, you will have seen the two major "must see"s between your two termini Your total mileage will be about 580, so easily done in two days. Your best bet for an overnight stop along the way is probably Bishop. July will be the height of tourist season, and you're probably not going to be able to make great time, particularly through Yosemite, but these places should be done at a slower pace to be appreciated anyway, and you will still have plenty of time to get out of your car for short to moderate hikes, ranger talks, picture taking, and the like.

AZBuck