December 30, 2017 at 12:06 pm
Comments posted to this topic are about the item The New Year
December 30, 2017 at 3:18 pm
Easy for an old guy who for years had to wade through several IBM mainframe core dumps every day. Thanks, Steve, and Happy New Year!
All, may the best that happened to you in 2017 be the worst that will happen to you in 2018.
December 31, 2017 at 1:48 am
Happy New Year and thanks Steve.
...
January 1, 2018 at 2:36 am
Without calculating:
- 7E1 is odd, 7E2 is even, so it has to be 7E2
- 2018 is fairly close to 2048, a power of 2, so there's a few 1's at the beginning.
Nitpick: the binary number has 11 digits, not 12.
January 1, 2018 at 12:08 pm
ildjarn.is.dead - Monday, January 1, 2018 2:36 AMWithout calculating:
- 7E1 is odd, 7E2 is even, so it has to be 7E2
- 2018 is fairly close to 2048, a power of 2, so there's a few 1's at the beginning.Nitpick: the binary number has 11 digits, not 12.
As an 11 bit binary integer it represents -30 and this year isn't 30 BC. A year number is clearly an integer, an it's a whole number and it can be negative. To make it represent 2018 you have to see it as a 12 (or more) bit integer.
Tom
January 1, 2018 at 12:14 pm
Revenant - Saturday, December 30, 2017 3:17 PMEasy for an old guy who for years had to wade through several IBM mainframe core dumps every day. Thanks, Steve, and Happy New Year!All, may the best that happened to you in 2017 be the worst that will happen to you in 2018.
Just as easy for someone who had to wade through ICL mainframe core-dumps (and before that ICL 7900 -series telecomunications processor dumps).
But I wonder how many people tried to find a sinple way to conver a string of 0s and 1s to an integer in T-SQL. I though about it briefly, but didn't try anything as the only way I could think of was convert to hex by hand and then convert hex to int - I dont think there is any simpler method.
Similar best wishes to you and to everyone.
Tom
January 1, 2018 at 3:30 pm
HAPPY NEW YEAR!!!!!!!!!!!!!!!!!!!!!!!
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
January 2, 2018 at 1:43 am
Nice one, thanks Steve
Have a fantastic year
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
January 2, 2018 at 6:46 am
TomThomson - Monday, January 1, 2018 12:08 PMildjarn.is.dead - Monday, January 1, 2018 2:36 AMWithout calculating:
- 7E1 is odd, 7E2 is even, so it has to be 7E2
- 2018 is fairly close to 2048, a power of 2, so there's a few 1's at the beginning.Nitpick: the binary number has 11 digits, not 12.
As an 11 bit binary integer it represents -30 and this year isn't 30 BC. A year number is clearly an integer, an it's a whole number and it can be negative. To make it represent 2018 you have to see it as a 12 (or more) bit integer.
From the explanation: "In base 2, we need 11111100010. This is a 12 digit numbers [sic].". No, it's an 11 digit number (which should be read as an unsigned binary number). 011111100010 would be a 12 digit number where signedness doesn't matter.
January 2, 2018 at 12:12 pm
Didn't spend a lot of time thinking about, just took a guess and was right.
January 3, 2018 at 3:03 am
I just looked at the possible answers - binary values first. As both ended with the binary representation of 2, I picked #7E2, then after looking at the binary patterns I picked the one that had E as the second digit, rather than F. So instead of working them out properly, I just looked for the equivalent Hex value and Binary pattern!
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply