sign_extend does not work

61 views
Skip to first unread message

Shawn McGirr

unread,
Oct 9, 2020, 6:08:00 PM10/9/20
to cmpt-295-sfu
SFU ID: 301358896
Github username: mcgirr5799
Github link: g...@github.com:CMPT-295-SFU/assignment-2-mcgirr5799.git
Expected behaviour: for sign_extend to work
Observed outcome: sign_extend is failing
Question: 
The sign_extend function seems to fail, even though it is identical to the one used in our Lab 4. All the part 1 test work but test_utils does not. I can't figure out the reason why.


Screenshot from 2020-10-09 14-56-07.png

Arrvindh Shriraman

unread,
Oct 9, 2020, 7:00:26 PM10/9/20
to cmpt-295-sfu
Check again; your sign is not correct.
You have got operator precedence problems and need () at the right places

Shawn McGirr

unread,
Oct 9, 2020, 7:30:29 PM10/9/20
to cmpt-295-sfu
It seems to be the exact same as the function provided. 

Arrvindh Shriraman

unread,
Oct 9, 2020, 8:53:45 PM10/9/20
to cmpt-295-sfu
At least as I see it on your checked code its not.
Reply all
Reply to author
Forward
0 new messages