how to convert an analog signal to stream of bits

5 views (last 30 days)
I have a real data i collected from the lab. The data was collected from a wireless receiver. The data is power in db i.e. -54, -52, ... I need to modulate the data however in this case before i modulate the data must be in bits. What i need to do is convert the continous data into stream of bits. For example -54 is represented by "01010". Can someone tell me how to do that. I was able to quantize it but not sure how to represent the quantaized data in bits i.e. ready to be modulated.
  1 Comment
Walter Roberson
Walter Roberson on 31 May 2020
For example -54 is represented by "01010"
That is an odd conversion. In one's complement and two's complement, negative values always come out with the high bit set. In separated sign, it is arbitrary as to whether sign bit 0 indicates negative or positive, but with separated sign, the '1010' part would be decimal 10 if the 0 is indicating negative, that would be an encoding for -10.
An 8-bit 2's complement representation of -54 would be 11001010 which has the same last 5 bits, but the first 3 bits are important as well.
We can't really tell you how to do the conversion into bits unless we know the details of the representation you are using.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!