In the previous paper (Shiono and Ohkuma, 2015), we have proposed a principle of bitwise operations to perform set operations related to the logical model of geologic structure. Expanding the principle, we present here an algorithm and a Visual Basic .NET program GeoCalcVB to perform set operations of subspaces p (x 1 , …, x n) defined by surfaces S 1 , …, S n , where x i is a three-digit binary number that assigns the relation between a subspace and a surface S i. We newly introduce two generalized rules, which are used to derive the standard form composed of the least number of terms. For the convenience of computer processing, expressions of subspaces p (x 1 , …, x n) and operation rules are transformed into the equivalent forms composed of n-tuples, operators +, , ' , and parentheses { } where needed to avoid ambiguity. GeoCalcVB performs the following three steps of operations and displays the result at each step. Step-1: Transform an input expression into the join of tuples by the operation rules for intersection and complement. Step-2: Shorten the expression by the basic operation rules for union. Step-3: Determine the standard form by the generalized rules for union. GeoCalcVB and its algorithm are useful to analyze theoretically the relation between geologic units and boundary surfaces i. e. logical model of geologic structure and to improve computer modeling system of 3D geologic structure.