Hints (without full solution)
- Enumerate the binary inputs
- Complete the Y column in decimal
- Convert Y to binary
- Drop the decimal columns
Full solution (don't peek)
(1) Enumerate the binary inputs:
X x3 x2 x1
----------
0 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
(2) Complete the Y column in decimal:
X x3 x2 x1 | Y
----------------
0 0 0 0 | 3
1 0 0 1 | 5
2 0 1 0 | 7
3 0 1 1 | 9
4 1 0 0 | 11
5 1 0 1 | 13
6 1 1 0 | 15
7 1 1 1 | 17
(3) Convert Y to binary:
X x3 x2 x1 | Y y5 y4 y3 y2 y1
--------------------------------
0 0 0 0 | 3 0 0 0 1 1
1 0 0 1 | 5 0 0 1 0 1
2 0 1 0 | 7 0 0 1 1 1
3 0 1 1 | 9 0 1 0 0 1
4 1 0 0 | 11 0 1 0 1 1
5 1 0 1 | 13 0 1 1 0 1
6 1 1 0 | 15 0 1 1 1 1
7 1 1 1 | 17 1 0 0 0 1
(4) Drop the decimal columns:
x3 x2 x1 | y5 y4 y3 y2 y1
---------------------------
0 0 0 | 0 0 0 1 1
0 0 1 | 0 0 1 0 1
0 1 0 | 0 0 1 1 1
0 1 1 | 0 1 0 0 1
1 0 0 | 0 1 0 1 1
1 0 1 | 0 1 1 0 1
1 1 0 | 0 1 1 1 1
1 1 1 | 1 0 0 0 1