Prime number X07160


Statement
 

pdf   zip   verilog

html

Design a circuit that has a 4-bit number as input. The output of the circuit must be 1 if the number represented by the input in binary code is prime, and 0 otherwise (0 and 1 are not prime).

Specification

module prime (n, is_prime); input [3:0] n; output is_prime;

Input

  • n is the 4-bit input number.

Output

  • is_prime is the output indicating whether the number is prime or not.
Information
Author
Jordi Cortadella
Language
English
Official solutions
Unknown. This problem is being checked.
User solutions
Verilog