Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #16317 > unrolled thread
| Started by | Ceriousmall <divadsmall@gmail.com> |
|---|---|
| First post | 2012-01-27 13:56 -0800 |
| Last post | 2012-01-27 21:44 -0700 |
| Articles | 5 on this page of 25 — 14 participants |
Back to article view | Back to comp.lang.c
bitwise operators(info) Ceriousmall <divadsmall@gmail.com> - 2012-01-27 13:56 -0800
Re: bitwise operators(info) John Gordon <gordon@panix.com> - 2012-01-27 22:03 +0000
Re: bitwise operators(info) "Morris Keesan" <mkeesan@post.harvard.edu> - 2012-01-27 17:35 -0500
Re: bitwise operators(info) Ceriousmall <divadsmall@gmail.com> - 2012-01-27 16:22 -0800
Re: bitwise operators(info) Devil with the China Blue Dress <chine.bleu@yahoo.com> - 2012-01-27 16:52 -0800
Re: bitwise operators(info) Keith Thompson <kst-u@mib.org> - 2012-01-27 17:06 -0800
Re: bitwise operators(info) Harald van Dijk <truedfx@gmail.com> - 2012-01-27 19:06 -0800
Re: bitwise operators(info) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-28 11:33 +0000
Re: bitwise operators(info) James Kuyper <jameskuyper@verizon.net> - 2012-01-28 13:46 -0500
Re: bitwise operators(info) Kaz Kylheku <kaz@kylheku.com> - 2012-01-28 19:01 +0000
Re: bitwise operators(info) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-28 22:41 +0000
Re: bitwise operators(info) Ceriousmall <divadsmall@gmail.com> - 2012-01-28 21:19 -0800
Re: bitwise operators(info) Keith Thompson <kst-u@mib.org> - 2012-01-29 02:13 -0800
Re: bitwise operators(info) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-29 14:59 +0000
Re: bitwise operators(info) pete <pfiland@mindspring.com> - 2012-01-29 10:51 -0500
Re: bitwise operators(info) ImpalerCore <jadill33@gmail.com> - 2012-01-30 10:25 -0800
Re: bitwise operators(info) Ceriousmall <divadsmall@gmail.com> - 2012-01-31 06:00 -0800
Re: bitwise operators(info) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-31 14:30 +0000
Re: bitwise operators(info) pete <pfiland@mindspring.com> - 2012-01-31 10:06 -0500
Re: bitwise operators(info) Harald van Dijk <truedfx@gmail.com> - 2012-01-28 12:34 -0800
Re: bitwise operators(info) Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-01-27 22:56 -0500
Re: bitwise operators(info) Keith Thompson <kst-u@mib.org> - 2012-01-27 20:30 -0800
Re: bitwise operators(info) Shao Miller <sha0.miller@gmail.com> - 2012-01-29 09:27 -0500
Re: bitwise operators(info) Kaz Kylheku <kaz@kylheku.com> - 2012-01-28 05:16 +0000
Re: bitwise operators(info) Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-01-27 21:44 -0700
Page 2 of 2 — ← Prev page 1 [2]
| From | Eric Sosman <esosman@ieee-dot-org.invalid> |
|---|---|
| Date | 2012-01-27 22:56 -0500 |
| Message-ID | <jfvrm4$brj$1@dont-email.me> |
| In reply to | #16331 |
On 1/27/2012 8:06 PM, Keith Thompson wrote:
>
> In fact an int is represented in binary on any conforming
> implementation; see C99 6.2.6.2.
I've invented a four-state device that is 7% faster, 18% less
power-hungry, and 31% cheaper to manufacture than a pair of two-
state devices. I'm building a revolutionary new computer based on
these devices, storing values as 0,1,2,3 "quits" instead of as pairs
of 0,1 "bits." Is my C implementation doomed to be non-conforming?
--
Eric Sosman
esosman@ieee-dot-org.invalid
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2012-01-27 20:30 -0800 |
| Message-ID | <lnaa581mb3.fsf@nuthaus.mib.org> |
| In reply to | #16337 |
Eric Sosman <esosman@ieee-dot-org.invalid> writes:
> On 1/27/2012 8:06 PM, Keith Thompson wrote:
>> In fact an int is represented in binary on any conforming
>> implementation; see C99 6.2.6.2.
>
> I've invented a four-state device that is 7% faster, 18% less
> power-hungry, and 31% cheaper to manufacture than a pair of two-
> state devices. I'm building a revolutionary new computer based on
> these devices, storing values as 0,1,2,3 "quits" instead of as pairs
> of 0,1 "bits." Is my C implementation doomed to be non-conforming?
Not if you manage to make it *look* like everything is made of bits.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Shao Miller <sha0.miller@gmail.com> |
|---|---|
| Date | 2012-01-29 09:27 -0500 |
| Message-ID | <jg3ktf$ua7$1@dont-email.me> |
| In reply to | #16340 |
On 1/27/2012 23:30, Keith Thompson wrote: > Eric Sosman<esosman@ieee-dot-org.invalid> writes: >> On 1/27/2012 8:06 PM, Keith Thompson wrote: >>> In fact an int is represented in binary on any conforming >>> implementation; see C99 6.2.6.2. >> >> I've invented a four-state device that is 7% faster, 18% less >> power-hungry, and 31% cheaper to manufacture than a pair of two- >> state devices. I'm building a revolutionary new computer based on >> these devices, storing values as 0,1,2,3 "quits" instead of as pairs >> of 0,1 "bits." Is my C implementation doomed to be non-conforming? > > Not if you manage to make it *look* like everything is made of bits. > Yeah. A difference that makes no difference is no difference. The context is "bitwise operators," which work with bits. :) Since inspecting the object representation must be possible, any difference between abstract machine and physical representation seems out-of-scope. -- "The stationery store has moved. Aaargh!"
[toc] | [prev] | [next] | [standalone]
| From | Kaz Kylheku <kaz@kylheku.com> |
|---|---|
| Date | 2012-01-28 05:16 +0000 |
| Message-ID | <20120127211620.950@kylheku.com> |
| In reply to | #16337 |
On 2012-01-28, Eric Sosman <esosman@ieee-dot-org.invalid> wrote: > On 1/27/2012 8:06 PM, Keith Thompson wrote: >> >> In fact an int is represented in binary on any conforming >> implementation; see C99 6.2.6.2. > > I've invented a four-state device that is 7% faster, 18% less > power-hungry, and 31% cheaper to manufacture than a pair of two- > state devices. I'm building a revolutionary new computer based on > these devices, storing values as 0,1,2,3 "quits" instead of as pairs > of 0,1 "bits." Is my C implementation doomed to be non-conforming? I always suspected you'd be calling it quits.
[toc] | [prev] | [next] | [standalone]
| From | Joe Pfeiffer <pfeiffer@cs.nmsu.edu> |
|---|---|
| Date | 2012-01-27 21:44 -0700 |
| Message-ID | <1bipjwtp0g.fsf@pfeifferfamily.net> |
| In reply to | #16317 |
Ceriousmall <divadsmall@gmail.com> writes: > Can anyone here point me towards any documentation that explains > bitwise operations in C in a simple manner. After K&R Chap 2.9 > introduction to the bitwise operator I'm still in the dark. Basically > I take out my paper take two integers convert them into their binary > form and compare them using the rules of the bitwise operartors to > yield a result then convert that value back to decimal....... You're not going to like this, but: that section strikes me as crystal clear -- you just need to think in binary. The bitwise operators are about, well, bits. Translating back and forth to decimal adds a bunch of complexity, and makes things much harder to understand. Translating back and forth to octal or hex is pretty much automatic once you're really thinking in binary.
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.c
csiph-web