The byte copy function operates on a 2-byte array. It copies the first byte to the second byte:
f( [A, B] ) = [ A, A ]
This is accomplished with the following wiring, where Ai and Bi are the ith bits of A and B, respectively.
The Tetris version appears below.
The space-dominating triangle consists of diagonally-upward chains of swap circuit. After they cross the center wire, horizontal lines of Z-tetrominoes carry the signals the rest of the way.
A variation of the function copies the second byte to the first byte:
f( [A, B] ) = [ B, B ]
It is the horizontal-reflection of the previous circuit:
The Tetris version follows.
© 2023 meatfighter.com |