I'll preface this by saying I Don't want the answer, just a nudge in the right direction.
The conversion table for the encryption is as follows:
Input --> Output
0 --> 15
1 --> 14
2 --> 13
3 --> 12
4 --> 0
5 --> 1
6 --> 2
7 --> 3
8 --> 7
9 --> 6
10 --> 5
11 --> 4
12 --> 8
13 --> 9
14 --> 10
15 --> 11
Essentially there are 2 patterns and I want to know how to implement them both in a single circuit. I'm completely stumped.
B2 is always negated. If B2 is not set, all other bits are negated.
Seems like an easy enough condition to encode in a circuit.