---- START NEW MESSAGE --- Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-8.05) id A3B477C00070; Sun, 01 Feb 2004 10:21:40 -0800 Received: from PEAR.EASE.LSOFT.COM (209.119.0.19) by cherry.ease.lsoft.com (LSMTP for Digital Unix v1.1b) with SMTP id <21.00CC7DFC@cherry.ease.lsoft.com>; 1 Feb 2004 13:21:35 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8e) with spool id 1085 for PICLIST@MITVMA.MIT.EDU; Sun, 1 Feb 2004 13:21:29 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 1158; Sun, 1 Feb 2004 13:20:21 -0500 Received: from albatross-ext.wise.edt.ericsson.se [193.180.251.49] by mitvma.mit.edu (IBM VM SMTP Level 430) via TCP with ESMTP ; Sun, 01 Feb 2004 13:20:20 EST X-Comment: mitvma.mit.edu: Mail was sent by albatross-ext.wise.edt.ericsson.se Received: from esealmw143.al.sw.ericsson.se ([153.88.254.118]) by albatross-ext.wise.edt.ericsson.se (8.12.10/8.12.10/WIREfire-1.8b) with ESMTP id i11IKNqY017004 for ; Sun, 1 Feb 2004 19:20:23 +0100 (MET) Received: from esealnt612.al.sw.ericsson.se ([153.88.254.118]) by esealmw143.al.sw.ericsson.se with Microsoft SMTPSVC(6.0.3790.0); Sun, 1 Feb 2004 19:20:20 +0100 Received: by esealnt612.al.sw.ericsson.se with Internet Mail Service (5.5.2657.72) id <1CVTKMKQ>; Sun, 1 Feb 2004 19:20:23 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain X-OriginalArrivalTime: 01 Feb 2004 18:20:20.0379 (UTC) FILETIME=[0CF69EB0:01C3E8F0] Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F5640D0C@ESEALNT442.al.sw.ericsson.se> Date: Sun, 1 Feb 2004 19:20:05 +0100 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: "Jan-Erik Soderholm XA (TN/PAC)" Subject: Re: [PIC:] AND, and OR To: PICLIST@MITVMA.MIT.EDU Precedence: list X-RCPT-TO: Status: U X-UIDL: 371856758 Ruben Undheim wrote : > I wondered what really happens when you AND's to numbers. > Why is for example "50 AND 100 = 32" (decimal numbers) or > "0xAF AND 0xCC = 0x8C" ???? > - and what happens when you OR's to numbers? > > Without understanding this, I don't see what use I can get from the > ANDLW, ANDWF, IORWF, XORWF, IORLW, XORLW-commands. Hi ! All the logical instructions/operations work in a similar way bit-by-bit Download the "PIC18 ref manual" and look up the instruction set (Section 31). There are examples both in HEX and in binary. The midrange ref manual can be found here : http://www.microchip.com/1010/suppdoc/refernce/index.htm The "PIC18C MCU Family Reference Manual" have better instruction descriptions. I don't think the description for each of the instructions in your list below could be more clear then they are :-) Then, just ask again if there still is any questions ! Jan-Erik. This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you. E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads .