176 lines
12 KiB
Plaintext
176 lines
12 KiB
Plaintext
;; Function To Be Tested: BOOLE
|
||
;;
|
||
;; Source: Guy L Steele's CLTL
|
||
;; Section: 12.7 Logical Operations on Numbers
|
||
;; Page: 222
|
||
;;
|
||
;; Created By: Kelly Roach
|
||
;;
|
||
;; Creation Date: July 12,1986
|
||
;;
|
||
;; Last Update: July 12,1986
|
||
;;
|
||
;; Filed As: {ERIS}<LISPCORE>CML>TEST>12-7-BOOLE.TEST
|
||
;;
|
||
;;
|
||
;; Syntax: (BOOLE OP INTEGER1 INTEGER2)
|
||
;;
|
||
;; Function Description:
|
||
;; The function BOOLE takes an operation OP and two integers,
|
||
;; and returns an integer produced by performing the logical operation
|
||
;; specified by OP on the two integers. The precise values of
|
||
;; the sixteen constants are implementation-dependent, but they are
|
||
;; suitable for use as the first argument to BOOLE:
|
||
;;
|
||
;;
|
||
;; INTEGER1 0 0 1 1
|
||
;; INTEGER2 0 1 0 1 OPERATION PERFORMED
|
||
;; BOOLE-CLR
|
||
;; 0 0 0 0 ALWAYS 0
|
||
;; BOOLE-SET 1 1 1 1 ALWAYS 1
|
||
;; BOOLE-1
|
||
;; 0 ( 0 1 1 INTEGER1
|
||
;; BOOLE-2 0 1 0 1 INTEGER2
|
||
;; BOOLE-C1
|
||
;; 1 1 0 0 COMPLEMENT OF INTEGER1
|
||
;; BOOLE-C2 1 0 1 0 COMPLEMENT OF INTEGER2
|
||
;; BOOLE-AND
|
||
;; 0 0 0 1 AND
|
||
;; BOOLE-IOR 0 1 1 1 INCLUSIVE OR
|
||
;; BOOLE-XOR
|
||
;; 0 1 1 8 |