---- START NEW MESSAGE --- Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-8.05) id A1866420288; Sun, 01 Feb 2004 11:20:38 -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 <16.00CC7EDF@cherry.ease.lsoft.com>; 1 Feb 2004 14:20:30 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8e) with spool id 1844 for PICLIST@MITVMA.MIT.EDU; Sun, 1 Feb 2004 14:20:24 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 2176; Sun, 1 Feb 2004 14:19:12 -0500 Received: from mail.3mtmp.com [141.117.25.187] by mitvma.mit.edu (IBM VM SMTP Level 430) via TCP with SMTP ; Sun, 01 Feb 2004 14:19:12 EST X-Comment: mitvma.mit.edu: Mail was sent by mail.3mtmp.com Received: from s25-15.resnet.ryerson.ca ([141.117.25.15] helo=3mtmp.com) by mail.3mtmp.com with esmtp (Exim 3.12 #1 (Debian)) id 1AnMWM-0008Vf-00 for ; Sun, 01 Feb 2004 13:40:38 -0500 X-Mailer: Mozilla 4.8 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <401D51CA.E28A1127@3mtmp.com> Date: Sun, 1 Feb 2004 14:21:46 -0500 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: Josh Koffman Subject: Re: [PIC:] AND, and OR To: PICLIST@MITVMA.MIT.EDU Precedence: list X-RCPT-TO: Status: U X-UIDL: 371856763 Hi Ruben, Welcome to the list. First off, congratulations on getting your topic tag correct on the first try! You'd be surprised how many people get confused about that. In addition to what the others have said, if you are running windows, you may want to play with the calculator that comes with it. You can switch it to scientific mode and do binary operations with boolean logic. I use it a fair bit for quick sanity checking. Hope that helps Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams Ruben Undheim wrote: > Since I am relatively new to PIC-programming, and since I am not an expert in mathematics (I'm still quite young!), > 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? -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads .