The Banyan switch has a switching control built
into the switch itself:
Every packet (messages) that comes into the
Banyan switch has a header that contains
a bit indicating what its destination
is (either 0 or 1).
The header is usually the
first bit
of the packet (message)
If the switch reads the bit and it has value 0,
it sends the packet to its upper output
(which is marked with 0 in the figure)
If the switch reads the bit and it has value 1,
it sends the packet to its lower output
(which is marked with 1 in the figure)
By connecting these simple Banyan switching elements
in series and parallel,
it is possible to route packets in more complicated ways
depending on the desired routes to establish.