I am looking to learn how to get two nibbles (high and low) from a byte using C# and how to assemble two nibbles back to a byte.
I am using C# and .NET 4.0 if that helps with what methods can be done and what libraries may be available.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can ‘mask off’ 4 bits of a byte to have a nibble, then shift those bits to the rightmost position in the byte: