Significance of underscore in binary number.
Franklin
Posts: 4,747
I'm not sure I understand the significance of the underscore in the binary number in this code.
Could someone explain? Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Post Edited (Franklin) : 5/27/2007 1:35:33 AM GMT
bs2.shiftout(MOSI,SCK,%000011_10,BS2#MSBFIRST,8)
Could someone explain? Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Post Edited (Franklin) : 5/27/2007 1:35:33 AM GMT
Comments
01001010_01001010_01001010_01001010
Rather than:
01001010010010100100101001001010
Same goes for hex
FFFF_FFFF
Sometimes they can be used when a number has different bits for different tasks, you split with an _ to make it clear.
Graham
Post Edited (Graham Stabler) : 5/27/2007 2:29:59 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen