Close

just realised my sampes are LEFT justified !

A project log for wireless microphone digital

developing a digital wireless radio mic in both 2.4ghz and UHF

ben bilesben biles 08/08/2016 at 09:550 Comments

My 32bit binary samples are left justified!!!! looking at the binary numbers converted something looks wrong.

if I copy from uint32_t to a uint8_t with a bit shift of >>24 and mask & 0xFF I should get an 8 bit number represetation of the 32bit number.

but i'm getting only 11111111 whatever the 32 bit number. no wonder i'm getting some quite interesting noises on the reciever !

How do you convert a LEFT JUSTIFIED 32 bit number to 8 bit ?

do I need to right justify first ? and then bitwise shift >>24 ?

google brings up a solution to justify binary from right to left but not from left to right !!

Discussions