Square of a BCD digit X77297


Statement
 

pdf   zip

Design a dircuit that produces the square of a BCD digit. The output should be in the binary representation.

Specification

module square_bcd(bcd, square);
    input [3:0] bcd;
    output [6:0] square;

Input

  • bcd is the input BCD digit.

Output

  • square is the output representing the square of the input digit in binary code.

Information
Author
Jordi Cortadella
Language
English
Official solutions
Verilog
User solutions
Verilog