| OCR Text |
Show 103 Traditionally, an entire computer word is used to evaluate one Boolean operation. The Unison algorithm takes advantage of computer bitwise operations to increase execution speed and reduce memory space. In the discussion below, it is assumed that a computer word is 32 bits. Parallel Evaluation of Multiple Boolean Operations Using a traditional approach, the code to calculate dF in Equation (4.6) produces one result. The Unison algorithm uses all 32 bits of an entire computer word to evaluate simultaneously 32 Boolean operations. If the ith bit in the operands is initialized to represent the ith Boolean operation, then the ith bit of dF will be the result of the ith Boolean operation. Each of the 32 Boolean operations in one word is completely independent from others. Gains in execution speed and memory reduction are proportional to the length of a computer word. In general, on an n-bit computer, n Boolean operations can be calculated simultaneously with the same memory requirement and within the same execution interval as one Boolean operation in traditional methods. Data Structures Arbitrarily large Boolean expressions can be calculated by combining operations. The output of one operation is supplied as an input to the next operation. Any Boolean function can be represented by a binary tree. Each node in a binary tree is connected to at most two children. Nodes at the bottom of the binary tree (input values of independent variables) are denoted as leaves. The node at the top, the result, is denoted as the root. In the following discussion, it is assumed that all Boolean functions are represented as full binary trees of the same depth. A binary tree that is not full can always be expanded to a full binary tree by attaching missing nodes. Full binary trees offer maximum efficiency of the Unison algorithm. A binary tree can be stored in a heap represented by an array. The nth element of an array a is denoted as a[n\. In a heap, element a[j] has two children, elements a[2j] and a[2j 4- 1]. The root of a heap has index 1. |