php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS401 Assignment # 2- Help needed
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#3
Hi Anya,
i think today is bonus day for ur assignment..
i have gOt this little help that may help u ...as its not my subject but my brothers

so kindly...have a look


Below is the idea solution:
Q1.
Take a number and move in one variable like AX.
Use NOT to invert.
Add 1 to it.
Answer is 2.s complement,

Pseudo code:
move Ax, 10
Not AX
Add ax,1


Q2.
Use the examples in handoouts (print number + hello world).
write a sub routine to check for even or odd, if it it odd (divide by 2, if remainder in dx is not zero, it is odd), then exit from sub routine using ret, and display the result,
If number is even, the check for power of two. Algoeithim is divide the number by 2 untill divider is 1 and check for remainder dx using XOR. if remainder is 1 then it is not power of 2,

subriutine of clear screen
subroutine to display
subroutine to check even
move AX,10 ;number to check
move bx, 2
div bx,
cmp dx,0
jnz outofsequence
move AX,10 ;number to check
move bx, 2
div bx,
cmp bx,1
jmb mainloop
XOR bx, dx
cmp bx, 0
if not 0, number is not power of 2,
else number is power of 2,
ret main loop
call display in main loop

you need to use stack in your program too.


I hope now it will be easy to write the program.

best regards
Reply


Messages In This Thread
CS401 Assignment # 2- Help needed - by Anya - 11-20-2010, 11:41 PM
CS401 Assignment # 2- Help needed - by Anya - 11-22-2010, 11:33 PM
CS401 Assignment # 2- Help needed - by wasil - 11-24-2010, 01:46 AM
CS401 Assignment # 2- Help needed - by Xpert - 11-28-2010, 03:23 AM
CS401 Assignment # 2- Help needed - by raazia - 06-05-2011, 08:01 AM
CS401 Assignment # 2- Help needed - by Xpert - 06-05-2011, 02:24 PM
CS401 Assignment # 2- Help needed - by Vuhelper - 06-05-2011, 07:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need ACC501 - Business Finance Assignment No 2 Solution. Umar Abbas 2 4,297 02-07-2014, 08:23 PM
Last Post: Umar Abbas
  sta301 assignment 4 27 jun bc110200090 6 3,654 01-26-2013, 02:05 AM
Last Post: Vuhelper
  cs506 2nd assignment millee 0 2,705 12-04-2012, 11:30 PM
Last Post: millee
  cs506 2nd Assignment Neelam Ahmad 5 3,190 12-04-2012, 11:24 PM
Last Post: Vuhelper
  CS 504 Assignment 2 need help ommmi 24 11,601 11-27-2012, 04:59 AM
Last Post: Xpert
  Mcs cs402 1st assignment chahat4all 2 3,819 11-01-2012, 11:11 PM
Last Post: chahat4all
  eng201 assignment 4 due date 4/7/2012 bc110200090 6 2,672 07-03-2012, 03:51 PM
Last Post: bc110200090
  need CS304 4th assignment shazma 0 2,100 06-26-2012, 12:48 PM
Last Post: shazma
  sta301 assignment 4 solution vudecent 0 2,438 06-25-2012, 01:51 AM
Last Post: vudecent
  Required Soluction for 3rd Assignment of CS101 bc120200426 1 2,186 06-14-2012, 04:13 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support