Assembler Developer

Moderators: None (Apply to moderate this forum)
Number of threads: 970
Number of posts: 1762

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
LC3 Assembly Posted by mreyeros on 8 Apr 2004 at 9:58 AM
i am trying to find the code to perform multiplication and a logical right shift on two unsigned integers.
Report
Re: LC3 Assembly Posted by mombawamba on 10 Apr 2004 at 9:34 PM
: i am trying to find the code to perform multiplication and a logical right shift on two unsigned integers.
:
What do you mean by LC3? Is this the Little Computer 3? The HP server? Or something else?

~Sparrow
Report
Re: LC3 Assembly Posted by lido on 10 Jun 2004 at 2:32 AM
: : i am trying to find the code to perform multiplication and a logical right shift on two unsigned integers.
: :
: What do you mean by LC3? Is this the Little Computer 3? The HP server? Or something else?
:
: ~Sparrow
:

Hi,

I'm interested to find out how to shift right in LC3 as well. I'm not sure what's LC3, but basically there's only three operators that can be used to shift bits to the right. They are AND, ADD and NOT.

I only know that to shift to right, we need to divide the number by half. But in LC3, there's no divide operatior. So we need to make use of the three operators to do the shifting.

Any experts here that knows hoa to do that?

Thanks.

Report
Re: LC3 Assembly Posted by lido on 10 Jun 2004 at 9:47 AM
: : : i am trying to find the code to perform multiplication and a logical right shift on two unsigned integers.
: : :
: : What do you mean by LC3? Is this the Little Computer 3? The HP server? Or something else?
: :
: : ~Sparrow
: :
:
: Hi,
:
: I'm interested to find out how to shift right in LC3 as well. I'm not sure what's LC3, but basically there's only three operators that can be used to shift bits to the right. They are AND, ADD and NOT.
:
: I only know that to shift to right, we need to divide the number by half. But in LC3, there's no divide operatior. So we need to make use of the three operators to do the shifting.
:
: Any experts here that knows hoa to do that?
:
: Thanks.
:
:
By the way, just found out that LC3 is little computer 3. Yeah u're right. Any one can advise on the shift right ?

Thanks
Report
Re: LC3 Assembly Posted by kernelOfTruth on 6 Jan 2005 at 12:11 PM
: : : : i am trying to find the code to perform multiplication and a logical right shift on two unsigned integers.
: : : :
: : : What do you mean by LC3? Is this the Little Computer 3? The HP server? Or something else?
: : :
: : : ~Sparrow
: : :
: :
: : Hi,
: :
: : I'm interested to find out how to shift right in LC3 as well. I'm not sure what's LC3, but basically there's only three operators that can be used to shift bits to the right. They are AND, ADD and NOT.
: :
: : I only know that to shift to right, we need to divide the number by half. But in LC3, there's no divide operatior. So we need to make use of the three operators to do the shifting.
: :
: : Any experts here that knows hoa to do that?
: :
: : Thanks.
: :
: :
: By the way, just found out that LC3 is little computer 3. Yeah u're right. Any one can advise on the shift right ?
:
: Thanks
:

I just got this book as well, and I have been stuck on that exercise for a while. I can't really think of a very efficient way to do a right shift with only ADD, AND, and NOT. I don't really know that I've solved the problem, but I have a theory. See if this works:

* A left shift is easy
* A left rotate is a little harder, but not much
* N - 1 left rotates is equivalent to a right rotate
* A right rotate with the MSB cleared is equivalent to a right shift




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.