[phpBB Debug] PHP Notice: in file /viewtopic.php on line 988: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 988: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
Sagan Technology Metro • View topic - Derivation Magic... (Bitwise calculation)

Derivation Magic... (Bitwise calculation)

General Metro Questions and Answers should be asked and answered here

Moderator: w

Derivation Magic... (Bitwise calculation)

Postby Lytz1 » Mon Oct 08, 2018 1:18 pm

Derivation Magic... Tough topic.. :)

(1 << (2 - 1)) | (1 << (16 -1)) which equals 1 << 1 | 1 << 15 which equals 2 | 32768 (<--?)
which equals 32770.


It's all good for me and I get the logic until the sudden jump to 2|32768
Might come down to the values of the actual mask?
I am looking into Bitwise online calculators but the entry masks are very different
when shifting is involved...

If this is too complex to explain in a few sentences, don't bother. I then try to read myself into it
via online resources. But I always like to try to understand the difficult stuff in the software I use.

Best,
tL.

(I do understand simple shifting like
8 4 2 1 = Mask, then
0 0 1 1 = 3
shifted to the left by 1 =
0 1 1 0 = 6
but I just get the basic concept with simple numbers... :) My "best guess" here is that the end result
looks something like this for 32768 in binary format to tell metro which "switch" for the derivation algorithm is on or off: 0-10001110-00000000000000000000000 But this is only a best guess really...)
Lytz1
 
Posts: 152
Joined: Wed Jul 09, 2014 6:21 pm

Re: Derivation Magic... (Bitwise calculation)

Postby Jerm » Mon Oct 08, 2018 1:50 pm

The windows calculator in programmer mode makes this very easy because you can click on the binary 1's to turn them into zeros and visa versa. Then the decimal number is the value.
Image
Image
Jerm
 
Posts: 2707
Joined: Tue Feb 11, 2003 12:50 pm
Location: Massachusetts

Re: Derivation Magic... (Bitwise calculation)

Postby Lytz1 » Mon Oct 08, 2018 4:53 pm

Very good. I can work with this. Thanks.

tL.
Lytz1
 
Posts: 152
Joined: Wed Jul 09, 2014 6:21 pm


Return to General Metro QA

Who is online

Users browsing this forum: No registered users and 6 guests