News for hackers. Stuff that matters.
Re:Claude Shannon Turns 1100100 by Cyph0n on Saturday April 30, 2016 @12:29PM (#11602336)
I hate non-standard length binary numbers! Just write 01100100 for God's sake...

On topic, Shannon is my favorite scientist of the last century, after von Neumann of course. If his only contribution was connecting Boolean algebra to digital logic, he would have been a pioneer. But no, he goes ahead and defines information theory out of nowhere, even though the majority of applications that can utilize it were not yet practical! I mean, come on Claude!

Re:Claude Shannon Turns 1100100 by jloughry on Saturday April 30, 2016 @01:45PM (#11602647)
Funny, I saw it and thought 'hey, seven bit ASCII---how appropriate'.
Re:Claude Shannon Turns 1100100 by svantana on Saturday April 30, 2016 @03:01PM (#11603039)
Do you also prefer "standard" lengths of decimal numbers, and if so, what are those?

On a related note, I once had the weirdest bug in a C program that I couldn't figure out. It turns out that I had stylized an array of integers with preceding zeros, like: {025, 057, 112} to make it pretty. Little did I know that those zeros made the numbers octal!

Re:Claude Shannon Turns 1100100 by Natsu on Saturday April 30, 2016 @05:12PM (#11603624)
Yes, I do prefer standard lengths of decimal numbers. With decimal numbers, we break every group of 3 up with a comma. It's much easier to read 1,000,000 than 10000000, after all. If you disagree, I hope you noticed that I wrote two different numbers (1 and 10 million).

So I prefer if you break up binary numbers on either 4 or 8 bit boundaries with a space and leading zeroes, as is very common in hex editors. So I'd have written either 01100100 or 0110 0100, either of which would be easier to interpret.

Re:Claude Shannon Turns 1100100 by jacobolus on Saturday April 30, 2016 @05:18PM (#11603644)
Using an initial 0 to indicate octal is a terrible convention. I’m very glad that Python 3 makes 0123 into a syntax error, and uses the form 0o123 instead for octal literals, to match the style of 0x53 (also adds 0b1010011 for binary).
Re:Claude Shannon Turns 1100100 by Tiksi on Saturday April 30, 2016 @07:20PM (#11604100)
I wonder if there's a reason for keeping the leading 0 there past tradition/convention. 0x as a prefix makes sense to differentiate between 0x12 and 012, but if it's 0x 0b and 0o, imo it'd make more sense to drop it and just leave it as o12, b12, x12, etc.
Re:Claude Shannon Turns 1100100 by MaxGabriel on Saturday April 30, 2016 @07:46PM (#11604168)
o12, b12, and x12 are all valid variable names
Re:Claude Shannon Turns 1100100 by Tiksi on Saturday April 30, 2016 @08:24PM (#11604303)
Yeah... not sure how that slipped my mind, seems quite obvious now. Thanks
Re:Claude Shannon Turns 1100100 by chj on Saturday April 30, 2016 @09:02PM (#11604406)
I prefer the Scheme way: #x53, #o123, #b1010011

It feels more natural to my taste. We already use #1, #2, ...

Re:Claude Shannon Turns 1100100 by Cyph0n on Saturday April 30, 2016 @03:33PM (#11603161)
With binary especially I feel it's easier to read if the number is written out in nibbles. Besides, many of us were introduced to binary through ASCII, so the 8 bit format feels even more natural imo.

Oh damn, that must have been tough to find!

Re:Claude Shannon Turns 1100100 by B1FF_PSUVM on Saturday April 30, 2016 @06:23PM (#11603893)
Ah, the oblivious tyranny of the victorious 8-bitters.

The days of the 6-bit register or the 18 or 36 bit words are gone, dust beneath the heels of the conquering hordes of the 8008 microprocessor heirs.

Re:Claude Shannon Turns 1100100 by Colin_M on Saturday April 30, 2016 @12:37PM (#11602374)
Yeah, especially since 01100100 can't be misinterpreted as -28
Re:Claude Shannon Turns 1100100 by Stratoscope on Saturday April 30, 2016 @01:16PM (#11602532)
01100100 has been misinterpreted as 294976 though.

I suppose we can rely on context to choose the correct interpretation, as Shannon is unlikely to have been born 294,976 years ago or 28 years in the future.

Re:Claude Shannon Turns 1100100 by justifier on Saturday April 30, 2016 @06:31PM (#11603930)
your displeasure only illustrates the limits of your interest

there are a number of areas of inquiry where using 1100100 is more appropriate than 01100100

and considering here it is being used to represent an age, one would have to show a spec on ages represented in binary to determine what 'standard' is

Re:Claude Shannon Turns 1100100 by Intermernet on Sunday May 01, 2016 @05:46AM (#11605569)
At least we can assume that age is unsigned...
Re:Claude Shannon Turns 1100100 by justifier on Sunday May 01, 2016 @02:14PM (#11607206)
for now :p