From the stories I've read, it looks like Asimov did a great job at skirting the details of how the positronic brain really works. This is what has spawned the same question, namely how to implement the three laws in an artificial brain. NHL did a great job at summarizing the robots as computer entities with a bunch of sensors and actuators attached to them. But then he took the usual way of seeing the computer as a mega-computing machine in some way. We don't have this kind of mega-computing abilities as human beings, though we are able to assess risks ourselves, and are able to take action. However, as common sense may fail us (quite often actually), it would be a very good augmentation and should be seen as an additional independent module if you will. That module, when fed with memories or some facts extracted from the senses, would give even more information in the form of usable outputs to other parts of an artificial brain.
Jeff Hawkins said in his book On Intelligence, we should maybe not talk about "artificial intelligence," but rather "true intelligence induced by an artificial device." I would suggest anyone interested in this kind of stuff to read this very interesting book. For me it was an inspiring one. As I'm "working" in the Machine Learning field, I was rather frustrated by the directions taken so far in this field, as was Hawkins some time ago.
Maybe we should tackle the problem from the perspective of mimicking biology more closely, as his work suggests, by using a so-called "hierarchical temporal memory." Intelligence (and therefore memory) is actually made of a hierarchy of associations of a multitude of stimuli (including action's feedbacks) encoded in the form of circuits in the brain. If some behaviors are deeply rooted in us, this is in part because of some kinds of rewards our brain releases from time to time in the form of hormones. Hormones facilitate (or inhibits) the building of particular associations the brain deems good (bad) for us (which are not necessarily good (bad) in the absolute... unfortunately). In this sense and with regard to the three laws, I think that for it to be really adapted to our societies, a robot should have limited means of action first (fewer actuators for instance), and should be exposed to society and its environment as much as possible before being allowed to fully interact with them. Some desired behaviors and associations could be enforced with facilitated fixed stimuli to give strong hints at what is good or bad in a particular context. These fixed stimuli are the closest things I can come up with to encode the three laws in practice. These associations should be frozen in some way in order for them to be sufficiently effective. Humans could develop bad or good habits that can be hard to change after all. By making that ones particularly hard to change we should be okay.
I don't think perfection will ever be attained with this kind of architecture. In some cases it would fail, as humans themselves do, but with the information provided by some extra modules, like the "mega-computing" one, this could be somewhat alleviated. I'm willing to bet that an artificial brain in the sense of a computing machine alone will never go as far as that either. In fact, the human brain intelligence itself could largely be surpassed by intelligence induced by those kind of devices. It could build up instead of being lost at some point (like at the end of a human subject's life). All a human being is left with is language to extract their intelligence or knowledge out of their own brain. Unfortunately, it takes time to transfer that knowledge to another brain in this way. Further, no matter how hard you try, it is often altered in the process. Another issue is that sometimes we never make crucial associations that are, however, latent and at the verge of being made if given a little more time. Conclusion, a lot of time is lost. You never see more than the tip of the intelligence iceberg within a single brain in such a short lifetime as ours. Maybe a solution to our limitations would be to find a way for our brains to communicate with such a device. It would be a lot harder I think but not impossible. Ethics would also be pointing its nose I suppose.
I would appreciate if this were on a forum where I could talk more about it because I digress a lot. I'm not the one who came up with that by the way... Hawkins transferred it to my brain through his book. And for him we should maybe consider forms of intelligent agents in a broader sense, not necessarily human- or animal-like entities. Also feel free to stole these ideas for you next book :).