uint num = 10; // first cast uint256 to uint160 then cast to address address addressFromUint = address(uint160(num));