iq
Prompt
NGL I forgot the original prompt and idea of the challenge, but it goes something like this.
Here is an analog signal 01000011011100100110111101101101011101010110110001100101011011100111010000001010
transform it based on the given tranforming thing.
Q (+1)
(0, 1) | (1, 1)
o | o
|
(-1) I --------|------- I (+1)
(0, 0) | (1, 0)
o | o
|
Q (-1)
In addition, the answer should be given in alternating IQ order like so
I Q I Q
1.0 -1.0 -1.0 -1.0
Solution
From this it looks like it’s a basic encoding of 1s and 0s into 1s and -1s. Basically if the bit was as 0, the resulting I or Q would be a -1.0 and vice versa. Therefore I quickly wrote this script and it solved the challenge. EZPZ
bits = "01000011011100100110111101101101011101010110110001100101011011100111010000001010"
for i in bits:
if i == "0":
print("-1.0", end=" ")
else:
print("1.0", end=" ")
QED