Casting_static_casting_system_verilog

In reply to Mahesh K:

Static casting is usually used when you want some other cast different from the implicit casting rules. But you can use an explicit cast to show your intent even the cast is the same as what would happen implicitly. This might eliminate error from linting tools.

In your second example, your explicit cast to 8 bits is what would implicitly happen without the cast. But you made the assignment to num after the cast.