for setting the 6th bit:
x | (1<<5)

for unsetting the 6th bit:
x & (~(1<<5))

hope it helps.
:)