# Thread: Truth table Prime Number Checking

1. ## 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.

2. 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

,

,

,

,

,

,

,

,

,

# 5 bit prime detector

Click on a term to search for related topics.