Question: I need help cause I have less idea to do this homework you must write an implementation of the function count_bits in ARM assembly language:

I need help cause I have less idea to do this homework

you must write an implementation of the function count_bits in ARM assembly language:

int count_bits(unsigned int *array, int size); 

The function accepts two arguments. The first is a pointer to an array of integers. The second is the number of integers in the array. The function counts the total number of set bits in the array. For example, if the array contained this (in hex):

d6275066 88718a3d

The function call should return 29.

you can use registers r0 to r10, provided you save them on the stack. Do not use registers r11-r15.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!