[Cryptech Tech] Pascal indexing?

Joachim Strömbergson joachim at secworks.se
Tue May 5 13:12:14 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Aloha!

Rob Austein wrote:
> At Tue, 05 May 2015 08:53:02 +0200, Joachim Strömbergson wrote:
>> To me it makes more sence to have someting called _BIT be the
>> index number of the bit. But hey, I'm the HW guy and also know the
>> context. If the team thinks it would be easier to grokk for users
>> (esp SW developers) to have _BIT mean the bitmask then I'm all for
>> it.
> 
> Software generally wants it in mask form.  One can do this by
> defining the constants as masks or by defining the constants as bit
> numbers and using "<<".  Which makes sense depends on whether
> anything actually needs the bit numbers: "<<" is easy, log2() is
> harder, but if nothing needs the bit numbers, just using the mask is
> that much simpler.

Ok. Pascal it is. ;-)

- -- 
Med vänlig hälsning, Yours

Joachim Strömbergson - Alltid i harmonisk svängning.
========================================================================
 Joachim Strömbergson          Secworks AB          joachim at secworks.se
========================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJVSMGuAAoJEF3cfFQkIuyNIJUQAILUf/lAqJoIcG/RJjsaAzii
3sU/sjxlAkf4sRmaYKeq/XfMnL73tqCkSlVtSlr+s7fH2KkqE54Z/pYWBmBzeorZ
4gzz+IqJLPy+UIi/EB42ffH9RFCvwp0qsMlQ4fOdk3rhY4k92ARlY/jFkZTABCF2
HXMl2DPMB292wPkiFbZzvPafTtjYFGtDlkSZnvAIod0za//qfwly6h94yxtCfzFO
TADIjCUrAkjnxUGeTODV6vqQUwVQR24oETb1or9K3h2pEdEP0joqZKIaqv4G0V2M
7u65mOXIrhImDq8sMGEgyRNiOLXKkoD2h6qle2+H2OV1uWPnE2ORug0rlah4SDMx
omNEXDlj9800CQ/psnq3d3cZJkcvkSUI7I8nnfYx7pg/Xe8v3J8sC++CESkI0Kkv
QIk4W7/w4LMn+/W0UE9b2xEjerl3m4OnMH5pd1HyayQsrgHqX/ffd+L25wUKPLiW
9MZXWNqahiSI5MUuClsv5fQCZ2JlGO4vf9bFxk/VPoENdCv5MBwBKn2AKDNOzn65
G3xWb7vE92upUQEAkjq/lusUlSxFyDwW4pH4XA7RlHOL0Kov9xt1BIvOQ7ExTfQA
QZ7EaHv8ibxoSDmjA9RJj6M0EDTzWKq7rwynaMKHhcvbD5BWXDHnetTtAZO2g3lL
hWAnLOTCztkeYOlO0KLL
=pJe/
-----END PGP SIGNATURE-----


More information about the Tech mailing list