delorie.com/archives/browse.cgi | search |
From: | "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Right shift |
Date: | Fri, 12 May 2000 19:47:08 +0400 |
Organization: | MTU-Intel ISP |
Lines: | 23 |
Message-ID: | <391C277C.21B0BC65@mtu-net.ru> |
References: | <391C0409 DOT 79567772 AT tiscalinet DOT it> |
NNTP-Posting-Host: | ppp99-245.dialup.mtu-net.ru |
Mime-Version: | 1.0 |
X-Trace: | gavrilo.mtu.ru 958146904 18310 212.188.99.245 (12 May 2000 15:55:04 GMT) |
X-Complaints-To: | usenet-abuse AT mtu DOT ru |
NNTP-Posting-Date: | 12 May 2000 15:55:04 GMT |
X-Mailer: | Mozilla 4.72 [en] (Win95; I) |
X-Accept-Language: | ru,en |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
plz, post your actual code. We'll see. -- Alexei A. Frounze ----------------------------------------- Homepage: http://alexfru.chat.ru Mirror: http://members.xoom.com/alexfru night DOT walker AT tiscalinet DOT it wrote: > > Why right-shifting ">>" a negative signed int will first turn it > positive? > > 4 >>1 = 2 but also -4 >> 1 = 2!! > > It seems like the int is computed without considering the sign bit (is > the most significant, isn't it?) at all... > > What EXACTLY happens? > > Thanx for the feedback, Night Walker.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |