🡄 Previous

Next 🡆

Contents > Functions

Overview

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):

Function f

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:

Function f of g

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:

A7A6A5A4A3A2A1A0B7B6B5B4B3B2B1B0
V15V14V13V12V11V10V9V8V7V6V5V4V3V2V1V0

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:

A7A6A5A4A3A2A1A0B7B6B5B4B3B2B1B0C7C6C5C4C3C2C1C0
V23V22V21V20V19V18V17V16V15V14V13V12V11V10V9V8V7V6V5V4V3V2V1V0

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:

W15W14W13W12W11W10W9W8W7W6W5W4W3W2W1W0C7C6C5C4C3C2C1C0
V23V22V21V20V19V18V17V16V15V14V13V12V11V10V9V8V7V6V5V4V3V2V1V0

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

🡄 Previous

Next 🡆