Make your computer count from 0 to -1 with the number being 64-bit.
Last edited by ThePCKid (2011-05-07 19:12:32)
Offline
Are you talking about getting the computer to loop the number around when it get's to high?
Offline
scratcher7_13 wrote:
Are you talking about getting the computer to loop the number around when it gets to high?
*ding* *ding* *ding*
WE HAVE A WINNER!
Offline
I don't entirely get the whole concept of 64 bit...
endorsing a tecnicality here, couldn't you just open calculater, make the first number 0, and add (-1)?
Offline
Easy. 64Bit.
All you have to do is keep adding 1 and you will get to -1
0 = 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
1 = 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001
2 = 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010
3 = 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0011
4 = 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0100
...
-1 = 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111
In binary if the far left is one it means the number is negative. All ones means -1
My site Offline
I'm running a program right now.
#include <iostream>
using namespace std;
int main () {
int number=0;
while (number != -1) {
cout << number << endl;
number = number + 1;
}
}Edit: it's in the nine-millions. :O
Edit: I just realized that this will almost never end. :(((((
Last edited by johndo77 (2011-05-08 09:31:39)
Offline