---- START NEW MESSAGE --- Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-8.05) id A7ED5AFC007A; Fri, 30 Jan 2004 16:33:49 -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 <6.00CC59F0@cherry.ease.lsoft.com>; Fri, 30 Jan 2004 19:16:18 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8e) with spool id 9029 for PICLIST@MITVMA.MIT.EDU; Fri, 30 Jan 2004 19:16:11 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 5545; Fri, 30 Jan 2004 19:16:03 -0500 Received: from mail.bcpl.net [204.255.212.10] by mitvma.mit.edu (IBM VM SMTP Level 430) via TCP with ESMTP ; Fri, 30 Jan 2004 19:16:02 EST X-Comment: mitvma.mit.edu: Mail was sent by mail.bcpl.net Received: from ppp439.bcpl.net (ppp439.bcpl.net [208.242.126.21]) by mail.bcpl.net (8.12.9/8.12.9) with SMTP id i0UMWY9Q028613 for ; Fri, 30 Jan 2004 17:32:35 -0500 (EST) Received: by ppp439.bcpl.net with Microsoft Mail id <01C3E756.FCEE8680@ppp439.bcpl.net>; Fri, 30 Jan 2004 17:32:09 -0500 Encoding: 28 TEXT Message-ID: <01C3E756.FCEE8680@ppp439.bcpl.net> Date: Fri, 30 Jan 2004 17:31:39 -0500 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: "John N. Power" Subject: Re: [PIC:] divide by 10 question To: PICLIST@MITVMA.MIT.EDU Precedence: list X-RCPT-TO: Status: U X-UIDL: 371856612 > From: John N. Power[SMTP:jpower@BCPL.NET] > Sent: Friday, January 30, 2004 3:35 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC:] divide by 10 question. It should be obvious from the context, but my previous post had an omission: > Pseudo code statement of the process: (see following paragraph for > statement about number format.) > B = N + (N >> 1); > for ( i = 0, quotient = 0; i < MAX_ITERS; i++ ) { > quotient = quotient + (B >> 4); > } Should be: B = N + (N >> 1); for ( i = 0, quotient = 0; i < MAX_ITERS; i++ ) { quotient = quotient + (B >> 4); B = (B >> 4 ); } John Power -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body .