The byte swap function exchanges the elements of a 2-byte array:
f( [A, B] ) = [ B, A ]
It is realized with the following wiring, where Ai and Bi are the ith bits of A and B, respectively.
The diamond pattern in the schematic appears in the Tetris version below due to extensive use of the swap circuit.
© 2023 meatfighter.com |