Author: Robert Hyatt
Date: 19:52:20 05/16/00
Go up one level in this thread
On May 16, 2000 at 22:33:41, Bruce Moreland wrote: >On May 16, 2000 at 22:14:49, Antonio Dieguez wrote: > >>hello, at last im really implementing hash tables, and they are already working >>on my program, more or less. >> >>I have a doubt about the ^, am sorry my complete ignorance but what kind of >>numbers appears? for example two numbers of 7 digits sometimes results on a >>number of 8 digits! and off course this cant be out of control if it is the >>index for the hash table. >> >>Thanks in advance... >> >>bye bye............. be well. >> >>me. > >^ is XOR. If you say A ^ B, you get zeros in every bit position except where >there was a one-bit in A and a zero-bit in B, or vice versa. > >1 ^ 1 = 0 >1 ^ 0 = 1 >0 ^ 1 = 1 >0 ^ 0 = 0 > >There is no carrying, so if you have two numbers A and B, A ^ B can't be more >than A | B. You can't XOR two 7-bit numbers and get a number that's 8-bits. > >bruce I think he was talking about integer output. If you take two chars: 0x80 and 0x20 and printf() them on a %d format, you get 128 and 32. But if you xor them you get 160 (0xA0). It looks like it got bigger, when in terms of binary bits it didn't.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.