[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Integer Shift Function(s)
- To: David Singer <DSinger@SRI-KL.ARPA>
- Subject: Integer Shift Function(s)
- From: "Scott E. Fahlman" <Fahlman@C.CS.CMU.EDU>
- Date: Thu, 17 Apr 1986 02:28:00 -0000
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: Msg of 16 Apr 1986 18:42-EST from David Singer <DSinger at SRI-KL>
- Sender: FAHLMAN@C.CS.CMU.EDU
All of the logical operations are defined in terms of an abstract
integer type that is infinitely sign-extended to the left. That way,
the machine's word-length, or the length of the data part of its fixnum
representation, is hidden. What would a logical shift operation (or a
rotate, though you don't ask about that) do in this context?
An implementation may want to define LSH and ROT operations for its own
peculiar fixnum length, but such a thing makes no sense in portable
code.
-- Scott