🡄 Previous

Next 🡆

Contents > Functions

Byte Swap

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.

8-bit Swap Schematic

The diamond pattern in the schematic appears in the Tetris version below due to extensive use of the swap circuit.

8-bit Swap

🡄 Previous

Next 🡆