![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Tue, 24 Aug 2010 17:18:01 +0100, Orchid XP v8 wrote:
>>> Shifts are perfectly legitimate mathematical operations. Many of the
>>> things computers do couldn't be done easily without a shift operation
>>> :P
>>
>> Binary shifts are multiplication and division as well. :P
>
> What you want is binary rotations. ;-)
That depends on whether the bits actually get rotated. From my
recollection of x86 assembly, it's a shift, not a rotation. :)
Jim
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Tue, 24 Aug 2010 21:21:53 +0200, andrel wrote:
> On 24-8-2010 18:11, Jim Henderson wrote:
>> On Tue, 24 Aug 2010 08:41:13 -0500, Mike Raiford wrote:
>>
>>> On 8/23/2010 10:53 PM, Jim Henderson wrote:
>>>> "Shifting the decimal point" isn't a recognised mathematical
>>>> operation, well, it wasn't when I took maths. Multiplication and
>>>> division are. Just because one takes a shortcut doesn't mean it's a
>>>> different operation.
>>> Shifts are perfectly legitimate mathematical operations. Many of the
>>> things computers do couldn't be done easily without a shift operation
>>> :P
>>
>> Binary shifts are multiplication and division as well. :P
>
> yes and no. Conceptually yes, in a hardware implementation on a chip no.
> That is why they are so much cheaper than real multiplicatons and
> division. The same goes for wetware.
That still doesn't mean it isn't mathematically a multipilcation or
division - the operation doesn't change just because you took a
shortcut. ;-)
> But I appreciate your stubbornness.
I figured you - of all people - would. ;-)
Jim
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
andrel wrote:
> That is why they are so much cheaper than real multiplicatons and
> division.
If you're using a compiler where a shift by a constant is cheaper than a
division by a constant, you're in trouble.
--
Darren New, San Diego CA, USA (PST)
Quoth the raven:
Need S'Mores!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Tue, 24 Aug 2010 15:33:19 -0400, Jim Henderson wrote:
> On Tue, 24 Aug 2010 17:18:01 +0100, Orchid XP v8 wrote:
>
>>>> Shifts are perfectly legitimate mathematical operations. Many of the
>>>> things computers do couldn't be done easily without a shift operation
>>>> :P
>>>
>>> Binary shifts are multiplication and division as well. :P
>>
>> What you want is binary rotations. ;-)
>
> That depends on whether the bits actually get rotated. From my
> recollection of x86 assembly, it's a shift, not a rotation. :)
>
> Jim
My recollection, of course, has changed now that I re-read this, I
remember ROR and ROL operators, which do in fact rotate. I just remember
using SHL and SHR more frequently.
Jim
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>>>> Binary shifts are multiplication and division as well. :P
>>> What you want is binary rotations. ;-)
>> That depends on whether the bits actually get rotated. From my
>> recollection of x86 assembly, it's a shift, not a rotation. :)
>>
>> Jim
>
> My recollection, of course, has changed now that I re-read this, I
> remember ROR and ROL operators, which do in fact rotate. I just remember
> using SHL and SHR more frequently.
Whether your processor supports it or not, binary rotations exist. You
can implement them the hard way if you must. I've seen a few block
ciphers that use 'em too...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 24/08/2010 7:33 PM, Darren New wrote:
> Stephen wrote:
>> Here's a clue
>> http://tinyurl.com/6zz4l7
>
> Oh, it downloaded a MP3. OK. Nevermind. Very cute.
>
Cute, that's me :-)
--
Best Regards,
Stephen
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> andrel wrote:
> > That is why they are so much cheaper than real multiplicatons and
> > division.
> If you're using a compiler where a shift by a constant is cheaper than a
> division by a constant, you're in trouble.
He was talking about hardware, not about compilers.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> andrel wrote:
>>> That is why they are so much cheaper than real multiplicatons and
>>> division.
>
>> If you're using a compiler where a shift by a constant is cheaper than a
>> division by a constant, you're in trouble.
>
> He was talking about hardware, not about compilers.
Yes, I knew that. :-)
--
Darren New, San Diego CA, USA (PST)
Quoth the raven:
Need S'Mores!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 24-8-2010 21:34, Jim Henderson wrote:
> On Tue, 24 Aug 2010 21:21:53 +0200, andrel wrote:
>
>> On 24-8-2010 18:11, Jim Henderson wrote:
>>> On Tue, 24 Aug 2010 08:41:13 -0500, Mike Raiford wrote:
>>>
>>>> On 8/23/2010 10:53 PM, Jim Henderson wrote:
>>>>> "Shifting the decimal point" isn't a recognised mathematical
>>>>> operation, well, it wasn't when I took maths. Multiplication and
>>>>> division are. Just because one takes a shortcut doesn't mean it's a
>>>>> different operation.
>>>> Shifts are perfectly legitimate mathematical operations. Many of the
>>>> things computers do couldn't be done easily without a shift operation
>>>> :P
>>> Binary shifts are multiplication and division as well. :P
>> yes and no. Conceptually yes, in a hardware implementation on a chip no.
>> That is why they are so much cheaper than real multiplicatons and
>> division. The same goes for wetware.
>
> That still doesn't mean it isn't mathematically a multipilcation or
> division - the operation doesn't change just because you took a
> shortcut. ;-)
that is what I said, or at least tried to.
>> But I appreciate your stubbornness.
>
> I figured you - of all people - would. ;-)
we aim to please
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 25-8-2010 17:28, Darren New wrote:
> Warp wrote:
>> Darren New <dne### [at] san rr com> wrote:
>>> andrel wrote:
>>>> That is why they are so much cheaper than real multiplicatons and
>>>> division.
>>
>>> If you're using a compiler where a shift by a constant is cheaper
>>> than a division by a constant, you're in trouble.
>>
>> He was talking about hardware, not about compilers.
>
> Yes, I knew that. :-)
>
Even so I do not understand the remark. Do you mean that a compiler
should not be aware what is cheaper (in time) to do the same thing? Or
that that is not the case anymore, in which case I beg to differ.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |