byte A=B0110;byte B=B1011;byte AB=(A<<4)|B;
byte testb = (numbers << 4) | numbers;
ok i have tried these and if the 8th bit (thats what i belive it is) if the upper most bit (left hand side when writing it) is 0 then it is ommitted but i need to send it as an 8 bit for the i2c i have running so i need it to have 8 bits and not emmit them. how can i ensure it can be used with all 8?
so what i am looking to do is force it to be an 8 bit regardless of it having a 0 on the end
basically once i have done the bit shifting if i get a 8-bit binary with a 0 as the last bit (mot left bit one in blue) 01001010 instead of it remaining on the end it is ommited so the binary is displayed as 1001010 instead of 01001010 because i am using this 8-bit binary for an i2c project i need it to have all 8 bits in it. so what i am looking to do is force it to be an 8 bit regardless of it having a 0 on the end
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16