Page 1 of 1

(Assembly language) Write a subroutine(GROUP) that operates the contents of R5 in order to group all bits equal to 1 on

Posted: Tue Jul 05, 2022 10:25 am
by answerhappygod
(Assembly language)
Write a subroutine(GROUP) that operates the contents of R5 inorder to group all bits equal to 1 on the right and all bits equalto 0 on the left.
See the examples below:Gets R5 = 0xBCA6 = 1011 1100 1010 0110 -->Returns R5 = 0000 00011111 1111
Gets R5 = 0x5322 = 0101 0011 0010 0010 0110 --> ReturnsR5 = 0000 0000 0011 1111