Timeline for Clarification of pseudo random number generator
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 7, 2011 at 18:01 | history | migrated | from stackoverflow.com (revisions) | ||
| Jul 6, 2011 at 6:30 | comment | added | JohnKlehm | Essentially the "mask out" step translates to R &= Math.pow(2, n + 2); This code isn't quite right so don't just turn this in for your homework. I'm hoping by the time you figure out what is missing you'll not have needed my hint anyway :) | |
| Jul 6, 2011 at 6:16 | comment | added | JohnKlehm | All data types are represented by a certain numbe of bytes wether it's an integer or a float or class. If a bit is 1 then it gets the value I set above it. So when you have the value 3 in an int you can think of the bits being 00000011 since you need the 2 and the 1 to make 3. This site goes into more detail: helpwithpcs.com/courses/binary-numbers.htm | |
| Jul 6, 2011 at 5:16 | comment | added | Ellipsis... | But R is an integer no? what are the bits of an integer | |
| Jul 6, 2011 at 5:00 | history | answered | JohnKlehm | CC BY-SA 3.0 |