My roomie Mark built this. As you can see, it is simply a circuit which computes 6 * n or 6 + n for any 4 bit input n.