comp.lang.ada
 help / color / mirror / Atom feed
From: Darren New <dnew@san.rr.com>
Subject: Re: Hi byte and Lo Byte Question
Date: Thu, 23 Aug 2001 17:15:44 GMT
Date: 2001-08-23T17:15:44+00:00	[thread overview]
Message-ID: <3B853A3F.2A459764@san.rr.com> (raw)
In-Reply-To: 3B850FA6.21711F4@raytheon.com

> They work, along with several others. I picked the ones w/ mask & shifts
> because older compilers tend to generate good code for them [the
> examples you provide require the compiler to detect division by a power
> of two and convert...].

I was using C compilers under CP/M that could handle this, so it
couldn't be *that* hard. :-)

I like it because it's symetric in the case of non-binary bases.

high_digit := (value mod 10)
low_digit  := (value / 10)

-- 
Darren New / Senior MTS & Free Radical / Invisible Worlds Inc.
San Diego, CA, USA (PST). Cryptokeys on demand. dnew@san.rr.com
           When was sliced bread invented?



  reply	other threads:[~2001-08-23 17:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-22 14:48 Hi byte and Lo Byte Question mop
2001-08-22 15:56 ` Larry Kilgallen
2001-08-22 16:21 ` Ted Dennison
2001-08-22 23:11 ` Mark Johnson
2001-08-23  0:23   ` Darren New
2001-08-23 14:13     ` Mark Johnson
2001-08-23 17:15       ` Darren New [this message]
2001-08-24  0:00       ` Robert Dewar
2001-08-24  7:52         ` Martin Dowie
2001-08-23 14:43   ` Marin David Condic
2001-08-24  8:09     ` Peter Dulimov
2001-08-24 16:20       ` Warren W. Gay VE3WWG
2001-08-24 17:05         ` Marin David Condic
2001-08-24 17:46           ` Warren W. Gay VE3WWG
2001-08-25  7:15             ` Simon Wright
2001-08-27 16:33               ` Warren W. Gay VE3WWG
2001-08-23  1:26 ` DuckE
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox