Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Sep 11th, 2005, 8:23 PM   #1
browning_man9
Newbie
 
Join Date: Sep 2005
Posts: 5
Rep Power: 0 browning_man9 is on a distinguished road
A little help please

Hey I am new to this forum and very new to this forum. I am currently taking a computer science introductory course and I am having a little bit of trouble. We are using all the basic commands of assembly (I think) like mov, inp, cpy, div a, mul a, add a, brz (branch if zero) a, brp a (branch if positive), jmp (jump), etc. I am trying to write a program that prints the ulam sequence....if that inputted number is even divide it by two...if its odd, multiply by three and add one....I am finding it very difficult to figure out how to test if the number is odd or even using these few commands, and using only 32 bytes. This is the only part I am stuck on....Could you please show me how to test if its even or odd using only the simple commands? Thank you very much for your time!
browning_man9 is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:09 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC