Modified hw4 bitwise