discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Operation of short to char


From: Stephen Harrison
Subject: [Discuss-gnuradio] Operation of short to char
Date: Thu, 27 Jun 2013 11:34:19 -0700

Hi,

Just wondering if the operation of short to char is a bug or intentional. The most significant 8 bits of the short gets converted to char, ie:

0-255 (short) -> 0 (char)
256-511 (short) -> 1 (char)
512-767 (short) -> 2 (char)

This is not the operation I expected, but the unit test allows it to work this way, so I am confused.

Regards,

Stephen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]