Design a circuit that takes a 3 bit binary and makes it (x^2 - x), using a decoder of your choice
First off, we must determine the sizes of the outputs and inputs.
If x is a 3-bit number, then x^2 is 6 bits, and x^2 - x the same.



Next we can make the truth table for a 3 bit input number and 6 bit output number:


Input: 0 (dec) = 000 (bin), Output: 00 (dec) = 000000 (bin)
Input: 1 (dec) = 001 (bin), Output: 00 (dec) = 000000 (bin)
Input: 2 (dec) = 010 (bin), Output: 02 (dec) = 000010 (bin)
Input: 3 (dec) = 011 (bin), Output: 06 (dec) = 000110 (bin)
Input: 4 (dec) = 100 (bin), Output: 12 (dec) = 001100 (bin)
Input: 5 (dec) = 101 (bin), Output: 20 (dec) = 011000 (bin)
Input: 6 (dec) = 110 (bin), Output: 30 (dec) = 011110 (bin)
Input: 7 (dec) = 111 (bin), Output: 42 (dec) = 101010 (bin)


Now that we know what output should be produced for a given input, we can derive logic functions for each of the 6 output bits using a Karnaugh map or otherwise. Each output bit depends only on 3 input bits, so the Karnaugh maps will be easy to do if you choose that approach. I will do some of them.



Clearly bit 0 of the output is always 0, so its function is trivial:


Output[0] = 0


Let's do bit 1 now of the output now. We see that Output[1] is 1 only when the input is equal to 2, 3, 6, or 7. Thus we can write:


Output[1] = (Input == 010) | (Input == 011) | (Input == 110) | (Input
== 111)
Simplifying, Output[1] = Input[1]


Moving on to the next bit, Output[2] is 1 only when the input is equal to 3, 4, or 6. So we have:


Output[2] = (Input == 011) | (Input == 100) | (Input == 110)


Hopefully this is instructive regarding how to do this type of problem.
I will leave the other bits and drawing the gate-level circuit to you.