Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to convert 32-bit integers such as 0xABCDEFAB into arrays in keil4 c5 1
How to convert 32-bit integers such as 0xABCDEFAB into arrays in keil4 c5 1
Sharing a programming idea, it is suggested to judge in the form of shift.

For example, the original variable int 32 _ temp = 0xaBCDEFAB.

To use bit 0, the value is equal to ((int 32 _ temp >>0)&; 0x000 1), and then take the rightmost bit.

And so on, if the value is the nth bit, ((int 32 _ temp >>n)&; 0x000 1)

Please write the specific code yourself:)