Discussion
Bitwise can be used to generate a random number.
Answer: B
Correct answer: No
Bitwise operators are entirely deterministic: the same operands always give the same result, so nothing about them produces randomness.
A pseudo-random generator needs persistent state, a seed and an algorithm chosen so that successive outputs pass statistical tests. Some well-known generators - the xorshift family - are indeed built from XOR and shifts, but the randomness comes from the algorithm and the seed, not from the operators, which are only the arithmetic it happens to use.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development