Kindly help in solving this assignment....please!
Question_1: [marks: 10]View more random threads:
Find the 2’s complement of a number using bitwise logical operator.
Question_2: [marks: 10]
Take a random number of word (dw), form and input this to a subroutine “Is Number Power of Two”. Check number is in power of 2 using bitwise logical operators and then display the return result on the screen if the number is even it diplay that number is even if the number is odd then it display the number is odd.
Sponsored Links
Due date: 22-11-2010
Kindly help in solving this assignment....please!
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
Good effort.
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
cs 402 ki assingment ka soln post kr dain.it is third assingment.it is difficult 4 me
where is your assignment i can not see your assignment
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
cs402 solution
http://vuhelp.net/mcs/6247-cs402-theory-automata-idea-solution-assignment-no-3-spring-june-2011-a.html
There are currently 1 users browsing this thread. (0 members and 1 guests)