A word consists of the bytes b4, b3, b2, b1. Write a function to invert the bits of b3 and clear the bits of b2 while leaving all other bits unchanged.

What will be an ideal response?


We have bits ddddccccbbbbaaaa and we require ddddcccc0000aaaa. We can write





MOV r1,#0x0000FF00 ;set up mask in r1 in the bbbb position

BIC r0,r0,r1 ;get ddddcccc0000aaaa

MOV r1,0x00FF0000 ;set up mask in r1 in the cccc position

EOR r0,r0,r1 ;toggle cccc bits





The following gives the output of the ARM debugger (using dummy values)



Computer Science & Information Technology

You might also like to view...

If you have a class defined in separate files, and change the way a class is defined, which files need to be re-compiled?

a. The interface b. The application c. The Implementation d. All files e. B and C

Computer Science & Information Technology

Draw glasses on a picture of a person who doesn’t normally wear glasses.

What will be an ideal response?

Computer Science & Information Technology

A server administrator is implementing disk redundancy in all database servers. Which of the following RAID configurations should the administrator use so that a MINIMUM number of disks are required?

A. RAID 0 B. RAID 1 C. RAID 5 D. RAID 6

Computer Science & Information Technology

BMP, JPEG, TIFF, and PNG are examples of _______ files

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology