E
Eric Sosman
Richard said:Eric Sosman said:
No, those are my words, not Mark's.
Woops! My apologies for the misattribution.
Richard said:Eric Sosman said:
No, those are my words, not Mark's.
Eric said:Thank you, Jordan, for drawing my attention to my inattention.
Tracing back the thread, though, I find this remark from Mark
McIntyre:
.... to which you responded:
McIntyre says the shift operators work on values, not
representations, and you say you don't believe him. That's what
I'm trying to refute: I add my voice to the McIntyre (and
Heathfield) chorus to say that you are mistaken.
Thank you, Jordan, for drawing my attention to my
inattention. Tracing back the thread, though, I find
this remark from Mark McIntyre:
... to which you responded:
McIntyre says the shift operators work on values, not
representations, and you say you don't believe him.
Chuck said:You can pick out any bit from a value, regardless of the underlying
representation, by dividing by a suitable power of 2, and then taking
the result modulo 2. The latter is simply the Pascal function odd(n).
The statement i disbelieved was "Values don't have number bases".
The base of an integer value is 2.
The standard mentions "bits" in too many places for me to believe this.
Something along the lines of:
An integer value in the range 0..2**(n-1) can be uniquely defined
as a sum of powers of two: ... + b3 * 2**3 + b2 * 2**2 + b1 * 2**1
+ b0 * 2**0. Each bn value is referred to as the nth _bit_ of the
integer value.
For some reason RJH's original post didn't make it here. However, my
response would have been " Rubbish", which is rare for a response to
an RJH post.
Mark said:For some reason RJH's original post didn't make it here. However, my
response would have been " Rubbish", which is rare for a response to
an RJH post.
One can I suppose argue that you break the number down into a sum of
powers of two. Er, guys, thats called a "representation".
right?
You could implement integer representations as strings of characters
"0" and "1" and have unlimited precision arithmetic. Am I correct in
assuming the standard would allow this as long as evrything behaves as
it should?
Jordan said:<snip>
No. The statement i disbelieved was "Values don't have number bases".
The base of an integer value is 2.
Richard said:Mark McIntyre said:
That fact alone should give you pause for thought. What makes you think my
statement is rubbish?
Because 'stored' values do have number bases.
You seem to be playing games with language.
Values in C stored in 'int x' have binary
representation in memory.
Whether 42, 052 or 0x2A the int in memory
looks something like 0..00101010 in binary.
The value of 'x >> 1' will
look like 0..00010101 which seems to be a binary operation to me.
What am I missing?
Mark McIntyre said:
That fact alone should give you pause for thought. What makes you think my
statement is rubbish?
Joe Wright said:
They do?
It's just how it looks, not what it /is/.
The fact that we're not talking about representation here.
Because it was intrinsically meaningless.
Yes. Obtuseness aside. Go ahead, though, design a baseless storage
mechanism and build a computer with it....
Oh, philosophy now?
Hmm, and we're not playing games?
I'm afraid you are.
You seem to be playing
games with language. Values in C stored in 'int x' have binary
representation in memory. Whether 42, 052 or 0x2A the int in memory
looks something like 0..00101010 in binary. The value of 'x >> 1' will
look like 0..00010101 which seems to be a binary operation to me.
What am I missing?
Because 'stored' values do have number bases.
You seem to be playing games with language.
Values in C stored in 'int x' have binary representation in memory.
Whether 42, 052 or 0x2A the int in memory looks something like 0..00101010
in binary.
The value of 'x >> 1' will look like 0..00010101 which seems to be a binary
operation to me.
What am I missing?
Because 'stored' values do have number bases.
You seem to be playing games with language.
Values in C stored in 'int x' have binary representation in memory.
Whether 42, 052 or 0x2A the int in memory looks something like 0..00101010
in binary.
The value of 'x >> 1' will look like 0..00010101 which seems to be a binary
operation to me.
What am I missing?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.