4-bit encoder
x
0
x
1
x
1
+ x
3
x
2
x
3
one-hot
code
x
2
+ x
3
x
0
x
1
x
2
x
3
y
1
y
0
1
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
1
0
0
0
0
1
1
1
y
0
y
1
unlisted
combinations
are assumed
not to occur
binary
code