Bitwise operations in TSQL
Your cast isn't doing what you think it should.

select cast(cast(100 as binary) as int) equals 100.  In other words, you are casting the decimal value 100 to binary, not taking '100' in base-2 notation.

Your expectation is actually this:

Declare @a integer
set @a = 0
set @a = @a | cast (1 as BINARY)
set @a = @a | cast (5 as BINARY)
select cast (@a as integer)


Incidentally, if this is new development, I very highly recommend against bit shifting in SQL Server.  It's slow, difficult to maintain, and violates first normal form.  If it's not, I'll guess that you probably know this already...

To convert binary to decimal, you can create a function.  There are other ways of going from integer to display base-2 notation, but this feels like it would be quite slow.