CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Location
    Wantagh,NY
    Posts
    151

    boolean expression to truth table

    Hello, How would I go about converting this boolean epression

    F= xy'z+x'y'z+xyz

    into a truth table? Do I need to simpify the equation first, or is their another way?

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: boolean expression to truth table

    Since there are only three variables and the rather short expression is in disjunctive normal form, it is probably best to just substitute the values for each row of the truth table. The moment you see that a conjunctive clause evaluates to true you can enter a true value for that row and move on to the next row (i.e., use lazy or short-circuit evaluation).
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured