🡄 Previous

Next 🡆

Contents > Functions

Byte Copy

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.

Copy A to B Schematic

The Tetris version appears below.

Copy A to B

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:

Copy B to A Schematic

The Tetris version follows.

Copy B to A

🡄 Previous

Next 🡆