Bitwise Interview Question

Questions from java and sql and pattern making