Re: Bitwise AND, OR, NOT, and XOR? [message #3280] |
Thu, 22 December 1994 10:30 |
rep2857
Messages: 28 Registered: December 1994
|
Junior Member |
|
|
In article <3cscl1$6pd@tali.hsc.colorado.edu>,
Matthew T. Adams <mtadams@columbine.hsc.colorado.edu> wrote:
>
> I can't seem to find anything in my documentation about whether IDL
> has the bitwise operators AND, OR, NOT, and XOR.
>
> Basically, I encode several different pieces of info into one byte,
...
Hi Matthew -
IDL includes all of the bitwise commands you mention. The SHIFT and
ISHFT commands are also used for the type of work you are suggesting.
If you'd like to provide something specific, I can provide more info.
Email or post is fine.
Mike Schienle Hughes Santa Barbara Research Center
rep2857@sbsun0010.sbrc.hac.com 75 Coromar Drive, M/S B28/87
Voice: (805)562-7466 Fax: (805)562-7881 Goleta, CA 93117
|
|
|
Re: Bitwise AND, OR, NOT, and XOR? [message #3307 is a reply to message #3280] |
Fri, 16 December 1994 17:47  |
hahn
Messages: 108 Registered: November 1993
|
Senior Member |
|
|
In article <3cscl1$6pd@tali.hsc.colorado.edu> "Matthew T. Adams" <mtadams@columbine.hsc.colorado.edu> writes:
> From: "Matthew T. Adams" <mtadams@columbine.hsc.colorado.edu>
> Subject: Bitwise AND, OR, NOT, and XOR?
> Date: 16 Dec 1994 15:44:33 GMT
> Hello, all.
> I can't seem to find anything in my documentation about whether IDL
> has the bitwise operators AND, OR, NOT, and XOR.
[remainder deleted to save bw]
Look at the following journal, it looks straight forward:
; IDL Version 3.6.1b (windows 3.1)
; Journal File for user@DOS Host
; Working directory: D:\IDL
; Date: Fri Dec 16 17:39:00 1994
a = 123b
b = 1b
print, a and b
; 1
print, a and 2b
; 2
c = string(a, format='(z2)')
print, c
;7b
print, a and 4b
; 0
print, a or 4b
; 127
print, a xor 4b
; 127
print, a xor 2b
; 121
Norbert Hahn
|
|
|
Re: Bitwise AND, OR, NOT, and XOR? [message #3310 is a reply to message #3307] |
Fri, 16 December 1994 09:15  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
"Matthew T. Adams" <mtadams@columbine.hsc.colorado.edu> wrote:
> I can't seem to find anything in my documentation about whether IDL
> has the bitwise operators AND, OR, NOT, and XOR.
IDL does implement Boolean bitwise AND, OR, NOT, and XOR.
See 'Boolean operators', IDL User's Guide v3.6, p 4-13.
|
|
|