Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

log base 2 in assembler davlpid-2704922-dt-content-rid-115 MP375001.201720IHw1 a

ID: 3782730 • Letter: L

Question

log base 2 in assembler davlpid-2704922-dt-content-rid-115 MP375001.201720IHw1 assembler. pdf 1547o81 COMP375 Computer Architecture and organization Write the following programs in Intel assembler. Upload just your .cpp source code to Blackboard. write a program that will calculate the log base 2 an integer. The log base 2 can be easily calculated by counting the number of times you have to shift a number to the right before it is one. #include kio stream> using namespace std; int main (int argn, char *argv int number, log; cout "Enter a number cin number; asm f Calculate the log2 of number and store the result in log cout The logarithm is log endli return 0;

Explanation / Answer

Yup,there is a mistake in your logic.Small mistake.You did most of your program right.But,don't worry.

Mistakes :

See,I m writing the pseudo code for this.Hope,it helps