National Institute of Advanced Industrial Science and Technology (AIST) This page is a page of the former research institute. We stopped updating on March 31.2001.
E-mail to webmaster (Japanese) E-mail to webmaster (English)
next up previous contents index
Next: Generic Number Functions Up: Arithmetic Functions Previous: Arithmetic Predicates

Integer and Bit-Wise Operations

Following functions request arguments to be integers.

  mod dividend divisor [function]

  1- integer [function]   1+ integer [function]   logand &rest integers [function]   logior &rest integers [function]   logxor &rest integers [function]
  • bitwise-exclusive-or of integers.
  logeqv &rest integers [function]
  • logeqv is equivalent to (lognot (logxor ...)).
  lognand &rest integers [function]
  • bitwise-nand of integers.
  lognor &rest integers [function]
  • bitwise-nor of integers.
  lognot integer [function]
  • bit reverse of integer.
  logtest integer1 integer2 [function]
  • T if (logand integer1 integer2) is not zero.
  logbitp index integer [function]
  • T if indexth bit of integer (counted from the LSB) is 1, otherwise NIL.
  ash integer count [function]
  • Arithmetic Shift Left. If count is positive, shift direction is left, and if count is negative, integer is shifted to right by abs(count) bits.
  ldb target position width [function]
  • LoaD Byte. Byte specifier for ldb and dpb does not exist in EusLisp. Use a pair of integers instead. The field of width bits at position within target is extracted. For example, (ldb #x1234 4 4) is 3.
  dpb value integer position width [function]
  • DePosit byte. Width bits of value is put in integer at positionth bits from LSB.

next up previous contents index
Next: Generic Number Functions Up: Arithmetic Functions Previous: Arithmetic Predicates

Hirofumi Nakagaki
Fri Mar 22 12:46:38 JST 1996