[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looking for Long Tooth...
I posted the message. I administer the AJUG Java Certification Group.
No, this is not a college homework assignment but I thank you for your post
just the same.
p.s. I'm older than most of the buildings on college campuses.
On Wed, 9 Apr 2003 09:31:04 -0400, Scott P. Smith <email@example.com>
> I am a little surprised by this question and the other one like it a few
> weeks ago. I have a sneaky feeling that I am helping a college student
> his homework, but I'll respond anyway.
> There are infinitely many ways these operators can be useful.. But I'll
> give a few examples:
> * Data Compression - Many data compression algorithms compress byte
> into bit streams. To create (and later decode) the bit streams, you need
> bitwise operators.
> * Non-Java Binary File I/O - When working with binary files that were
> created in C, C++, etc. you will see a lot of use of things like unsigned
> 16, and 32 bit values. Since Java doesn't support these, you have to use
> bitwise operators to put the uint16 into a Java int32. And vise versa.
> * Old file formats - Like the previous example. A long time ago, (when
> dinosaurs still roamed the earth and when I was in high-school) people
> not have much disk space. So file formats made HEAVY use of bit fields
> store a series of boolean flags. To read or write these flags use need -
> bitwise operators.
> * Arbitrarily Precision Integer Math - Math packages that implement 64,
> 256 bit integers, etc. These packages use bitwise operators (at least I
> think they do).
> * Hardware Simulation - Hardware adders multipliers etc. are sometimes
> simulated in software using bitwise operations. Not common, but I did
> back in School.
> Scott Smith
> ----- Original Message -----
> From: "Lee Chalupa" <firstname.lastname@example.org>
> To: "Atlanta Java Users Group" <email@example.com>
> Sent: Wednesday, April 09, 2003 9:24 AM
> Subject: Looking for Long Tooth...
>> I would like to find some examples of business problems that are
>> bitwise operators or shift operators.
>> I think one of the reasons people have trouble with these two topics is
>> that they
>> seem irrelevant to their work.
>> My guess is that some of our more experienced programmers used these
>> operators in the "good old days".
>> Does anybody have some practical examples of where they put these
>> to good use?
>> Lee Chalupa
>> AJUG Certification Group
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/