c# - Get Specific Bit and Get first 14 bits of a ushort value
问题 After reading all of the questions and answers on bit shifting/masking, I simply cannot wrap my head around it. I'm just not understanding how it works on a fundamental level. I've been able to achieve various techniques by using BitArray and BitConverter instead, but I really would like to understand bit shifting/masking better. The specific need I have is to do the following: I have a ushort: 0x810E (33038) Using bit shifting/masking, I'd like to know how to: Get the 16th bit Result: 1 Get