Results 1 to 2 of 2

Math Help - Truth table Prime Number Checking

  1. #1
    Junior Member
    Joined
    Sep 2008
    Posts
    37

    Truth table Prime Number Checking




    a.

    Produce a truth table for a prime number checker. The number to check is a 4 bit integer. The output f is 1 if the number is prime and is 0 if the number is composite.

    b.

    Produce an algebraic form for the output bit f.


    c.
    Simplify the algebraic form for f as much as possible.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Oct 2008
    From
    Singapore
    Posts
    160
    Same principle as the previous post. Fill up the truth table and derive the equation and simplify it as much as possible. 4 bit integer from 0000 to 1111 or 0 to 15. Do the prime number check for 0 to 15 and fill up the truth table as done below.

    A B C D Output F
    0 0 0 0----0
    0 0 0 1----0
    0 0 1 0----1
    0 0 1 1----1
    0 1 0 0----0
    0 1 0 1----1
    0 1 1 0----0
    0 1 1 1----1
    1 0 0 0----0
    1 0 0 1----0
    1 0 1 0----0
    1 0 1 1----1
    1 1 0 0----0
    1 1 0 1----1
    1 1 1 0----0
    1 1 1 1----0

    I hope it helps and you will be able to derive the equation and simplify it
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. How would I do this truth table?
    Posted in the Discrete Math Forum
    Replies: 5
    Last Post: November 25th 2011, 02:41 AM
  2. If p then Q truth table
    Posted in the Geometry Forum
    Replies: 3
    Last Post: October 7th 2011, 06:02 PM
  3. why should a hash table be prime number length?
    Posted in the Advanced Math Topics Forum
    Replies: 0
    Last Post: May 7th 2010, 04:30 PM
  4. Truth table
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: March 20th 2010, 05:25 AM
  5. Truth table
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: October 17th 2009, 05:27 PM

Search Tags


/mathhelpforum @mathhelpforum