I'm curious that assembler (gas) allows you to try to move more than 8 significant bits without errors ... it just encodes mvn for you.
d6008030 <TESTFUN>:
d6008030: e3e00000 mvn r0, #0
d6008034: e3c000bf bic r0, r0, #191 ; 0xbf
d6008038: e12fff1e bx lr
I get 0xFFFFFF40, which is the expected response.
If you want to set bit 7, then
orr r0,r0,
Or did you mean that you want to set bit 6
orr r0,r0,
if you want to delete all bits except bit 6, leaving only bit 6.
and r0,r0,
, 6, ( 6) (bic = bit clear)
bic r0,r0,
mov r0,
mov r1,
bic r0,r0,r1
0x00000040,
mov r0,
and r0,r0,