Nios/zeroext

From ASMBits

nios/mask2Previous

Write a function (named zeroext) that will zero-extend an 8-bit input number (the lowest 8 bits of the function parameter) to 32 bits. The upper 24 bits of the input number should be ignored (and may not necessarily be zero).

unsigned int zeroext(unsigned int n);


Sample Input

0xf0

Sample Output

0x000000f0

Write your solution here

Upload a source file...