Last person to post wins

  • Christian Chat is a moderated online Christian community allowing Christians around the world to fellowship with each other in real time chat via webcam, voice, and text, with the Christian Chat app. You can also start or participate in a Bible-based discussion here in the Christian Chat Forums, where members can also share with each other their own videos, pictures, or favorite Christian music.

    If you are a Christian and need encouragement and fellowship, we're here for you! If you are not a Christian but interested in knowing more about Jesus our Lord, you're also welcome! Want to know what the Bible says, and how you can apply it to your life? Join us!

    To make new Christian friends now around the world, click here to join Christian Chat.

Is this a nonsense game?

  • Yes

    Votes: 217 66.6%
  • No

    Votes: 109 33.4%

  • Total voters
    326

AsifinPassing

Senior Member
Jul 13, 2010
3,608
40
48
......................technically, you can't "prove" anything. One may be strongly persuaded given their beliefs/evidence, but 'proof' is a hard thing to come by.
 

PopClick

Senior Member
Aug 12, 2011
4,056
138
63
And lightning can't prove to me that he's a human being. And yet, he knows that he is. And it would be pretty silly of me to believe anything else.

P.S. You are so not dragging this argument into the forums.
 
Feb 10, 2008
3,371
16
38
Exactly blue! I wasn't dragging anything into the forums! You're the one that posted "Prove It"! :) I was just copying you... it is the highest form of flattery you know!
 
W

wwjd_kilden

Guest
Anyone in this thread know programming? I got some code off the net and can't figure out what it is doing:
(the stuff inside the for loop). what does the >> do? and is the 0xFF about comparing bytes?

*has never used bytes before and is confused*

uint h;

for (h = 0, i = 0; i < 625; i++) {

j=k;
h += cuByteOnes[(j>> 24) & 0xFF];
h += cuByteOnes[(j>> 16) & 0xFF];
h += cuByteOnes[(j>> 8) & 0xFF];
h += cuByteOnes[(j ) & 0xFF];

}
uint[] cuByteOnes = {
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, // 00-0F
....
4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 //F0-FF

};
 
Feb 10, 2008
3,371
16
38
Anyone in this thread know programming? I got some code off the net and can't figure out what it is doing:
(the stuff inside the for loop). what does the >> do? and is the 0xFF about comparing bytes?

*has never used bytes before and is confused*

uint h;

for (h = 0, i = 0; i < 625; i++) {

j=k;
h += cuByteOnes[(j>> 24) & 0xFF];
h += cuByteOnes[(j>> 16) & 0xFF];
h += cuByteOnes[(j>> 8) & 0xFF];
h += cuByteOnes[(j ) & 0xFF];

}
uint[] cuByteOnes = {
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, // 00-0F
....
4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 //F0-FF

};

>> is a bitwise shift.
& 0xFF is a bit mask. So take the binary representation of the value of j(32 bits total), then chop off the 24 bits on the right. Take the resulting 8 bits and mask them (this actually gives you the same value). then do the same thing except only shift by 16 bits. So this time the value being masked will be 16 bits, so you'll be chopping off the left 8 bits.

|01101011|10101101|00001011|11001011
|. . j>>24.|..J>>16...|....j>>8...|.......j

In other words...
It shifts and masks so that you get exactly a byte(8 bits) of data on each line. So if you're given 32 bits, it gives you the fourth byte, then the third byte, then the second byte, then the first byte.
 
Last edited:

JimJimmers

Senior Member
Apr 26, 2012
2,592
76
48
Young man, I wish to complain about this parrot I bought not half an hour ago from this very boutique.
 
W

wwjd_kilden

Guest
>> is a bitwise shift.
& 0xFF is a bit mask. So take the binary representation of the value of j(32 bits total), then chop off the 24 bits on the right. Take the resulting 8 bits and mask them (this actually gives you the same value). then do the same thing except only shift by 16 bits. So this time the value being masked will be 16 bits, so you'll be chopping off the left 8 bits.

|01101011|10101101|00001011|11001011
|. . j>>24.|..J>>16...|....j>>8...|.......j

In other words...
It shifts and masks so that you get exactly a byte(8 bits) of data on each line. So if you're given 32 bits, it gives you the fourth byte, then the third byte, then the second byte, then the first byte.
Ah. Thanks :)