Square of a BCD digit

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

Output

Problem information

Author: Jordi Cortadella

Generation: 2026-02-03T12:19:23.029Z

© Jutge.org, 2006–2026.
https://jutge.org