This is because you are shifting a 32-bit signed value. Relational operators, just like arithmetic operators extend all the operands before applying the operation. Try displaying ( ls_9_0 << 5 ) + 0
This is because you are shifting a 32-bit signed value. Relational operators, just like arithmetic operators extend all the operands before applying the operation. Try displaying ( ls_9_0 << 5 ) + 0
Hi Dave.,
In the above reply u have mentioned shift operation is done on 32-bit signed value, But in Have_A_Doubt code he has assigned variable size as 4bit[3:0] and 10bit[9:0].Please clarify.