When the road is marked with a solid yellow line and a broken yellow line, with the broken line next to your lane, you may pass:

When there is a solid yellow line and a broken yellow line in the center of the road and the broken line is next to your lane, you may cross the lines to pass if there is no oncoming traffic.
DMV Writen Test