I'm trying to write a function in assembly (but lets assume language agnostic for the question).

How can I use bitwise operators to set all bits of a passed in number to 1?

I know that I can use the bitwise "or" with a mask with the bits I wish to set, but I don't know how to construct a mask based off some a binary number of N size.

Edit
Report