I have an unsigned 16-bit integer in big endian byte order: 0x01f1 but they are in a byte array as follows:
Array
[0] 0x01
[1] 0xf1
How do I “join” Array[0] with Array[1] such that I could have my value of 0x01f1 back?
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 use shift and bitwise operators to combine the two array elements as follows: