English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

I don't think you can divide by 10 with bitwise operators. You can divide by 2, 4, 8, 16, etc with the >> (rotate right) operator though.
example:
int b, a = 200;
b = a >> 1; //divide by 2 b = 100
b = a >> 2; //divide by 4 b = 50
b = a >> 3; //divide by 8 b = 25
b = a >> 4; //divide by 16 b = 12
b = a >> 5; //divide by 32 b = 6
b = a >> 6; //divide by 64 b = 3

2006-09-22 02:35:24 · answer #1 · answered by justme 7 · 1 0

each unusual quantity (in binary) has a million on the tip ie 10001 is unusual. so do exactly if (mynum && a million == a million) unusual (mynum && a million == 0) even AND a million will positioned all flags to 0 different than final one

2016-12-12 12:26:18 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers