Pages: 1 [2]   Go Down
Author Topic: How to convert a number to binary ?  (Read 1245 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 308
Posts: 26471
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Yes I know. Serial.print(y,bin).
Close, but no cigar.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Something else I would like to know is about how can I separate a 16 bin value of a variable into
 2 8bin variables. For example  x = 0B1111111100000001, I would like  y to be 0B11111111 and
 z = 0B00000001 in order to send them with shiftout (using 2 shift registers) to another chip.
So, you WERE able to find the reference page. Too bad you didn't spend just a little bit longer there. That's a page well worth spending more then 2 minutes at. You should at least familiarize your self with the available functions, even if you don't study things like highByte and lowByte. Just knowing that they are there is useful.

You are right. I had to search more the reference page. It is in my plans. Thank you very much for your response. You helped me a lot and I understood many things!
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Yes I know. Serial.print(y,bin).
Close, but no cigar.

You also helped me a lot, it tooks me enough time to understand byte behavior and how to print it . Also sorry for my late response.
Logged

Pages: 1 [2]   Go Up
Jump to: