RoboAlias:
Hi
I'd just like to ask what this code means
int session =B'111111111';
int bit=1;
bool workinghour = (session&bit)==bit;
to be more precise, what does the (session&bit) part of the code do?
session is a binary representation of the number 255 ie: 8 bits
bit is not a bit but an integer number in this case 1
workinghour is true or false depending on the result session AND bit
in this case any number upto 255 would return true as all bits are set to 1

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi
I'd just like to ask what this code means
int session =B'111111111';
int bit=1;
bool workinghour = (session&bit)==bit;
to be more precise, what does the (session&bit) part of the code do?