Function Entry: BOOLE

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: BOOLE

Name

boole

Class

Function

Syntax

(boole operator int1 [int2 ...])

Arguments and Values

  • operator: integer 0–15, the four-bit truth table identifying which Boolean function to apply (each bit of operator selects one row of the two-input truth table).
  • int1, int2, …: integers to combine bitwise.

Description

Returns the bitwise Boolean combination of the integer arguments under the truth table identified by operator. Common operator codes include:

  • 1: AND (output 1 only when both input bits are 1).
  • 6: XOR (output 1 only when exactly one input bit is 1).
  • 7: OR (output 1 when at least one input bit is 1).
  • 8: NOR (output 1 only when both input bits are 0).

With more than two integers, the operation is applied left-associatively: (boole op a b c) is (boole op (boole op a b) c).

Return Values

An integer.

Side Effects

None.

Examples

  • (boole 1 12 5) returns 3 (logical AND of 12 and 5).
  • (boole 4 3 14) returns 12 (operator code 4: bits set in int2 but not in int1).

Availability

  • AutoCAD 2026: documented.
  • BricsCAD V26: presumed compatible.
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.