Assembler Developer

Moderators: None (Apply to moderate this forum)
Number of threads: 1030
Number of posts: 1826

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

Report
MIPS...checking least significant bit. Posted by rjdfhorn_06 on 9 Oct 2008 at 8:03 AM
I'm working on an assignment and have reached a road block. If I have a 16 bit integer like:

0000 0000 0000 0100

how would I check to see what the value in the LEAST significant bit is? Basically, how would I check to see if the least significant bit is 0 or 1? How would I code it? I am a beginner at MIPS...is there a simple instruction that detects this? Please help.
Report
Re: MIPS...checking least significant bit. Posted by BitByBit_Thor on 9 Oct 2008 at 2:48 PM
: I'm working on an assignment and have reached a road block. If I
: have a 16 bit integer like:
:
: 0000 0000 0000 0100
:
: how would I check to see what the value in the LEAST significant bit
: is? Basically, how would I check to see if the least significant bit
: is 0 or 1? How would I code it? I am a beginner at MIPS...is there a
: simple instruction that detects this? Please help.
:

Don't know MIPS myself, but you could use binary and to check.
LSB will be checking "if (number & 1)", only then in assembly code.

Best Regards,
Richard

The way I see it... Well, it's all pretty blurry



 

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.