Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Arithmetic shift operation in C

Reply
Thread Tools

Arithmetic shift operation in C

 
 
Chris Torek
Guest
Posts: n/a
 
      06-20-2005
>On Thu, 16 Jun 2005 10:51:50 -0700, Tim Rentsch wrote:
>> Are we reading different documents? The description I read of the
>> "Bitwise shift operators" (ISO/IEC 9899:1999 (E), section 6.5.7) talks
>> only about values, not about representations.


In article <(E-Mail Removed)>
Lawrence Kirby <(E-Mail Removed)> wrote:
>It talks abouyt thinks like "bit positions" which is a description of
>representation rather than value.


I think perhaps the confusion comes in because this is a description
of "a" representation, and not necessarily "the" representation.
That is, the machine could have obnoxious padding bits in the way;
but if so, they do not participate in the value-bit-shifting.
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (4039.22'N, 11150.29'W) +1 801 277 2603
email: forget about it http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.
 
Reply With Quote
 
 
 
 
CBFalconer
Guest
Posts: n/a
 
      06-20-2005
Richard Bos wrote:
> Lawrence Kirby <(E-Mail Removed)> wrote:
>> On Fri, 17 Jun 2005 09:18:05 +0000, Richard Bos wrote:
>>
>>> However, what Mr. Kirby wrote, and what I objected to, is that
>>> shifts operate on _objects_.

>>
>> I'm not saying shifts work on objects (I don't think I did but
>> if so that was a mistake), I'm saying that they work at a
>> representation level.

>
> True. It wasn't you who brought up objects, it was Mr. Falconer.
> My excuses.


Whatever you're accusing me of, I didn't do it.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html


 
Reply With Quote
 
 
 
 
Eric Sosman
Guest
Posts: n/a
 
      06-21-2005
CBFalconer wrote:
>
> Whatever you're accusing me of, I didn't do it.


"I wasn't there."
-- Pooh-Bah, "The Mikado"

--
Eric Sosman
http://www.velocityreviews.com/forums/(E-Mail Removed)lid

 
Reply With Quote
 
Richard Bos
Guest
Posts: n/a
 
      06-21-2005
In comp.lang.c you wrote:

> Richard Bos wrote:
> > Lawrence Kirby <(E-Mail Removed)> wrote:
> >> On Fri, 17 Jun 2005 09:18:05 +0000, Richard Bos wrote:
> >>
> >>> However, what Mr. Kirby wrote, and what I objected to, is that
> >>> shifts operate on _objects_.
> >>
> >> I'm not saying shifts work on objects (I don't think I did but
> >> if so that was a mistake), I'm saying that they work at a
> >> representation level.

> >
> > True. It wasn't you who brought up objects, it was Mr. Falconer.
> > My excuses.

>
> Whatever you're accusing me of, I didn't do it.


I'm accusing you of writing this:

> Shift operations in C are only portable, and properly defined, on
> unsigned objects.


and you did (<(E-Mail Removed)>).

I'm quite willing to accept your innocence in general, of course, you
sweet, unsuspecting darling, you .

Richard
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java left shift and right shift operators. Sanny Java 38 04-29-2011 10:02 PM
Boolean operation and arithmetic operation Buzz Lightyear C++ 10 08-12-2009 01:27 PM
Left Shift / Right Shift Operators Santosh Nayak C Programming 16 11-30-2006 05:10 PM
Shift - byte[] buf shift Roberto Gallo Java 3 01-27-2004 04:26 PM
left shift then right shift an unsigned int Wenjie C++ 3 07-11-2003 08:22 PM



Advertisments