this piece of my tutorial i don't understand.
i think i understand the falseIn general, &, |, ^, and ~ apply their operations directly to each bit in a value individually. For this reason, bitwise operations are not usually used in conditional statements the way the relational and logical operators are. For example, if x equals 7, then x && 8 evaluates to true, whereas x & 8 evaluates to false.
this is what i think that it means
0111 = 7
1000 = 8
____&
0000 = false
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
you're doing basically a logic 7 AND 8 operator
since 7 is not 0/FALSE thus is 'TRUE' and 8 is not 0/FALSE thus is 'TRUE'
you end up with TRUE AND TRUE = TRUE
Last edited by lalakijilp; 11-02-2009 at 10:17 AM.
edit: Sorry yeah 0 == false Sounds like you got it - just imagine like you're working with 1 bit and the value is either TRUE (== 1 or 'not 0') or False(==0)
Ok
& = BitWise AND, while on the flipside
&& = LOGIC AND
You understand BITWISE AND as you described above
you 'AND' every bit in the value A with the matching bit in Value B
What do we know about TRUE & False? False is usually '0' and TRUE is usually 1 (or more) or expressed in 'logic': True is NOT 0
Keeping mind that 0==False and TRUE is anything that is NOT 0Code:0111 = 7 1000 = 8 ____& 0000 = false or say 1110 = 14 0100 = 4 _________ & 0100 = 4 ; this is NOT 0 (False) so it has to be 'True'
The logic comparison you wrote is basically saying:
7 AND 8:
is 7 the same as 0(FALSE)? No, so that operand translates into 'TRUE'
is 8 the same as 0(FALSE)? No, So this operand also is 'TRUE'
So you end up with : TRUE and TRUE (or 1 and 1 if you will) which results in TRUE (1)
Hell_Demon (11-02-2009),lalakijilp (11-02-2009)
translate me to textCode:01000010001100010110000101100011011010110100000101101110011001110110010100110001001000000110100101110011001000000111010001101000011001010010000001100100011011110110110101101001011011100110000101110100011010010110111101101110001000000110011101110101011110010010000001100110011100100110111101101101001000000111010001101000011001010010000001101100011001010110010101110100001000000111011101101111011100100110110001100100001000010010000001101000011001010010000001110011011000010111011001100101011100110010000001101111011101010111001000100000011100110110111101110010011100100111100100100000011000010111001101110011011001010111001100100000011001100111001001101111011011010010000001100011011011110110110101110000011010010110110001100101011100100010000001100101011100100111001001101111011100100111001100100000011000010110111001100100001000000110100101110011001000000111010001101000011001010010000001101101011000010111001101110100011001010111001000100000011011110110011000100000011101000110100001100101001000000111010101101110011010010111011001100101011100100111001101100101001000000011101100101001
Ah we-a blaze the fyah, make it bun dem!
you making some kind of "he-man "joke with the master of the universe thing? lol :P
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
Hell_Demon (11-02-2009)
How about a 3 key keyboard?
why06 (11-02-2009)
Lol. Those are the only keys you need I guess. haha!
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower