A function, f, is a structure with a rectangular footprint whose bottom edge consists a row of input nodes that stores an input value, V, and whose top edge consists of a row of output nodes that stores an output value, f(V):

The composition of two functions, f(g(V)), comprises f on top of g on top of V, where g’s output nodes serve as f’s input nodes:

Functions employ a standard interface: a row of nodes, evenly spaced, ten columns apart. That interval provides sufficient room for bits to cross or to combine. And a round, base-10 number simplifies measurements during design.

A function’s input and output values have the same bit width and their bits line up. That is, the ith input node shares a common column with the ith output node.

The general-purpose computer contains 8-, 16-, and 24-bit functions. Some of its 16-bit functions interpret the input value, V, as a 2-byte array, [ A, B ], where A and B are the high and low bytes of V, respectively:

A7 | A6 | A5 | A4 | A3 | A2 | A1 | A0 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |

V15 | V14 | V13 | V12 | V11 | V10 | V9 | V8 | V7 | V6 | V5 | V4 | V3 | V2 | V1 | V0 |

Similarly, some of its 24-bit functions interpret the input value, V, as a 3-byte array, [ A, B, C ], where A, B, and C are the high, middle, and low bytes of V, respectively:

A7 | A6 | A5 | A4 | A3 | A2 | A1 | A0 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 | C7 | C6 | C5 | C4 | C3 | C2 | C1 | C0 |

V23 | V22 | V21 | V20 | V19 | V18 | V17 | V16 | V15 | V14 | V13 | V12 | V11 | V10 | V9 | V8 | V7 | V6 | V5 | V4 | V3 | V2 | V1 | V0 |

One 24-bit function interprets the input value, V, as a two-element array, [ W, C ], where W is a word composed of the high and middle bytes of V, and C is the low byte of V:

W15 | W14 | W13 | W12 | W11 | W10 | W9 | W8 | W7 | W6 | W5 | W4 | W3 | W2 | W1 | W0 | C7 | C6 | C5 | C4 | C3 | C2 | C1 | C0 |

V23 | V22 | V21 | V20 | V19 | V18 | V17 | V16 | V15 | V14 | V13 | V12 | V11 | V10 | V9 | V8 | V7 | V6 | V5 | V4 | V3 | V2 | V1 | V0 |

A function that accepts an array will return an array of identical dimension.

© 2023 meatfighter.com |