Cleanup your ugly Boolean expressions with De Morgan’s laws - DelphiTools.info


http://delphitools.info/2013/01/15/cleanup-your-ugly-boolean-expressions-with-de-morgans-laws/

Comments

  1. And a side question to the group: is Linear Algebra part of modern CS courses? I think it should be, but I've been wondering if it still is taught outside Electronics courses.

    ReplyDelete
  2. Already doing this =)

    Eric Grange I'm a computer science major at the KULeuven university in Belgium, I have an exam on Linear Algebra in 2 days

    ReplyDelete
  3. Frédéric Hannes Good to know! Recently used the above linear algebra tricks and was surprised to see some devs discover there were laws that could be applied "mechanically" to Boolean expressions. Hopefully most students won't think it's something they can forget about after leaving university ;-)

    ReplyDelete
  4. Well, I was actually using this before I learned about it there, so I certainly won't forget it. I'm not entirely sure, but I think I picked up this practice from "Code Complete" by "Steve McConnell", a book I'd recommend to every beginner and expert programmer.

    I don't think these things were covered in my linear algebra class though. I'm certain it was in my Formal Logic class and maybe Artificial Intelligence.

    ReplyDelete
  5. I learned this many years ago, as a hardware designer. It's also taught in Discrete Mathematics.

    ReplyDelete
  6. I learned this many years ago as a hardware designer too.

    ReplyDelete
  7. For those of us who cut our teeth on DTL and TTL, as the standard gates were mostly inverting, the mental calisthenics of logic conversions became second nature. CMOS changed that, as the logic gates were all offered with or without inversion.

    ReplyDelete
  8. Peter Müller-Mannhardt Program that realizes McCluskey algorithm  was my course project :)

    ReplyDelete
  9. Peter Müller-Mannhardt Yes, this can and should be used both ways. Especially since the compiler knows ho the perform the transformations as well, so there is typically performance penalty.

    ReplyDelete

Post a Comment