Skip to main content

Timeline for Is my OS 32-bit or 64-bit?

Current License: CC BY-SA 3.0

16 events
when toggle format what by license comment
Jun 23, 2017 at 3:18 comment added ShadowRanger Not sure what the protocol is, but I have an alternate solution (with the same weakness; it identifies the interpreters bittedness, not the OS's directly) that shaved off another 13 bytes.
Jun 21, 2017 at 13:32 comment added Alex.S @NickT I confirm that it DOES lie!
Jun 20, 2017 at 11:34 comment added DarkDust As far as I can see, this gives a wrong result when running as a 32-bit binary on a 64-bit OS since it's calculating the pointer-size, which is 32 bits.
Jun 19, 2017 at 22:02 comment added Nick T If you run this on 32-bit Python in a 64-bit OS, I think this will lie to you. Most other answers also seem sensitive to that anyways...
Jun 19, 2017 at 20:43 history edited Daniel CC BY-SA 3.0
deleted 64 characters in body
Jun 19, 2017 at 20:42 comment added totallyhuman from struct import*;print calcsize("P")*8 is shorter.
Jun 19, 2017 at 20:40 comment added Daniel @shooqie, thanks! I thought about doing that but for some reason I thought it would be longer. Luckily I was wrong
Jun 19, 2017 at 20:39 history edited Daniel CC BY-SA 3.0
added 20 characters in body
Jun 19, 2017 at 20:35 comment added shooqie I think __import__ will be shorter
Jun 19, 2017 at 20:23 comment added Daniel @tuskiomi done :)
Jun 19, 2017 at 20:23 history edited Daniel CC BY-SA 3.0
added 4 characters in body
Jun 19, 2017 at 20:23 comment added tuskiomi ahh, may want to wrap that in a left([arg],2) operator :-)
Jun 19, 2017 at 20:21 comment added Daniel @tuskiomi, this prints "32bit" or "64bit"
Jun 19, 2017 at 20:21 comment added tuskiomi I'm going to hold off on testing this until i'm home, but i'm not sure this prints out "32" and "64", but other cases i'm confident.
Jun 19, 2017 at 20:16 comment added tuskiomi zoom! across the line in under a minute.
Jun 19, 2017 at 20:15 history answered Daniel CC BY-SA 3.0