I understand truth tables and do them fine when it's Z = A + B + ABC' etc. but how do I start a truth table where I'm suppose to take the function Y = 2X + 3 and construct a truth table from that? X is the input 3 bit(x1x2x3) and Y is the output with 5 bit(y1y2y3y4y5). I am clueless on how to start and just need help pointing me in the right direction.
(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