Re: To xor or not to xor

From: Jan Karrman <jan_at_it_dot_uu_dot_se>
Date: Sun Oct 26 2003 - 13:52:55 CST

On Sun, 26 Oct 2003, Edward Cherlin wrote:

> Computers only work with bits, not with decimal numbers.
>

Yes, I believe I have heard some rumors about computers using binary
representation... ;-)

> This does require decimal arithmetic, so it does require the
> computer to go through the steps needed to treat the binary
> encoding of the data as a sequence of decimal numbers. If we
> were to store the data as packed Binary-Coded Decimal, it would
> make little difference, but if we store the data in an integer
> format, your proposal requires the computer to convert back to
> decimal representation. It is far more complicated than using
> the computer's native binary capabilities.
>

The representation of the number with decimal digits is *essential*
when it is to be printed as a bar code: the mandatory checksum character
is calculated from the digits. Also, at the time I wrote the letter it
was suggested that the number was to be included in vote-selection.xml.
The XML parser I used (gnosis.xml.objectify) already returned the number
as a string of decimal digits, so it was natural to work decimal.

Since then I took on the task to write the votes2digits() function
(that generates the number from the other data in vote-selection.xml),
so of course I could have applied the xor obfuscation there. I think
I'll leave it as it is, though.

/Jan
==================================================================
= The content of this message, with the exception of any external
= quotations under fair use, are released to the Public Domain
==================================================================
Received on Fri Oct 31 23:17:04 2003

This archive was generated by hypermail 2.1.8 : Fri Oct 31 2003 - 23:17:07 CST