Here in NJ bicycles are required to have a horn or bell of some sort if they ride on public roads.

If they ride on public roads at night, they are also required to have a white headlight and a red taillight, both visible for at least 500 ft.

Finally, bicycles are given the same rights and duties as cars. Therefore, they are supposed to ride the same direction as traffic, they aren't supposed to ride on the sidewalk, and they have to obey all standard signs and signals (and I've seen cops give tickets to bicyclists for running stop signs).

The one major difference though, is that they are supposed to ride as far right as possible to allow faster vehicles to pass. However, they are allowed to cautiously enter the middle of the lane when necessary (like when turning left, avoiding road debris, avoiding cars doors, ect).

All in all, I've found that when drivers and bicyclists are aware of these laws and follow them, they tend to have few incidents. It's when someone fails to obey them that we get big problems (usually ending up in a hurt bicycle rider, regardless of who was in the wrong).

With that in mind, when I take my bike out, I do it with the understanding that it's a fairly dangerous activity and I need to be as cautious as humanly possible. Under the same token, when I see a bicycle on the road, I do my best to be cautious of them, stay as far away from them as possible, and let them do what they're going to do.

Even if I'm the one in the right legally, I would hate to injure someone else, especially when it's in a completely avoidable situation.